Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139995 - unable to find _start symbol when compiling applications
Summary: unable to find _start symbol when compiling applications
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-11 07:16 UTC by p0
Modified: 2006-07-13 19:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description p0 2006-07-11 07:16:26 UTC
...
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/dhcpcd-2.0.7/work/dhcpcd-2.0.7/config.log

!!! ERROR: net-misc/dhcpcd-2.0.7 failed.
Call stack:
  ebuild.sh, line 1545:   Called dyn_compile
  ebuild.sh, line 940:   Called src_compile
  dhcpcd-2.0.7.ebuild, line 37:   Called econf '--disable-debug'
  ebuild.sh, line 541:   Called die


------------------------------------------------------------------------------
content of config.log:

--<snip>---------
configure:2042: $? = 0
configure:2044: i686-pc-linux-gnu-gcc -v </dev/null >&5
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1)
configure:2047: $? = 0
configure:2049: i686-pc-linux-gnu-gcc -V </dev/null >&5
i686-pc-linux-gnu-gcc: '-V' option must have argument
configure:2052: $? = 1
configure:2075: checking for C compiler default output file name
configure:2078: i686-pc-linux-gnu-gcc -O2 -march=i686 -pipe -fomit-frame-pointer   conftest.c  >&5
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000080481a0
configure:2081: $? = 0
configure:2127: result: a.out
configure:2132: checking whether the C compiler works
configure:2138: ./a.out
./configure: line 2139:  5665 Illegal instruction     ./$ac_file
configure:2141: $? = 132
configure:2150: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
--<snap>---------


------------------------------------------------------------------------------
# echo "int main(void) { return 0; }" >test.c
# gcc -v test.c

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1)
 /usr/libexec/gcc/i686-pc-linux-gnu/4.1.1/cc1 -quiet -v test.c -quiet -dumpbase test.c -mtune=pentiumpro -auxbase test -version -o /tmp/ccgazZpj.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include
 /usr/include
End of search list.
GNU C version 4.1.1 (Gentoo 4.1.1) (i686-pc-linux-gnu)
        compiled by GNU C version 4.1.1 (Gentoo 4.1.1).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 8ea365211abab9800a995f5b7a701a66
 /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccWCpoAr.o /tmp/ccgazZpj.s
GNU assembler version 2.17 (i686-pc-linux-gnu) using BFD version 2.17
 /usr/libexec/gcc/i686-pc-linux-gnu/4.1.1/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crt1.o /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/crtbegin.o -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.1 -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.1 -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../.. /tmp/ccWCpoAr.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/crtend.o /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crtn.o
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000080481a0
Comment 1 p0 2006-07-11 07:16:46 UTC
emerge --info:

Portage 2.1.1_pre1-r5 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.16-gentoo-r8 i686)
=================================================================
System uname: 2.6.16-gentoo-r8 i686 unknown
Gentoo Base System version 1.12.1
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apache2 apm arts avi berkdb bitmap-fonts bzip2 bzlib cli crypt cups dlloader dri eds emboss encode esd foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 idn imlib iproute2 ipv6 isdnlog jpeg libg++ libwww livecd mad mikmod mime minimal motif mp3 mpeg ncurses network nfs nls nptl nptlonly ogg opengl oss pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection sdl session spell spl ssl sysfs tcpd truetype truetype-fonts type1-fonts udev unicode usb userlocales utf8 vorbis xml xmms xorg xv zip zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_de userland_GNU video_cards_i810 video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-07-11 09:07:05 UTC
Do other versions of dhcpcd emerge? Do other ebuilds emerge?
Comment 3 p0 2006-07-12 00:06:41 UTC
The original description of this bug was "configure: error: cannot run C compiled programs." because this fails in every configure. Not just in the the dhcpcd ebuild.

revdep-rebuild doesnt report any linking problems.
Comment 4 SpanKY gentoo-dev 2006-07-12 15:33:52 UTC
looks like your glibc is broken ... _start is provided by:
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crt1.o

try running `readelf -s` on that file ... you should see the _start symbol
Comment 5 p0 2006-07-13 06:19:16 UTC
readelf -s prints nothing to console. how can i fix this problem?
Comment 6 SpanKY gentoo-dev 2006-07-13 19:44:51 UTC
you'll need to grab a glibc binary and then re-emerge it