public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc4.6.1 installation
@ 2012-01-06 10:57 Santosh Pratap Singh
  2012-01-06 11:40 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Santosh Pratap Singh @ 2012-01-06 10:57 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gcc4.6.1 installation
  2012-01-06 10:57 gcc4.6.1 installation Santosh Pratap Singh
@ 2012-01-06 11:40 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2012-01-06 11:40 UTC (permalink / raw)
  To: Santosh Pratap Singh; +Cc: gcc-help

On 6 January 2012 09:48, Santosh Pratap Singh wrote:
> Hi All:
>
> The gcc4.6.1 installation (build on Red Hat Enterprise Linux ES
> release 4.5) is not working on SuSE11.1 systems.

That's expected - in general you can't build a native compiler on one
system and expect it to work on a different system.  Unless you built
a cross-compiler, the compiler built on RHEL expects to find the same
version of glibc on the host system where it runs.  The version on the
SuSE machine is different.

You should build GCC on the SuSE machine for use on the SuSE machine,
or build a "Canadian Cross" compiler on RHEL.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-06 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-06 10:57 gcc4.6.1 installation Santosh Pratap Singh
2012-01-06 11:40 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).