Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 303303

Summary: [cross-powerpc64/gcc] sys-devel/gcc-4.4.2 fails with libgcc/../gcc/config/freebsd-spec.h:130:23: error: sys/param.h: No such file or directory
Product: Gentoo Linux Reporter: Jean-Francis Roy <jeanfrancis>
Component: [OLD] Core systemAssignee: Gentoo Crossdev team <crossdev>
Status: RESOLVED OBSOLETE    
Severity: normal CC: johannes
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 627914    
Attachments: info.log
gcc-stage2.log
glibc-headers.log from crossdev
cross-powerpc-unknown-linux-gnu-glibc-headers.log
cross-powerpc-unknown-linux-gnu-info.log

Description Jean-Francis Roy 2010-02-03 03:23:14 UTC
Trying to build a powerpc64 toolchain on an amd64 architecture using crossdev, it fails at glib-headers compilation with a missing sys/param.h file.

Build log will be attached.

Reproducible: Always

Steps to Reproduce:
1. crossdev -t powerpc64

Actual Results:  
Fails to build glibc-headers

Expected Results:  
Succeeds to build glibc-headers

# emerge --info                                                                                         
Portage 2.2_rc62 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.9_p20081201-r2, 2.6.33-rc6 x86_64)           
=================================================================                                                   
System uname: Linux-2.6.33-rc6-x86_64-Intel-R-_Core-TM-2_CPU_T5600_@_1.83GHz-with-gentoo-2.1.6                      
Timestamp of tree: Mon, 01 Feb 2010 07:00:01 +0000                                                                  
distcc 3.1 x86_64-pc-linux-gnu [disabled]                                                                           
app-shells/bash:     4.0_p35                                                                                        
dev-java/java-config: 2.1.10                                                                                        
dev-lang/python:     2.6.4-r1                                                                                       
dev-util/cmake:      2.8.0-r2                                                                                       
sys-apps/baselayout: 2.1.6
sys-apps/openrc:     0.6.0
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=3.0 --with-bdeps y"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
MAKEOPTS="-j3 -l3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/kde /var/lib/layman/x11 /var/lib/layman/sunrise /usr/local/portage/local-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alac alsa amd64 berkdb bluetooth branding bzip2 cairo cblas cddb cdr cleartype cli consolekit corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr dvdread eds emboss encode evo faac fam firefox flac fortran gdbm gif gpm gsl gstreamer gtk hal iconv ipv6 jpeg kde lame lapack latex ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg msn mudflap multilib ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd pulseaudio python qt3support qt4 quicktime readline reflection sdl semantic-desktop session spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype type1 unicode usb vorbis wavpack webkit x264 xml xorg xscreensaver xulrunner xv xvid zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard joystick synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jean-Francis Roy 2010-02-03 03:24:19 UTC
Created attachment 218269 [details]
info.log
Comment 2 Jean-Francis Roy 2010-02-03 03:24:51 UTC
Created attachment 218271 [details]
gcc-stage2.log
Comment 3 SpanKY gentoo-dev 2010-03-09 03:16:37 UTC
glibc didnt fail, gcc (stage2?) did.  sys/param.h is supposed to be from the glibc build, and it works on my machine.

$ qlist -I -v powerpc64
cross-powerpc64-unknown-linux-gnu/binutils-2.20.1
cross-powerpc64-unknown-linux-gnu/gcc-4.4.3
cross-powerpc64-unknown-linux-gnu/glibc-2.11-r1
cross-powerpc64-unknown-linux-gnu/linux-headers-2.6.33

$ ls -l /usr/powerpc64-unknown-linux-gnu/usr/include/sys/param.h
-rw-r--r-- 1 root root 2470 Mar  8 21:52 /usr/powerpc64-unknown-linux-gnu/usr/include/sys/param.h

post the actual output from crossdev
Comment 4 Jean-Francis Roy 2010-03-09 03:46:43 UTC
I just reproduced the bug. Here is the actual crossdev output:

# crossdev -t powerpc64
----------------------------------------------------------------------------------------------------------------------
* Host Portage ARCH:     amd64
* Target Portage ARCH:   ppc64
* Target System:         powerpc64-unknown-linux-gnu
* Stage:                 4 (C/C++ compiler)

* binutils:              binutils-[latest]
* gcc:                   gcc-[latest]
* headers:               linux-headers-[latest]
* libc:                  glibc-[latest]

* PORTDIR_OVERLAY:       /var/lib/layman/sunrise
* PORT_LOGDIR:           /var/log/portage
* PKGDIR:                /usr/portage/packages/cross/powerpc64-unknown-linux-gnu
* PORTAGE_TMPDIR:        /var/tmp/cross/powerpc64-unknown-linux-gnu
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~ 
* Forcing the latest versions of {binutils,gcc}-config/gnuconfig...                                               [ok]
* Log: /var/log/portage/cross-powerpc64-unknown-linux-gnu-binutils.log
* Emerging cross-binutils...                                                                                      [ok]
* Log: /var/log/portage/cross-powerpc64-unknown-linux-gnu-linux-headers-quick.log
* Emerging cross-linux-headers-quick...                                                                           [ok]
* Log: /var/log/portage/cross-powerpc64-unknown-linux-gnu-glibc-headers.log
* Emerging cross-glibc-headers...

* glibc failed :(
* If you file a bug, please attach the following logfiles:
* /var/log/portage/cross-powerpc64-unknown-linux-gnu-info.log
* /var/log/portage/cross-powerpc64-unknown-linux-gnu-glibc-headers.log
Comment 5 SpanKY gentoo-dev 2010-03-09 05:54:02 UTC
Comment on attachment 218271 [details]
gcc-stage2.log

this log is definitely not glibc-headers
Comment 6 SpanKY gentoo-dev 2010-03-09 05:54:27 UTC
you need to post that log file then
Comment 7 Jean-Francis Roy 2010-03-09 06:37:58 UTC
Created attachment 222773 [details]
glibc-headers.log from crossdev

This is the fresh cross-powerpc64-unknown-linux-gnu-glibc-headers.log from /var/log/portage

# ls -l cross-powerpc64-unknown-linux-gnu-glibc-headers.log 
-rw-r--r-- 1 root root 864542 Mar  8 23:00 cross-powerpc64-unknown-linux-gnu-glibc-headers.log


Even if the file contains a build error from GCC, it IS cross-powerpc64-unknown-linux-gnu-glibc-headers.log created by crossdev.
Comment 8 Jean-Francis Roy 2010-03-09 06:44:02 UTC
The file requested as been attached, I'm reopening the bug. This file is definitely the glibc-headers log created by crossdev. If it's not what you want, there's a problem with crossdev not logging the good thing at the good place.
Comment 9 SpanKY gentoo-dev 2010-03-09 18:07:20 UTC
Comment on attachment 222773 [details]
glibc-headers.log from crossdev

same log as before.  guess it's a dependency issue.  run crossdev with -P --nodeps to workaround the issue.
Comment 10 Jean-Francis Roy 2010-03-09 18:24:15 UTC
Of course it was the same log as before, you asked me to post the actual file so I did :-).

You were right about the dependency issue, running with --nodeps worked. For some reason GCC was pulled before glibc-headers.

So this is resolved, I put the resolution to INVALID as it seems I'm the only one who got this dependency problem.

Thanks! :-)
Comment 11 SpanKY gentoo-dev 2010-04-25 06:59:19 UTC
*** Bug 316669 has been marked as a duplicate of this bug. ***
Comment 12 SpanKY gentoo-dev 2010-06-10 03:44:55 UTC
something isnt quite right and i need to find a day to poke it
Comment 13 Io) 2010-09-02 22:41:37 UTC
Hello,

Jean-François, you're not the only one !

Having same problem with PowerPC crossdev from an x86.


crossdev -d powerpc
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 * crossdev version:      20100620
 * Host Portage ARCH:     x86
 * Target Portage ARCH:   ppc
 * Target System:         powerpc-unknown-linux-gnu
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  glibc-[latest]

 * PORTDIR_OVERLAY:       /usr/local/portage/layman/sunrise
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/powerpc-unknown-linux-gnu
 * PORTAGE_TMPDIR:        /var/tmp/cross/powerpc-unknown-linux-gnu
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -
 * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ...                                                                                                                     [ ok ]
 * Log: /var/log/portage/cross-powerpc-unknown-linux-gnu-binutils.log
 * Emerging cross-binutils ...                                                                                                                                                            [ ok ]
 * Log: /var/log/portage/cross-powerpc-unknown-linux-gnu-linux-headers-quick.log
 * Emerging cross-linux-headers-quick ...                                                                                                                                                 [ ok ]
 * Log: /var/log/portage/cross-powerpc-unknown-linux-gnu-glibc-headers.log
 * Emerging cross-glibc-headers ...

 * glibc failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-powerpc-unknown-linux-gnu-info.log
 * /var/log/portage/cross-powerpc-unknown-linux-gnu-glibc-headers.log


Attaching files...
Comment 14 Io) 2010-09-02 22:42:47 UTC
Created attachment 245803 [details]
cross-powerpc-unknown-linux-gnu-glibc-headers.log
Comment 15 Io) 2010-09-02 22:43:47 UTC
Created attachment 245806 [details]
cross-powerpc-unknown-linux-gnu-info.log
Comment 16 SpanKY gentoo-dev 2012-03-02 05:49:40 UTC
Comment on attachment 245803 [details]
cross-powerpc-unknown-linux-gnu-glibc-headers.log

your error is unrelated
Comment 17 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-22 22:40:26 UTC
Let's close it as obsolete. It's an old bug against old gcc version. Probably fixed/worked-around by bug #686248.