Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[portage] glibc erreur de compilation : ld cannot find -lgcc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
Felandral
n00b
n00b


Joined: 06 Dec 2013
Posts: 6

PostPosted: Fri Dec 06, 2013 11:41 am    Post subject: [portage] glibc erreur de compilation : ld cannot find -lgcc Reply with quote

Bonjour à tous,
Etant tout nouveau sur gentoo (je suis sur l'installation depuis quelque jours), je m'excuse si mon problème vous paraît trivial.
J'ai fait plusieurs recherches sur google, sur la documentation et sur les forums, sans trouver de cas similaires.

Je souhaite mettre à jour le système, grâce à la commande emerge --update --newuse --deep --with-bdeps=y @world.
Emerge m'annonce qu'il va télécharger 331 paquets, dont le premier est glibc-2.16.0.
C'est à ce niveau que ça coince : après de nombreuses lignes de compilation, j'ai le message d'erreur suivant :
Code:

...
...
a - elf/unwind-dw2-fde-glibc.os
a - elf/framestate.os
a - elf/unwind-pe.os
x86_64-pc-linux-gnu-gcc -m32 -march=i686 -Wl,-O1 -Wl,--as-needed  -nostdlib -nostartfiles -r -o /var/tmp/portage/sys-libs/glibc-2.16.0/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.map.o '-Wl,-(' /var/tmp/portage/sys-libs/glibc-2.16.0/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/dl-allobjs.os /var/tmp/portage/sys-libs/glibc-2.16.0/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/var/tmp/portage/sys-libs/glibc-2.16.0/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.mapT
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc.a when searching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.16.0/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.map] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.16.0/work/glibc-2.16.0/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.16.0/work/glibc-2.16.0'
make: *** [all] Error 2
emake failed
ERROR: sys-libs/glibc-2.16.0::gentoo failed (compile phase):
   make for x86 failed
 
 Call stack:
           ebuild.sh, line   93:  Called src_compile
         environment, line 3400:  Called eblit-run 'src_compile'
         environment, line  888:  Called eblit-glibc-src_compile
   src_compile.eblit, line  245:  Called src_compile
         environment, line 3400:  Called eblit-run 'src_compile'
         environment, line  888:  Called eblit-glibc-src_compile
   src_compile.eblit, line  253:  Called toolchain-glibc_src_compile
   src_compile.eblit, line  152:  Called die
 The specific snippet of code:
         emake || die "make for ${ABI} failed"
 
 If you need support, post the output of `emerge --info '=sys-libs/glibc-2.16.0::gentoo'`,
 the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.16.0::gentoo'`.
 The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.16.0/temp/build.log'.
 The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.16.0/temp/environment'.
 Working directory: '/var/tmp/portage/sys-libs/glibc-2.16.0/work/build-x86-x86_64-pc-linux-gnu-nptl'
 S: '/var/tmp/portage/sys-libs/glibc-2.16.0/work/glibc-2.16.0'


Apparemment, il me manque une librairie, ou ld ne parvient pas à la trouver.
J'ai tenté un "emerge libgcc", mais on dirait que ce paquet n'existe pas.

Quelqu'un pourra-t-il m'aider ? :)
_________________
Felandral
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8704
Location: ~Brussels - Belgique

PostPosted: Fri Dec 06, 2013 11:56 am    Post subject: Reply with quote

Bonjour,

Pourrais-tu nous donner la sortie de
Code:
gcc-config -l
emerge --info
?

Merci d'avance !
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Felandral
n00b
n00b


Joined: 06 Dec 2013
Posts: 6

PostPosted: Fri Dec 06, 2013 12:01 pm    Post subject: Reply with quote

Voici ce que me donne gcc-config :
Code:
 [1] x86_64-pc-linux-gnu-4.7.3 *
 [2] x86_64-pc-linux-gnu-4.7.3-hardenednopie
 [3] x86_64-pc-linux-gnu-4.7.3-hardenednopiessp
 [4] x86_64-pc-linux-gnu-4.7.3-hardenednossp
 [5] x86_64-pc-linux-gnu-4.7.3-vanilla


Et emerge -info :
Code:
Portage 2.2.7 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.15-r3, 3.2.0-23-generic x86_64)
=================================================================
System uname: Linux-3.2.0-23-generic-x86_64-Intel-R-_Core-TM-_i5-2467M_CPU_@_1.60GHz-with-gentoo-2.2
KiB Mem:     3953376 total,    172260 free
KiB Swap:    5622780 total,   5612080 free
Timestamp of tree: Thu, 05 Dec 2013 16:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.linuxant.fr/distfiles.gentoo.org/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm iconv ipv6 jpeg kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


J'espère que ça pourra t'aider.
_________________
Felandral
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8704
Location: ~Brussels - Belgique

PostPosted: Fri Dec 06, 2013 12:11 pm    Post subject: Reply with quote

Je ne vois pas immédiatement. Tu as un profil stable et rien d'exotique.

Par contre, glibc vient juste de passer "stable", mais je ne vois aucun bug ouvert à ce sujet.
C'est étrange...

Essaie de reforcer gcc :
Code:
gcc-config 1

et ensuite
Code:
ldconfig


puis
Code:
emerge --resume
pour relancer la compilation

Si ça échoue, pourrais-tu remonter le début de /var/tmp/portage/sys-libs/glibc-2.16.0/temp/build.log, au cas où il y aurait un message d'avertissement qui s'affiche.

EDIT: et mets aussi dans CFLAGS/CXXFLAGS du make.conf:
Code:
-O2 -pipe -march=native -mtune=native

_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Felandral
n00b
n00b


Joined: 06 Dec 2013
Posts: 6

PostPosted: Fri Dec 06, 2013 4:19 pm    Post subject: Reply with quote

J'ai modifié les CFLAGS, et lancé emerge --resume, mais ça me met la même chose.
J'ai remarqué qu'au lancement de emerge, ça m'affiche ça :
Code:
openpty failed: 'out of pty devices'

Je sais pas si c'est important ou pas.

Le début de ../sys-lib/glibc-2.16.0/temp/build.log :
Code:
Package:    sys-libs/glibc-2.16.0
Repository: gentoo
Maintainer: toolchain@gentoo.org
USE:        abi_x86_64 amd64 elibc_glibc kernel_linux multilib policykit userland_GNU
FEATURES:   preserve-libs sandbox userpriv usersandbox
make -s glibc-test
make -s glibc-test
>>> Unpacking source...
Auto adding -march=x86_64 to CFLAGS_x86 #185404
Checking gcc for __thread support ...
Checking kernel version (3.2.0 >= 2.6.16) ...
Checking linux-headers version (3.9.0 >= 2.6.16) ...
>>> Unpacking glibc-2.16.0.tar.xz to /var/tmp/portage/sys-libs/glibc-2.16.0/work
>>> Unpacking glibc-ports-2.16.0.tar.xz to /var/tmp/portage/sys-libs/glibc-2.16.0/work/glibc-2.16.0
>>> Unpacking glibc-2.16.0-patches-12.tar.bz2 to /var/tmp/portage/sys-libs/glibc-2.16.0/work
/var/tmp/portage/sys-libs/glibc-2.16.0/temp/environment: line 1607: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
/var/tmp/portage/sys-libs/glibc-2.16.0/temp/environment: line 1607: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8)
Applying Gentoo Glibc Patchset 2.16.0-12 ...
  0020_all_glibc-tweak-rfc1918-lookup.patch ...
  0030_all_glibc-2.17-ppc-fcntl-updates.patch ...
  0035_all_glibc-2.16-i386-math-feraiseexcept-overhead.patch ...
  0040_all_glibc-2.16-no-libgcc_s.patch ...
  0041_all_glibc-2.16-arm-specific-static-stubs.patch ...
  0045_all_glibc-2.16-byteswap-gcc-4.2.patch ...
  0052_all_glibc-2.14-resolv-hp-assert.patch ...
  0055_all_glibc-2.16-x32-malloc-align.patch ...
  0056_all_glibc-2.16-sed-version.patch ...
  0059_all_glibc-2.19-make-4.0.patch ...
  0065_all_glibc-2.18-qecvt-guards.patch ...
  0068_all_glibc-2.16-glibc-revert-fseek-on-fclose.patch ...
  0070_all_glibc-2.16-sunrpc-bootstrap.patch ...
  0080_all_glibc-2.16-revert-x86_64-eagain-pthread_cond_wait.patch ...
  0085_all_glibc-disable-ldconfig.patch ...
  1005_all_glibc-sigaction.patch ...
  1008_all_glibc-2.16-fortify.patch ...
  1040_all_2.3.3-localedef-fix-trampoline.patch ...
  1055_all_glibc-resolv-dynamic.patch ...
  1070_all_glibc-fadvise64_64.patch ...

_________________
Felandral
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8704
Location: ~Brussels - Belgique

PostPosted: Fri Dec 06, 2013 4:57 pm    Post subject: Reply with quote

Lance
Code:
locale-gen
, en vérifiant au préalable que tu as bien en_US.UTF-8 dans /etc/locale.gen
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Felandral
n00b
n00b


Joined: 06 Dec 2013
Posts: 6

PostPosted: Fri Dec 06, 2013 5:40 pm    Post subject: Reply with quote

Je n'avais pas de fichier /etc/locale.gen. Je l'ai créé, en mettant la ligne "en_US.UTF-8 UTF-8" et j'ai lancé les commandes appropriées.
Mais la compilation ne se fait toujours pas, et après redémarrage, on me dit
Code:
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_GB.UTF-8)

Enfin bon.
L'embêtant, c'est que je peux strictement rien faire sur mon système tant que je n'ai pas résolu cette erreur de compilation (et je ne pense pas que ça vienne de la langue).
J'ai même été forcé de faire un dualboot avec Debian juste pour avoir internet et une suite bureautique, en attendant que ce soit rêglé (autant dire que Gentoo ne me sert pas beaucoup)
Quelqu'un peut-il m'aider, svp ?
_________________
Felandral
Back to top
View user's profile Send private message
Felandral
n00b
n00b


Joined: 06 Dec 2013
Posts: 6

PostPosted: Sun Dec 15, 2013 10:21 am    Post subject: Reply with quote

Alors, une semaine de réflexion n'a pas été utile pour trouver la solution on dirait...
Avec "locale-gen en_GB.UTF-8", je n'ai plus de warnings de setlocale, mais j'ai beau remettre à jour l'arbre et lancer les commandes qu'on m'a donné, ça ne donne rien. Je vous rappelle l'endroit où la compilation s'arrête :
Code:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc.a when searching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status

Désolé pour le double post, mais j'aimerais au moins savoir si il y a quelque chose à faire, ou si je dois tout réinstaller.
Quelqu'un pourrait-il m'éclairer ?

EDIT : Voici le fichier build.log, complet.
_________________
Felandral
Back to top
View user's profile Send private message
Felandral
n00b
n00b


Joined: 06 Dec 2013
Posts: 6

PostPosted: Tue Dec 17, 2013 5:34 pm    Post subject: Reply with quote

Eh bien, c'est dommage, je pensais que Gentoo aurait pu être une bonne expérience pour moi.
Mais comme personne ne souhaite m'aider, et que je ne peux plus avancer dans l'installation, étant impossible de faire des mises à jour à cause de cette erreur...
Je vais pas non plus passer deux mois en console sur un live-CD, à me connecter tous les jours sur internet pour voir si on a daigné se pencher sur mon problème.
Tant pis, j'abandonne. Je vais revenir sur Debian ou Arch, là bas au moins on répond aux gens qui ont des problèmes.
Bon vent.
_________________
Felandral
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8704
Location: ~Brussels - Belgique

PostPosted: Tue Dec 17, 2013 7:25 pm    Post subject: Reply with quote

Bonjour,

Ouvre un rapport de bug sur https://bugs.gentoo.org en donnant l'erreur, emerge --info et le fichier build.log dans /var/tmp/portage/*/*/temp/build.log
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum