Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

{PHP 4.4.9 --Emerge} C++ compiler cannot create executables

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
yodi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 88
Joined: Fri May 14, 2004 1:56 pm
Location: Liverpool, England

{PHP 4.4.9 --Emerge} C++ compiler cannot create executables

  • Quote

Post by yodi » Wed Nov 17, 2004 2:53 pm

Hey there, I'm having a few problems installing PHP, never had this one before...

The error that occurs is

Code: Select all

 checking whether the C++ compiler (g++ -O2 -march=athlon-xp -fomit-frame-pointer -L/usr/lib -ldb-4.1  -L/usr/X11R6/lib -ltiff -L/usr/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386/server -L/opt/sun-jdk-1.5.0/jre/lib/i386/server -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386/native_threads -L/opt/sun-jdk-1.5.0/jre/lib/i386/native_threads -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386 -L/opt/sun-jdk-1.5.0/jre/lib/i386 -Wl,-rpath,/usr/qt/3/lib -L/usr/qt/3/lib) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

!!! ERROR: dev-php/php-4.3.9 failed.
!!! Function econf, Line 449, Exitcode 1
!!! econf failed
 
Searching the forum points to my compile flags but as you can see from below :

Code: Select all

CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
they seem fine and ever other package has compiled fine.

The only odd thing in the error message is the use of Sun Java 1.5.0 but this is down to the fact that I need to use the latest version for my development work so it's just about one of the only packages compiled with ACCECPT_KEYWORDS set.

My processor is a Athlon xp so that can't be it, I have no knowledge of any memeory trouble on my computer as things seem stable enough and the computer runs fine (apart from this odd compile error).

Any run into this or think they know of a solution?
All Servers :: Offline [no connection]
Gallery :: Visit Here
Homepage :: Visit Here
Top
Gentree
Watchman
Watchman
User avatar
Posts: 5350
Joined: Tue Jul 01, 2003 12:51 am
Location: France, Old Europe

  • Quote

Post by Gentree » Wed Nov 17, 2004 11:14 pm

It's not actually using sun-java it seems to be just pulling in the path elements containing this.

I presume this corresponds with echo $PATH on your machine.

As a hack test I just cut & pasted from your post to my command line and got this.

Code: Select all

g++ -O2 -march=athlon-xp -fomit-frame-pointer -L/usr/lib -ldb-4.1  -L/usr/X11R6/lib -ltiff -L/usr/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386/server -L/opt/sun-jdk-1.5.0/jre/lib/i386/server -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386/native_threads -L/opt/sun-jdk-1.5.0/jre/lib/i386/native_threads -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386 -L/opt/sun-jdk-1.5.0/jre/lib/i386 -Wl,-rpath,/usr/qt/3/lib -L/usr/qt/3/lib

/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status


Do you see different?

8)
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Top
yodi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 88
Joined: Fri May 14, 2004 1:56 pm
Location: Liverpool, England

  • Quote

Post by yodi » Wed Nov 17, 2004 11:47 pm

Firstly thank you for your reply,

I get exactly the same output from running the output from the error message, just for refence I have copied and pasted that output from my shell ::

Code: Select all

g++ -O2 -march=athlon-xp -fomit-frame-pointer -L/usr/lib -ldb-4.1  -L/usr/X11R6/lib -ltiff -L/usr/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386/server -L/opt/sun-jdk-1.5.0/jre/lib/i386/server -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386/native_threads -L/opt/sun-jdk-1.5.0/jre/lib/i386/native_threads -Wl,-rpath,/opt/sun-jdk-1.5.0/jre/lib/i386 -L/opt/sun-jdk-1.5.0/jre/lib/i386 -Wl,-rpath,/usr/qt/3/lib -L/usr/qt/3/lib 
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
I have also added the following to /etc/portage/package.keywords if this helps ::

Code: Select all

x11-base/xorg-x11 ~x86
sys-devel/gcc ~x86
sys-libs/glibc ~x86
net-www/mozilla-firefox ~x86
media-video/nvidia-glx ~x86
media-video/nvidia-kernel ~x86
media-video/xine-ui ~x86
media-video/mplayer ~x86
dev-java/sun-jdk ~x86
sys-libs/libstdc++ ~x86
sys-libs/libstdc++-v3 ~x86
media-libs/win32codecs ~x86
They are just about the only things that I would really think I require using untested (unstable) ebuilds of.
[/code]
All Servers :: Offline [no connection]
Gallery :: Visit Here
Homepage :: Visit Here
Top
cypherscout
n00b
n00b
Posts: 13
Joined: Wed Aug 25, 2004 5:00 pm
Contact:
Contact cypherscout
Website

  • Quote

Post by cypherscout » Tue Dec 14, 2004 5:33 pm

I too am having the same problem with emerging php.
I had it installed and working fine and then I unmerged x11 because for whatever reason I had forgotten to specify a USE flag of "-X" and it compiled and installed X11 as well. This caused a problem and in following the forums, I tried unmerging and emerging php. Unfortunatly I have been recieving the same C++ error every time since then.

Code: Select all

error: installation or configuration problem: C++ compiler cannot create executables. 
Per another post I remerged glibc. I have not seen any success. Perhaps someone with a greater understanding could shed some light on this issue?
Top
gentsquash
l33t
l33t
Posts: 753
Joined: Wed Nov 03, 2004 7:36 pm
Location: Still a Gentoo beginner.
Contact:
Contact gentsquash
Website

  • Quote

Post by gentsquash » Thu Jan 27, 2005 9:52 pm

Does

Code: Select all

gcc --version
show 3.3.4 or 3.3.5 or something else? If the pkgs you compile
are looking for a different version of `gcc', then perhaps these
threads

http://forums.gentoo.org/viewtopic.php?t=282418
http://forums.gentoo.org/viewtopic.php?t=285487
http://forums.gentoo.org/viewtopic.php?t=278673


are relevant?
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Top
msulli1355
Apprentice
Apprentice
User avatar
Posts: 179
Joined: Thu Nov 24, 2005 4:59 pm
Location: OKlahoma, USA

C compiler cannot create executables

  • Quote

Post by msulli1355 » Thu Nov 24, 2005 5:11 pm

I tried to create a cross-compilation environment last night for an i586 on my i686 box and now every time I try to emerge anything I get this errror:

error: C compiler cannot create executables

It's effecting the system even outside the cross-compilation environment. Here's some info:

/etc/make.conf:

# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -march=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
USE="candy apache2 oss apm alsa arts avi berkdb bitmap-fonts cdr crypt cups doc encode
fortran f77 foomaticdb gdbm gif gpm gnome gstreamer gtk gtk2 imlib jpeg kde libg++
libwww mad mbox mikmod motif mpeg ncurses nls oggvorbis opengl pam pdflib png ppds
python qt quicktime readline samba sasl sdl threads nntp spell ssl svga tcltk tcpd
truetype usb X xml xml2 xmms xv zlib x86 imap offensive java mysql examples mmx mmx2
perl divx4linux real mmxext audiofile nas snmp hal unicode guile slp tidy dvd dvdr
dvdread flash glut mono new-login browserplugin nsplugin bzip2 win32codecs v4l v4l2 ruby sql lirc mythtv dvb ffmpeg userlocales php"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo"
FEATURES="keepwork"
ALSA_CARDS="hda-intel"

camille ~ # gcc --version
gcc (GCC) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

camille ~ # gcc-config -l
[1] i686-pc-linux-gnu-3.3.6 *
[2] i686-pc-linux-gnu-3.3.6-hardened
[3] i686-pc-linux-gnu-3.3.6-hardenednopie
[4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
[5] i686-pc-linux-gnu-3.3.6-hardenednossp

I'll be happy to provide any other information you think is necessary to solve my problem....
-Michael Sullivan
Top
msulli1355
Apprentice
Apprentice
User avatar
Posts: 179
Joined: Thu Nov 24, 2005 4:59 pm
Location: OKlahoma, USA

Re: C compiler cannot create executables

  • Quote

Post by msulli1355 » Thu Nov 24, 2005 5:19 pm

msulli1355 wrote:I tried to create a cross-compilation environment last night for an i586 on my i686 box and now every time I try to emerge anything I get this errror:

error: C compiler cannot create executables

It's effecting the system even outside the cross-compilation environment. Here's some info:

/etc/make.conf:

# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -march=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
USE="candy apache2 oss apm alsa arts avi berkdb bitmap-fonts cdr crypt cups doc encode
fortran f77 foomaticdb gdbm gif gpm gnome gstreamer gtk gtk2 imlib jpeg kde libg++
libwww mad mbox mikmod motif mpeg ncurses nls oggvorbis opengl pam pdflib png ppds
python qt quicktime readline samba sasl sdl threads nntp spell ssl svga tcltk tcpd
truetype usb X xml xml2 xmms xv zlib x86 imap offensive java mysql examples mmx mmx2
perl divx4linux real mmxext audiofile nas snmp hal unicode guile slp tidy dvd dvdr
dvdread flash glut mono new-login browserplugin nsplugin bzip2 win32codecs v4l v4l2 ruby sql lirc mythtv dvb ffmpeg userlocales php"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo"
FEATURES="keepwork"
ALSA_CARDS="hda-intel"

camille ~ # gcc --version
gcc (GCC) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

camille ~ # gcc-config -l
[1] i686-pc-linux-gnu-3.3.6 *
[2] i686-pc-linux-gnu-3.3.6-hardened
[3] i686-pc-linux-gnu-3.3.6-hardenednopie
[4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
[5] i686-pc-linux-gnu-3.3.6-hardenednossp

I'll be happy to provide any other information you think is necessary to solve my problem....
-Michael Sullivan
Some extra information I forgot to add:

I sent a question about this error into the gentoo-user list last night and got a reply that suggested that I create a simple C program and try to compile it. I created a simple Hello World program in C and tried to compile it:

camille ~ # gcc hello.c gcc: installation problem, cannot exec `as': No such file or directory

I did "equery belongs as":

camille ~ # equery belongs as
[ Searching for file(s) as in *... ]
dev-java/xerces-2.6.2-r2 (/usr/share/doc/xerces-2.6.2-r2/html/javadocs/dom3-api/org/apache/xerces/dom3/as)
dev-libs/atk-1.10.1 (/usr/share/locale/as)
gnome-base/gail-1.8.4 (/usr/share/locale/as)
kde-base/kdebase-3.4.1-r1 (/usr/kde/3.4/share/locale/l10n/as)
sys-devel/binutils-2.16.1 (/usr/i686-pc-linux-gnu/binutils-bin/2.16.1/as)
cross-i586-pc-linux-gnu/binutils-2.16.1 (/usr/i586-pc-linux-gnu/binutils-bin/2.16.1/as)

I suspect that the "as" it wants it the binutils one:

camille ~ # /usr/i686-pc-linux-gnu/binutils-bin/2.16.1/as
-bash: /usr/i686-pc-linux-gnu/binutils-bin/2.16.1/as: No such file or directory

However I can't rebuild binutils because gcc isn't working. Is there a way to rebuild binutils without using gcc?
Top
jmp_
Apprentice
Apprentice
Posts: 294
Joined: Sun Oct 02, 2005 5:27 pm
Location: BCN / Catalonia (Spain)

  • Quote

Post by jmp_ » Sat Nov 26, 2005 12:47 am

I think the problem is binutils, an incorrect version is referenced, you should create or fix the symlinks... try to emerge a new binutils version if possible.

Look at this, I solved this problem before:
http://forums.gentoo.org/viewtopic-t-38 ... ight-.html (spanish sorry).
http://forums.gentoo.org/viewtopic-p-27 ... ml#2769680 (english).

Anyway commands are international :P

Code: Select all

Creo que ya está solucionado.

He estado mirando /etc/env.d y la jerarquía de /usr/lib && /usr/i686-bla-bla y he visto que al parecer era algo relacionado con binutils.
Código:

$ binutils-config -l
 [1] i686-pc-linux-gnu-2.16.1

Esa era la versión actual, pero al parecer había varias menciones a "2.16" de manera que he creado un enlace simbólico en:
Código:

$ pwd
/usr/i686-pc-linux-gnu/binutils-bin


Corrigiendo el problema con el número de versión (ln -s 2.16.1 2.16):
Código:

lrwxrwxrwx  1 root root   6 Oct  2 22:11 2.16 -> 2.16.1
drwxr-xr-x  2 root root 392 Jun 13 11:11 2.16.1 
greetings.
Top
pigge2
n00b
n00b
Posts: 1
Joined: Sat Aug 22, 2009 11:28 pm
Location: Europe/Stockholm

Binutils

  • Quote

Post by pigge2 » Sat Aug 22, 2009 11:40 pm

Yeah, it was binutils that had missed to update some symlinks for me as well, on two installs it did the same thing

links I've updated manually:

/usr/powerpc-unknown-linux-gnu/bin/addr2line -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/addr2line
/usr/powerpc-unknown-linux-gnu/bin/ar -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/ar
/usr/powerpc-unknown-linux-gnu/bin/as -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/as
/usr/powerpc-unknown-linux-gnu/bin/c++filt -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/c++filt
/usr/powerpc-unknown-linux-gnu/bin/embedspu -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/embedspu
/usr/powerpc-unknown-linux-gnu/bin/gprof -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/gprof
/usr/powerpc-unknown-linux-gnu/bin/ld -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/ld
/usr/powerpc-unknown-linux-gnu/bin/nm -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/nm
/usr/powerpc-unknown-linux-gnu/bin/objcopy -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/objcopy
/usr/powerpc-unknown-linux-gnu/bin/objdump -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/objdump
/usr/powerpc-unknown-linux-gnu/bin/ranlib -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/ranlib
/usr/powerpc-unknown-linux-gnu/bin/readelf -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/readelf
/usr/powerpc-unknown-linux-gnu/bin/size -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/size
/usr/powerpc-unknown-linux-gnu/bin/strings -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/strings
/usr/powerpc-unknown-linux-gnu/bin/strip -> /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18/strip
/usr/powerpc-unknown-linux-gnu/lib/libopcodes.a -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libopcodes.a
/usr/powerpc-unknown-linux-gnu/lib/libopcodes.so -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libopcodes.so
/usr/powerpc-unknown-linux-gnu/lib/libopcodes-2.18.so -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libopcodes-2.18.so
/usr/powerpc-unknown-linux-gnu/lib/libopcodes.la -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libopcodes.la
/usr/powerpc-unknown-linux-gnu/lib/libbfd.la -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libbfd.la
/usr/powerpc-unknown-linux-gnu/lib/ldscripts -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/ldscripts
/usr/powerpc-unknown-linux-gnu/lib/libiberty.a -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libiberty.a
/usr/powerpc-unknown-linux-gnu/lib/libbfd.a -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libbfd.a
/usr/powerpc-unknown-linux-gnu/lib/libbfd.so -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libbfd.so
/usr/powerpc-unknown-linux-gnu/lib/libbfd-2.18.so -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/libbfd-2.18.so
/usr/include/bfd.h -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/include/bfd.h
/usr/include/bfdlink.h -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/include/bfdlink.h
/usr/include/dis-asm.h -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/include/dis-asm.h
/usr/include/libiberty.h -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/include/libiberty.h
/usr/include/symcat.h -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/include/symcat.h
/usr/include/ansidecl.h -> /usr/lib/binutils/powerpc-unknown-linux-gnu/2.18/include/ansidecl.h

where (as you can see) pointing to /usr/powerpc-unknown-linux-gnu/binutils-bin/2.18 and i had to point them to /usr/powerpc-unknown-linux-gnu/binutils-bin/2.19.1

on another note, all of awk, gawk, nawk igawk and pgawk links was also pointing to the wrong version for me
and some other files got removed (/sbin/functions.sh amongst others)

and all problems happened DURING binutils emerge...
Top
Post Reply

9 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy