Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Broken toolchain, need tinderbox builds [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Tue May 14, 2013 1:33 pm    Post subject: Broken toolchain, need tinderbox builds [Solved] Reply with quote

Hey I F'ed my install.
It won't compile anything with the error "C compiler cannot create executables".
This is with O2 and native.

I thought I'd just easilly download the packages from tinderbox. But it seems to be missing a lot of packages of which gcc, binutils and glibc.
Does someone have them (amd64) or does someone knows when they come up there?


Last edited by Maitreya on Thu May 23, 2013 10:27 am; edited 1 time in total
Back to top
View user's profile Send private message
Christian99
Veteran
Veteran


Joined: 28 May 2009
Posts: 1668

PostPosted: Tue May 14, 2013 1:37 pm    Post subject: Reply with quote

"C compiler cannot create executables" doesn't necessarily mean, your toolchain is broken.
First, check that your CFLAGS are spelled correctly. Typo there also produces this error.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54209
Location: 56N 3W

PostPosted: Tue May 14, 2013 1:43 pm    Post subject: Reply with quote

Maitreya,

I will have several sets but they will all be built with -march=native which means they may not run on your CPU.
We need to know your exact CPU to help.

Theres lots of reasons to get "C compiler cannot create executables", so tell what you did. It may be possible to fix your box without tinderboxing.

Lastly, you may unpick a current stage3 tarball. Do NOT untar it to your root like a new install - that would destroy your current install. If you want to follow this path, post back and I'll explain the details.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Tue May 14, 2013 3:52 pm    Post subject: Reply with quote

This morning I wanted to update my system. Last time I did that was last week and everything worked back then. There was no change in the make.conf

the make.conf has
Quote:

CFLAGS="-march=native -mtune=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"


This has not changed. So I checked my filesystem (maybe it got corrupted as nothing had changed). No faults there.

So I went for tinderbox packages. When I couldnt find the appropiate packages I downloaded the ones from http://tinderbox.dev.gentoo.org/cross-x86/cross-x86_64-pc-linux-gnu/ .
When I extracted this package (gcc) to root ( / ) I made things worse (because I could not pick up the package with emerge -K). Emerge could not be found in /usr/lib/portage from that point. So I downloaded a portage snapshot and reinstalled it. Now that works again and I'm back at the first issue. None of my GCC in gcc-config can create executables now. So if someone has the appropriate versions I could dump into /usr/portage/packages that would be great.

Native cflags (note this is the old I7, without avx) :
Quote:

-march=corei7 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=corei7


and cpuinfo
Quote:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz
stepping : 5
microcode : 0x4
cpu MHz : 2806.947
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 5613.89
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:


One thing I'v learned is that I should not bypass emerge by manually unpacking the tbz :P
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54209
Location: 56N 3W

PostPosted: Tue May 14, 2013 4:18 pm    Post subject: Reply with quote

Maitreya,

I'm all AMD here, so I can't help with binaries.

I can't help wondering if --depclean removed your active gcc because you habd a newer but not yet active version.
Code:
gcc-config -l
will help there.
See if you can find a suitable gcc listed and if so, select it.

The tarball you downloaded was a cross compiler for something. That is, it runs an AMD64 but does not output code for AMD64, it could be for ARM or SPARC or some other arch.

Heres how to unpick a stage3 tarball, in outline.
Make a new dir where you have a few Gb of space, say /home/Maitreya/stage3
Untar the stage3 to /home/Maitreya/stage3 and continue the install to the point where you could chroot to /home/Maitreya/stage3 but don't yet.

Borrow your /usr/portage, /usr/portage/distfiles and /usr/portage/packages from your main install.
Bind mounting /usr/portage to /home/Maitreya/stage3/usr/portage may be enough.
Copy over your make.conf to the right place in /home/Maitreya/stage3

Now chroot /home/Maitreya/stage3/ /bin/bash
At this point you have a working Gentoo system in a dir. You cannot boot to it but you can build things and package them.

In the make.conf in the chroot, set FEATURES=buildpkg to save binary tarballs of everything your build. These tarballs will be saved in /usr/portage/packages, which is the same place both inside and outside the chroot.

You can use emerge in the normal way, or you can install gentoolkit and use quickpkg to make packages from already installed packages.

Outside the chroot, use emerge -K to install the packages to the main system.

When you have recovered, you can remove /home/Maitreya/stage3 ... until the next time :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Tue May 14, 2013 4:25 pm    Post subject: Reply with quote

Wow thanks NeddySeagoon. With that I can for good measure do a whole emerge -e system in that chroot and outside it pickup the packages!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54209
Location: 56N 3W

PostPosted: Tue May 14, 2013 4:30 pm    Post subject: Reply with quote

Maitreya,

Yes, you can build anything in that chroot in a dir.
I run all ~arch systems and have FEATURES=buildpkg always set.
This means that I can get out of jail free with emerge -K most times. ~arch does occasionally provide broken packages and its good to be able to downgrade again quickly.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Tue May 14, 2013 5:06 pm    Post subject: Reply with quote

Very nice!

Could I add an overlay within this chroot for example the toolchain overlay?

This would be great for testing before using it in the main install.

Also is there a way to continue a shell script after chrooting so I could automate this and for example maintain a private "tinderbox"?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54209
Location: 56N 3W

PostPosted: Tue May 14, 2013 5:17 pm    Post subject: Reply with quote

Maitreya,

Yes.

Your install in a directory is the same as an install to a partition, except that you cannot boot into it.
A chroot like this is a standard developers tool. In some respects a virtual machine is better, as you can boot that.
Both are expendable, since you can copy the chroot or snapshot the VM before you do something risky, then remove the broken chroot/VM and try something else.

-- edit --
Write your shell script in two pieces, one for outside the chroot and one for inside the chroot.
At the end of the outside piece put chroot /home/Maitreya/stage3 /path/to/inside/piece
If you make the inside piece end with /bin/bash, it will drop you to a shell when everything else is done.

Error handling in the script is up to you.

If you want to show off, you can write a single shell script that executes outside of the chroot but creates the chrooted part of the script before it calls it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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