View previous topic :: View next topic |
Author |
Message |
windex n00b
Joined: 09 Dec 2012 Posts: 70
|
Posted: Tue Apr 22, 2014 11:09 pm Post subject: [SOLVED] gcc compilation problem |
|
|
EDIT: My particular problems were caused because I foolishly choose to install gentoo without the use of a multilib profile. Something that I shan't repeat in the foreseeable future, let's hope.
Hey. I'm having some trouble compiling gcc.
Emerge gcc
resulted in:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
I tried
to sync portage and rebuild but got a similar error
For example:
Here is gcc -v :
http://codepad.org/69bZuq4i
Here is /etc/portage/make.conf :
http://codepad.org/DteS8bjr
I copied the build log to:
http://codepad.org/432Dm06B
Last edited by windex on Sun May 18, 2014 5:03 pm; edited 4 times in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Wed Apr 23, 2014 1:30 am Post subject: |
|
|
What is the output of emerge --info sys-libs/glibc sys-devel/gcc? |
|
Back to top |
|
|
windex n00b
Joined: 09 Dec 2012 Posts: 70
|
Posted: Wed Apr 23, 2014 3:02 am Post subject: --info |
|
|
Hu wrote: | What is the output of emerge --info sys-libs/glibc sys-devel/gcc? |
Thanks for asking.
# time emerge --info sys-libs/glibc sys-devel/gcc
posted here: http://codepad.org/PS1OSLhP
Edit: Noticed the following error, possibly related to the below: Code: | !!! Unable to set SELinux security labels |
Last edited by windex on Wed Apr 23, 2014 7:51 pm; edited 1 time in total |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Wed Apr 23, 2014 4:39 pm Post subject: |
|
|
Portage 2.2.8-r1 (hardened/linux/amd64/selinux, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
sys-libs/glibc-2.17 was built with the following:
USE="hardened -debug -gd (-multilib) -nscd -profile (-selinux) -suid -systemtap -vanilla" ABI_X86="64"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox selinux... "
selinux everywhere but not for your glibc? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Wed Apr 23, 2014 10:12 pm Post subject: |
|
|
I would be more concerned about him using a multilib profile with a no-multilib glibc. You need a multilib glibc installed before you can build multilib glibc/gcc. OP has a no-multilib glibc installed. |
|
Back to top |
|
|
windex n00b
Joined: 09 Dec 2012 Posts: 70
|
Posted: Thu Apr 24, 2014 4:12 pm Post subject: the SElinux quandry |
|
|
Thanks guys.
I'm trying to decide if I should dump the SElinux configuration at that point.
Obviously, it's overkill for what I'm trying to do, but since I'll need to learn SElinux eventually now might actually be a good time.
Can I get some personal advice? Should I focus on solving he multilib problem right now, or should I be focusing on learning SElinux principles? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Fri Apr 25, 2014 12:07 am Post subject: |
|
|
SELinux is a very deep hole. Get your system into a consistent state before you try to learn SELinux. |
|
Back to top |
|
|
windex n00b
Joined: 09 Dec 2012 Posts: 70
|
Posted: Tue Apr 29, 2014 6:22 am Post subject: |
|
|
Thanks to both of you for your advice. I've been doing some background reading on SELinux and agree that I have a ways to go before I am ready. Instead we can focus on getting multilib going.
The first thing I did was use eselect to change my profile.
Afterwards, eselect profile list produces:
Code: |
Available profile symlink targets:
[1] default/linux/amd64/13.0
[2] default/linux/amd64/13.0/selinux
[3] default/linux/amd64/13.0/desktop
[4] default/linux/amd64/13.0/desktop/gnome
[5] default/linux/amd64/13.0/desktop/gnome/systemd
[6] default/linux/amd64/13.0/desktop/kde
[7] default/linux/amd64/13.0/desktop/kde/systemd
[8] default/linux/amd64/13.0/developer
[9] default/linux/amd64/13.0/no-multilib
[10] default/linux/amd64/13.0/x32
[11] hardened/linux/amd64 *
[12] hardened/linux/amd64/selinux
[13] hardened/linux/amd64/no-multilib
[14] hardened/linux/amd64/no-multilib/selinux
[15] hardened/linux/amd64/x32
[16] hardened/linux/uclibc/amd64
|
So I tried to emerge again, and got a similar error. I re-sync'd and re-emerged, and then posted the output of
emerge --info '=sys-devel/gcc-4.7.3-r1::gentoo'
to:
http://codepad.org/Vi0H5sMG
and emerge -pqv '=sys-devel/gcc-4.7.3-r1::gentoo'
Code: |
time emerge -pqv '=sys-devel/gcc-4.7.3-r1::gentoo'
[ebuild R ] sys-devel/gcc-4.7.3-r1 USE="cxx hardened (multilib*) nls nptl openmp (-altivec) -awt -doc (-fixed-point) -fortran -gcj -go -graphite (-libssp) -mudflap -multislot -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla"
|
Really, it seemed about time to do some background reading, and I found this gem:
http://jkroon.blogs.uls.co.za/it/gentoo/gentoo-converting-no-multilib-to-multilib
Made /home/multilib, acquired and untarred a multi-lib friendly stage3, ran the recommended BASH script, copied over resolv.conf, made /home/multilib/etc/portage, and then copied /etc/portage/package.* over to the build environment.
My one deviation from the suggested procedure was to copy /etc/portage/make.conf rather than /etc/make.conf.
Afterwards I chroot'd to /home/multilib, and ran emerge -uav and then emerge -euav --buildpkg system, etc.
But the suggested repairs regimen didn't work. Almost.
I'm thinking it makes more sense for me to just bite the bullet and to re-install? If nothing else, I've learned what multilib is, how it's important, the symptoms of multilib problems and at least from
a theoretical standpoint, how to accomplish multilib repairs? Please advise.
This has been found but we might just have to chalk this round up to the penguin.
EDIT: Thanks to both of you gentlemen for your assistance. You'd be surprised how much that I have learned from this exercise. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Wed Apr 30, 2014 2:27 am Post subject: |
|
|
Yes, a reinstall is usually the recommended course to convert from no-multilib to multilib. However, in your case, you are most of the way through a reinstall already, albeit with the newly installed system buried in /home/multilib. With some careful directory rearrangement, and enough free space, you could use the LiveCD environment to move your existing install to a subdirectory, then copy/move the multilib environment to the root of the filesystem, so that your next reboot uses the multilib environment as a root filesystem. If that all works, you can then use the subdirectory containing your no-multilib environment as a reference to verify you set all the configuration files the way you want, then remove the no-multilib subdirectory.
Your variation of using /etc/portage/make.conf is correct. In older systems, it was /etc/make.conf. The reference blog used the older name. |
|
Back to top |
|
|
windex n00b
Joined: 09 Dec 2012 Posts: 70
|
Posted: Sat May 10, 2014 11:55 pm Post subject: |
|
|
Hu wrote: |
Your variation of using /etc/portage/make.conf is correct. In older systems, it was /etc/make.conf. The reference blog used the older name. |
Thank you, Hu.
Okay, started over per the gentoo handbook:
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1
I even wiped out the file systems. The only two things I recycled were the kernel configuration file and make.conf
I pretty much followed the guide verbatim, until I needed to choose a profile. Here I was a bit puzzled. Isn't one of the profiles supposed to specifically enable multilib?
No matter. I simply chose one that neither specified selinux nor specifically excluded multilib.
Code: |
brony4life ~ # eselect profile list
Available profile symlink targets:
[1] default/linux/amd64/13.0
[2] default/linux/amd64/13.0/selinux
[3] default/linux/amd64/13.0/desktop
[4] default/linux/amd64/13.0/desktop/gnome
[5] default/linux/amd64/13.0/desktop/gnome/systemd
[6] default/linux/amd64/13.0/desktop/kde
[7] default/linux/amd64/13.0/desktop/kde/systemd
[8] default/linux/amd64/13.0/developer
[9] default/linux/amd64/13.0/no-multilib
[10] default/linux/amd64/13.0/x32
[11] hardened/linux/amd64 *
[12] hardened/linux/amd64/selinux
[13] hardened/linux/amd64/no-multilib
[14] hardened/linux/amd64/no-multilib/selinux
[15] hardened/linux/amd64/x32
[16] hardened/linux/uclibc/amd64
|
Hopefully that was the correct choice. Continued with the guide, finished the build. Time to reboot...(*fingers crossed*) Boom goes the dynamite!
OK, now time to emerge world.
Darn! Unfortunately I'm getting an error with the gcc package, indeed a similar one as before:
Code: |
In file included from /usr/include/features.h:400:0,
from /usr/include/stdio.h:27,
from /var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/libgcc/../gcc/tsystem.h:88,
from /var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/libgcc/libgcov.c:29:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
compilation terminated.
|
http://codepad.org/bzrkHuhV
Output of emerge --info '=sys-devel/gcc-4.7.3-r1::gentoo' :
http://codepad.org/yxMqyss1
Output of emerge -pqv '=sys-devel/gcc-4.7.3-r1::gentoo :
Code: |
[ebuild R ] sys-devel/gcc-4.7.3-r1 USE="cxx hardened (multilib*) nls nptl openmp (-altivec) -awt -doc (-fixed-point) -fortran -gcj -go -graphite (-libssp) -mudflap -multislot -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla"
* IMPORTANT: 1 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.
|
Output of /var/tmp/portage/sys-devel/gcc-4.7.3-r1/temp/build.log
http://codepad.org/lshZRnvn
Where did I go wrong? Emerge with the pqv flags outputs multilib, doesnt it? Why is multilib featured in perenthensis? |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun May 11, 2014 4:34 am Post subject: |
|
|
If you re-install, i wonder how you get to that state, but your current glibc don't have 32bits version, so your glibc wasn't built with multilib.
portage output () a package that is force enable/disable. So (multilib) mean in your case : force enabling multilib, something using a multilib profile will normally force enable of course.
but the * in it, also mean its previous state wasn't the one display. So it tell you previous state was with -multilib and now it is force enable.
Wonder again, how you did that reinstall so.
And check codepad.org usage, no idea if the service is buggy or you, but it cut down the output leaving us out with the part where error appears.
A simple solve to your problem: go there and grab ready-made binaries for your toolchain :
http://tinderbox.dev.gentoo.org/hardened/amd64/
download and install glibc and gcc to have ones with multilib enable on your system, and try keep going (better get binutils while you are at it)
remember to install the same version as the packages you grab and make sure you use the --usepkgonly
and use --pretend to see emerge understand what you are trying to do, you don't want emerge gcc, you want emerge "that gcc" package (the one you have download), the pretend output should be in pink/violet color instead of the green color on package name and you should get binary instead of ebuild as
Code: | [ebuild R ] media-video/vlc-2.1.2:0/5-7 <--without
[binary R ] media-video/vlc-2.1.2:0/5-7 <-- with
| you can use quickpkg any_package_in_your_system to find out where to put the files, on my system using default location it's in /usr/portage/packages |
|
Back to top |
|
|
windex n00b
Joined: 09 Dec 2012 Posts: 70
|
Posted: Sun May 18, 2014 5:03 pm Post subject: |
|
|
krinn wrote: |
download and install glibc and gcc to have ones with multilib enable on your system, and try keep going (better get binutils while you are at it)
remember to install the same version as the packages you grab and make sure you use the --usepkgonly
and use --pretend to see emerge understand what you are trying to do, you don't want emerge gcc, you want emerge "that gcc" package (the one you have download), the pretend output should be in pink/violet color instead of the green color on package name and you should get binary instead of ebuild as
Code: | [ebuild R ] media-video/vlc-2.1.2:0/5-7 <--without
[binary R ] media-video/vlc-2.1.2:0/5-7 <-- with
| you can use quickpkg any_package_in_your_system to find out where to put the files, on my system using default location it's in /usr/portage/packages |
Thank you, Sir. Yes, I share your confusion as to how I preserved some of my system problems during re-install.
Well, I'll probably deny doing this later, but I really nerfed my system due to a tar accident, and so I just rebuilt the whole thing.
This time I used a gentler build profile, for example:
Code: |
eselect profile list
Available profile symlink targets:
[1] default/linux/amd64/13.0
[2] default/linux/amd64/13.0/selinux
[3] default/linux/amd64/13.0/desktop *
[4] default/linux/amd64/13.0/desktop/gnome
[5] default/linux/amd64/13.0/desktop/gnome/systemd
[6] default/linux/amd64/13.0/desktop/kde
[7] default/linux/amd64/13.0/desktop/kde/systemd
[8] default/linux/amd64/13.0/developer
[9] default/linux/amd64/13.0/no-multilib
[10] default/linux/amd64/13.0/x32
[11] hardened/linux/amd64
[12] hardened/linux/amd64/selinux
[13] hardened/linux/amd64/no-multilib
[14] hardened/linux/amd64/no-multilib/selinux
[15] hardened/linux/amd64/x32
[16] hardened/linux/uclibc/amd64
|
And now everything works. I want to thank everyone for remaining patient enough with me to help me understand more about multilib, etc.
Cheers! |
|
Back to top |
|
|
|
|
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
|
|