[gdal-dev] Error linking srsinfo in 3.9.1 (rc1 or rc2)

Scott public at postholer.com
Mon Jun 24 11:03:53 PDT 2024


Yes, I saw that. It's the default code. I tried changing it to just 
'include' early on and got a whole new set of errors.

Changing the default source code without an understanding of the bigger 
picture leaves me a bit out of my element, though.

Thanks!

On 6/24/24 10:57, Barry DeZonia wrote:
> Scott, is it that you are using #include_next instead of #include? 
> #include_next makes assumptions about the environment that #include does 
> not.
> 
> On Mon, Jun 24, 2024 at 12:53 PM Scott via gdal-dev 
> <gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>> wrote:
> 
>     Thanks for the docker instructions. It built nice and clean.
> 
>     That still leaves the question, in my environment, why do all the apps
>     except gdalsrsinfo build? I seriously doubt stdlib.h is only used by
>     gdalsrsinfo.
> 
>     Thanks for the help! I'll try and figure it out.
> 
>     On 6/24/24 10:25, Even Rouault wrote:
>      >
>      > Le 24/06/2024 à 19:15, Scott a écrit :
>      >> It's Debian 12. No, it's not clean. It's had several versions of
>     gdal,
>      >> et al, on it.
>      >>
>      >> It appears srsinfo in not finding stdlib.h and all the other
>     apps do,
>      >> which is the part I found odd.
>      >>
>      >> Docker is not the environment I'm building in.
>      >
>      > yes, but that's the most convenient way for me to try to
>     reproduce all
>      > the diverse environments people can use
>      >
>      > Just trying the following works fine for me:
>      >
>      > docker run --rm -it -v /home/even/gdal/3.9:/home/even/gdal/3.9
>     debian:12
>      >
>      > (inside it)
>      >
>      > cd /home/even/gdal/3.9/build_debian_12/
>      > apt update && apt install cmake g++ make libproj-dev
>      > cmake ..
>      > make -j$(nproc)
>      >
>      >>
>      >> Thanks!
>      >>
>      >> On 6/24/24 10:01, Even Rouault wrote:
>      >>> Hi,
>      >>>
>      >>> What is the version of your Debian system ? Is it "clean" ? Can
>     you
>      >>> for example reproduce in the corresponding debian:XXX docker image?
>      >>>
>      >>>
>     https://www.google.com/search?q=fatal+error%3A+stdlib.h%3A+No+such+file+or+directory+ <https://www.google.com/search?q=fatal+error%3A+stdlib.h%3A+No+such+file+or+directory+>" shows that this error message is quite common, although on quick reading, I couldn't spot a common point/solution between all those occurrences
>      >>>
>      >>> Even
>      >>>
>      >>> Le 24/06/2024 à 18:39, Scott via gdal-dev a écrit :
>      >>>> When building 3.9.1 rc1/r2 I get the following when linking. If I
>      >>>> comment srsinfo out of the makefile, all other gdal/ogr apps
>     build
>      >>>> fine with no issues.
>      >>>>
>      >>>> uname -a:
>      >>>> Linux MyHost 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian
>     6.1.90-1
>      >>>> (2024-05-03) x86_64 GNU/Linux
>      >>>>
>      >>>> Thanks!
>      >>>>
>      >>>> Build output below:
>      >>>>
>      >>>> [ 98%] Building CXX object
>      >>>> apps/CMakeFiles/gdalsrsinfo.dir/gdalsrsinfo.cpp.o
>      >>>> In file included from
>     /usr/include/c++/12/ext/string_conversions.h:41,
>      >>>>                  from
>     /usr/include/c++/12/bits/basic_string.h:3960,
>      >>>>                  from /usr/include/c++/12/string:53,
>      >>>>                  from
>      >>>> /export/gis/local/src/gdal-3.9.1/port/cpl_error.h:256,
>      >>>>                  from
>      >>>> /export/gis/local/src/gdal-3.9.1/port/cpl_string.h:35,
>      >>>>                  from
>      >>>> /export/gis/local/src/gdal-3.9.1/apps/gdalsrsinfo.cpp:32:
>      >>>> /usr/include/c++/12/cstdlib:75:15: fatal error: stdlib.h: No such
>      >>>> file or directory
>      >>>>    75 | #include_next <stdlib.h>
>      >>>>       |               ^~~~~~~~~~
>      >>>> compilation terminated.
>      >>>> make[2]: *** [apps/CMakeFiles/gdalsrsinfo.dir/build.make:76:
>      >>>> apps/CMakeFiles/gdalsrsinfo.dir/gdalsrsinfo.cpp.o] Error 1
>      >>>> make[1]: *** [CMakeFiles/Makefile2:10247:
>      >>>> apps/CMakeFiles/gdalsrsinfo.dir/all] Error 2
>      >>>> make: *** [Makefile:146: all] Error 2
>      >>>>
>      >>>> _______________________________________________
>      >>>> gdal-dev mailing list
>      >>>> gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>      >>>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>     <https://lists.osgeo.org/mailman/listinfo/gdal-dev>
>      >>>
>     _______________________________________________
>     gdal-dev mailing list
>     gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>     https://lists.osgeo.org/mailman/listinfo/gdal-dev
>     <https://lists.osgeo.org/mailman/listinfo/gdal-dev>
> 


More information about the gdal-dev mailing list