Part of the ebuild script fails when I try to compile uclibc-0.9.28.3-r7 using crossdev when crossdev tries to the libc's headers only. This is because the ebuild script tries to access binaries which aren't built when the ebuild is only making the headers. This results from trying to make a i586-pc-linux-uclibc toolchain using crossdev. Reproducible: Always Steps to Reproduce: 1. run USE="-nls -iconv" crossdev --target i586-pc-linux-uclibc --with-headers (if uclibc-0.9.28.3-r7 isn't the default for crossdev anymore, add the argument --libc 0.9.28.3-r7 to crossdev) I'm not sure if the --with-headers option is required, but I know that gcc-stage1 requires uclibc's headers to compile Actual Results: crossdev fails (full log should be attached): * Log: /var/log/portage/cross-i586-pc-linux-uclibc-uclibc-headers.log * Emerging cross-uclibc-headers ... * uclibc failed :( * If you file a bug, please attach the following logfiles: * /var/log/portage/cross-i586-pc-linux-uclibc-info.log * /var/log/portage/cross-i586-pc-linux-uclibc-uclibc-headers.log The uclibc build log shows that the ebuild tried to access binaries which shouldn't be built because crossdev only wants the headers installed and the ebuild told uclibc's build-scripts NOT to make binaries: cp: cannot stat `utils/ldconfig.host': No such file or directory * * ERROR: cross-i586-pc-linux-uclibc/uclibc-0.9.28.3-r7 failed. * Call stack: * ebuild.sh, line 49: Called src_install * environment, line 2636: Called die * The specific snippet of code: * newbin utils/ldconfig.host ${CTARGET}-ldconfig || die; * The die message: * (no error message) * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/mnt/bacup/portagetmp/cross/i586-pc-linux-uclibc/portage/cross-i586-pc-linux-uclibc/uclibc-0.9.28.3-r7/temp/build.log'. * The ebuild environment file is located at '/mnt/bacup/portagetmp/cross/i586-pc-linux-uclibc/portage/cross-i586-pc-linux-uclibc/uclibc-0.9.28.3-r7/temp/environment'. * This ebuild is from an overlay: '/usr/local/portage/' * Expected Results: The ebuild should not try to access the binaries if it is supposed to only be making and installing uclibc's headers. It should not call the "die" command because otherwise the ebuild does almost everything perfectly. I fixed this problem in my local overlay, with the (hopefully) attached patch.
Created attachment 162905 [details, diff] makes uclibc-0.9.28.3-r7 ebuild not try to access binaries when headers_only is true Adds a check to see whether the ebuild is compiling headers_only before trying to access possibly unbuild binaries
Created attachment 162907 [details] crossdev log
Created attachment 162908 [details] log of emergeing uclibc-0.9.28.3-r7 with headers only
Created attachment 162910 [details] info file crossdev said I should attach
I have this same problem with the ebuilds for these other versions of uclibc: uclibc-0.9.28.3-r6 uclibc-0.9.28.3-r3 uclibc-0.9.28.3
Same problem executing : USE="-nls -iconv" crossdev --g 3.4.6-r2 -t armeb-softfloat-linux-uclibc provided patch worked for me. (thx Nathan)
*** Bug 235275 has been marked as a duplicate of this bug. ***
fixed in cvs http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild?r1=1.1&r2=1.2
*** Bug 234914 has been marked as a duplicate of this bug. ***
The problem still exists. I tested the 0.9.28.3-r3 ebuild, and I needed to apply Nathan's patch. Did I overlook something?
(In reply to comment #10) > The problem still exists. I tested the 0.9.28.3-r3 ebuild, and I needed to > apply Nathan's patch. Did I overlook something? > I think you have to run crossdev with the --with-headers option. But that is just a quick guess, as I haven't time to test.
(In reply to comment #11) > I think you have to run crossdev with the --with-headers option. But that is > just a quick guess, as I haven't time to test. Thanks for your reply. I did not find such an option. I'm just saying that your patch needs to be applied to the ebuild. Adding the "crosscompile_opts_headers-only" to the IUSE seems to be not enough.
(In reply to comment #8) > http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild?r1=1.1&r2=1.2 > When using this updated ebuild, I still get the same error I pasted in this bugs Description. I'm not sure if my patch is the correct way to fix this, but it makes sense when I read it. The invalid newbin commands are inside of a "crosscompiling specific" section that both creates the proper symlink to the cross-compilation include directory and installs the cross-compile versions of ldconfig and ldd. When --with-headers is on, the include symlink should be made, but the tools which weren't built shouldn't be installed. However, maybe the include directory symlink shouldn't be made either; I'll try to test if that is the case and may have results tomorrow. If this is the case, a different patch could be made to the ebuild that is less-complicated :-).
Created attachment 170176 [details, diff] apply to the original ebuild, allows building ot uclibc under crossdev --with-headers This version of the patch prevents the ebuild from trying to use the newbin on unbuilt binaries and it also prevents the headers-symlink because we only need the symlink "when we build a 2nd stage cross-compiler". This patch may be clearer and simpler, but I'm probably just wasting my time in creating patches :-).
(In reply to comment #14) > Created an attachment (id=170176) [edit] > apply to the original ebuild, allows building ot uclibc under crossdev > --with-headers I was able to build all of the toolchain using this patch (excluding problems with file conflicts by gcc) using the following command: USE="-nls -iconv" crossdev --with-headers --target i386-pc-linux-uclibc -S --libc 0.9.28.3-r7
Comment on attachment 170176 [details, diff] apply to the original ebuild, allows building ot uclibc under crossdev --with-headers the first patch you posted was correct
Comment on attachment 162905 [details, diff] makes uclibc-0.9.28.3-r7 ebuild not try to access binaries when headers_only is true merged this
fixed in cvs http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild?r1=1.31&r2=1.32 http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.28.3.ebuild?r1=1.8&r2=1.9 http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.28.3-r3.ebuild?r1=1.3&r2=1.4 http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.28.3-r6.ebuild?r1=1.2&r2=1.3 http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild?r1=1.2&r2=1.3 http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.30_rc1.ebuild?r1=1.2&r2=1.3 http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.30_rc3.ebuild?r1=1.1&r2=1.2
I still can't build a cross toolchain for armeb-softfloat-linux-uclibc with uclibc 0.9.28.3-r7. It fails with no real error message: make -C libdl true -Since_we_are_debugging -x -R .note -R .comment getpwent_r.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_initgroups pwd_grp.c -c -o initgroups.o true -Since_we_are_debugging -x -R .note -R .comment getgrent.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_putpwent pwd_grp.c -c -o putpwent.o true -Since_we_are_debugging -x -R .note -R .comment putpwent.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_putgrent pwd_grp.c -c -o putgrent.o make[2]: Entering directory `/var/tmp/cross/armeb-softfloat-linux-uclibc/portage/cross-armeb-softfloat-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/ldso/libdl' armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-stack-protector -O0 -g3 -mbig-endian -msoft-float -DUCLIBC_RUNTIME_PREFIX=\"/\" -fno-builtin -nostdinc -D_LIBC -DLDSO_ELFINTERP=\"arm/elfinterp.c\" -I../../ldso/ldso/arm -I../../ldso/include -I../../ldso/ldso -I../../include -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -c libdl.c -o libdl.o true -Since_we_are_debugging -x -R .note -R .comment initgroups.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL___parsepwent pwd_grp.c -c -o __parsepwent.o true -Since_we_are_debugging -x -R .note -R .comment putgrent.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL___parsegrent pwd_grp.c -c -o __parsegrent.o true -Since_we_are_debugging -x -R .note -R .comment __parsegrent.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL___pgsreader pwd_grp.c -c -o __pgsreader.o true -Since_we_are_debugging -x -R .note -R .comment __parsepwent.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-stack-protector -O0 -g3 -mbig-endian -msoft-float -DUCLIBC_RUNTIME_PREFIX=\"/\" -fno-builtin -nostdinc -D_LIBC -DLDSO_ELFINTERP=\"arm/elfinterp.c\" -I../../ldso/ldso/arm -I../../ldso/include -I../../ldso/ldso -I../../include -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -fPIC -DSHARED -D__SUPPORT_LD_DEBUG__ -c libdl.c -o libdl_pic.o true -Since_we_are_debugging -x -R .note -R .comment __pgsreader.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_fgetspent_r pwd_grp.c -c -o fgetspent_r.o true -Since_we_are_debugging -x -R .note -R .comment fgetspent_r.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_fgetspent pwd_grp.c -c -o fgetspent.o true -Since_we_are_debugging -x -R .note -R .comment fgetspent.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_sgetspent_r pwd_grp.c -c -o sgetspent_r.o true -Since_we_are_debugging -x -R .note -R .comment libdl.o true -Since_we_are_debugging -x -R .note -R .comment libdl_pic.o true -Since_we_are_debugging -x -R .note -R .comment sgetspent_r.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_getspnam_r pwd_grp.c -c -o getspnam_r.o armeb-softfloat-linux-uclibc-ar cr libdl.a ../ldso/arm/resolve.o libdl.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_getspnam pwd_grp.c -c -o getspnam.o install -d ../../lib rm -f ../../lib/libdl.a install -m 644 libdl.a ../../lib armeb-softfloat-linux-uclibc-ar cr libdl_pic.a libdl_pic.o make[2]: Leaving directory `/var/tmp/cross/armeb-softfloat-linux-uclibc/portage/cross-armeb-softfloat-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/ldso/libdl' make[1]: Leaving directory `/var/tmp/cross/armeb-softfloat-linux-uclibc/portage/cross-armeb-softfloat-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/ldso' armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_getspent_r pwd_grp.c -c -o getspent_r.o true -Since_we_are_debugging -x -R .note -R .comment getspnam.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_getspent pwd_grp.c -c -o getspent.o true -Since_we_are_debugging -x -R .note -R .comment getspnam_r.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_sgetspent pwd_grp.c -c -o sgetspent.o true -Since_we_are_debugging -x -R .note -R .comment getspent_r.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL_putspent pwd_grp.c -c -o putspent.o true -Since_we_are_debugging -x -R .note -R .comment getspent.o true -Since_we_are_debugging -x -R .note -R .comment putspent.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -DL___parsespent pwd_grp.c -c -o __parsespent.o true -Since_we_are_debugging -x -R .note -R .comment sgetspent.o armeb-softfloat-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mbig-endian -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../include -I. -O0 -g3 -isystem /usr/lib/gcc/armeb-softfloat-linux-uclibc/4.4.2/include -DNDEBUG -fPIC -c lckpwdf.c -o lckpwdf.o true -Since_we_are_debugging -x -R .note -R .comment __parsespent.o true -Since_we_are_debugging -x -R .note -R .comment lckpwdf.o echo pwd_grp/fgetpwent_r.o pwd_grp/fgetgrent_r.o pwd_grp/fgetpwent.o pwd_grp/fgetgrent.o pwd_grp/getpwnam_r.o pwd_grp/getgrnam_r.o pwd_grp/getpwuid_r.o pwd_grp/getgrgid_r.o pwd_grp/getpwuid.o pwd_grp/getgrgid.o pwd_grp/getpwnam.o pwd_grp/getgrnam.o pwd_grp/getpw.o pwd_grp/getpwent_r.o pwd_grp/getgrent_r.o pwd_grp/getpwent.o pwd_grp/getgrent.o pwd_grp/initgroups.o pwd_grp/putpwent.o pwd_grp/putgrent.o pwd_grp/__parsepwent.o pwd_grp/__parsegrent.o pwd_grp/__pgsreader.o pwd_grp/fgetspent_r.o pwd_grp/fgetspent.o pwd_grp/sgetspent_r.o pwd_grp/getspnam_r.o pwd_grp/getspnam.o pwd_grp/getspent_r.o pwd_grp/getspent.o pwd_grp/sgetspent.o pwd_grp/putspent.o pwd_grp/__parsespent.o pwd_grp/lckpwdf.o > ../obj.pwd_grp make[2]: Leaving directory `/var/tmp/cross/armeb-softfloat-linux-uclibc/portage/cross-armeb-softfloat-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/libc/pwd_grp' make[1]: Leaving directory `/var/tmp/cross/armeb-softfloat-linux-uclibc/portage/cross-armeb-softfloat-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/libc' make: *** [_dir_libc] Fehler 2 I would really appreciate soime help, as I never could build a cross toolchain for my NSLU2 ...
please dont post unrelated questions to old closed bugs. post your question to the embedded mailing list. the error most likely is in the log, you just didnt read enough of it.