On Mon, Jul 22, 2013 at 9:22 AM, Patrick Begou <Patrick.Begou@xxxxxxxxxxxxxxxxxxxx> wrote: > Ian Lance Taylor wrote: >> >> On Fri, Jul 19, 2013 at 5:27 AM, Patrick Begou >> <Patrick.Begou@xxxxxxxxxxxxxxxxxxxx> wrote: >>> >>> I get a strange problem with g++ 4.8. My server has gcc44-c++-4.4.1 >>> installed. >>> I've installed gcc4.8 in my home from gcc-4.8-20130711.tar.gz >>> gcc-4.8-infrastructure.tar.gz. >>> PATH, LD_LIBRARY_PATH are setup to reach first this 4.8 install. >>> >>> Initially I get the error runing the configure script to build OpenMPI, >>> so I >>> extract the small peace of test code in "prog.C" file for testing and: >>> >>> g++ -o conftest -DNDEBUG -finline-functions prog.C >>> Is working but: >>> g++ -o conftest -O3 -DNDEBUG -finline-functions prog.C >>> says: >>> >>> In file included from /usr/include/stdio.h:909:0, >>> from prog.C:141: >>> /usr/include/bits/stdio.h: In function ‘__ssize_t getline(char**, >>> size_t*, >>> FILE*)’: >>> /usr/include/bits/stdio.h:118:52: error: ‘__getdelim’ was not declared in >>> this scope >>> return __getdelim (__lineptr, __n, '\n', __stream); >>> >>> Same behavior with -O2 or -O1. >>> g++ 4.8 works with -O0. >>> >>> I've no idea about this problem. Thanks for your advices. >> >> Using optimization changes how your library header files behave. Look >> for #ifdef __OPTIMIZE__ or defined(__OPTIMIZE__). This looks like a >> problem with your C library, not with GCC proper. >> >> Ian >> > In http://gfortran.com/download/x86_64/PLEASE_README.txt the requirement for > glibc is : > "... The provided compilers need glibc 2.4 or newer, however the library > libgomp needs glibc 2.6...." > > I am runing glibc-devel-2.11.3-12.59.1.x86_64 > so my glibc level seams correct no ? Yes. I'm saying that you appear to be encountering a bug in glibc. I don't think it has anything to do with GCC itself. I think you should raise this with the glibc developers and see what they say. Ian