gcc4.6.1 installation

Santosh Pratap Singh spsingh.iitk@gmail.com
Fri Jan 6 10:57:00 GMT 2012


Hi All:

The gcc4.6.1 installation (build on Red Hat Enterprise Linux ES
release 4.5) is not working on SuSE11.1 systems. The compiling results
in the following:

/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

On SuSE 11.0 systems these function is defined if __USE_GNU is set and
on SuSE 11.1 systems this function is defined if __USE_XOPEN2K8 is
defined instead.  So, for gcc/g++ install to work on both
functions,  I have to manually define  __USE_XOPEN2K8 to 1 in the file
(lib/gcc/x86_64-unknown-linux-gnu/4.6.1/include-fixed/features.h)

In the gcc/g++ installation. I manually modified this file at line 269
to set __USE_XOPEN2K8
if _GNU_SOURCE is defined:

#ifdef  _GNU_SOURCE
# define __USE_GNU      1
# define __USE_XOPEN2K8 1
#endif

and, after that the compilation goes fine. I don't know if it is a
good idea to manually
modify this features.h file. Is there any configuration option which
will activate both __USE_XOPEN2K8 and __USE_GNU at the same time.  Can
someone help me in this ? Does anyone have an idea to fix this in a
more elegant way.

Thanks in advance!

Regards.
Santosh



More information about the Gcc-help mailing list