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