Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Crossdev refuses to build cross-glibc
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
dr_wulsen
n00b
n00b


Joined: 21 Aug 2013
Posts: 72
Location: Beautiful Austria, Lake area in Upper Austria

PostPosted: Tue Jun 21, 2016 12:38 pm    Post subject: [SOLVED] Crossdev refuses to build cross-glibc Reply with quote

Good afternoon together,

I am running into a problem, which I have tried for hours to solve on my own, but am not able to succeed.
All I want is crossdev to build me a cross armv7a-hardfloat-linux-gnueabi toolchain (Yeah, Raspberry Pi)....

The first obstacle already is behind me, the basic invocation of crossdev went like this:

Code:
crossdev --b =2.25.1-r1 --g =5.4.0 --k =4.6 --l =2.23-r2 --target armv7a-hardfloat-linux-gnueabi
 * crossdev version:      20160602
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm
 * Target System:         armv7a-hardfloat-linux-gnueabi
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default
 * binutils:              =binutils-2.25.1-r1
 * gcc:                   =gcc-5.4.0
 * headers:               =linux-headers-4.6
 * libc:                  =glibc-2.23-r2

 * CROSSDEV_OVERLAY:      /var/lib/layman/crossdev
 * PORT_LOGDIR:           /var/log/portage/
 * PORTAGE_CONFIGROOT:   
 * Portage flags:
       
 ...emerging all the good stuff, until we come to the point things break...

 * Log: /var/log/portage//cross-armv7a-hardfloat-linux-gnueabi-glibc.log
 * Emerging cross-glibc ...
 * error: glibc failed :(

Now the error log gave the answer:
Code:
checking whether x86_64-pc-linux-gnu-gcc  -pipe -Wl,-fuse-ld=bfd implicitly enables -fstack-protector... armv7a-hardfloat-linux-gnueabi-nm: conftest.o: File format not recognized

It was using my x86_64 GCC to compile the test program, but would take the armv7a NM to read the symbol information out of the resulting object file, which would fail perfectly.
Invoking crossdev like this
Code:
NM=x86_64-pc-linux-gnu-nm crossdev --b =2.25.1-r1 --g =5.4.0 --k =4.6 --l =2.23-r2 --target armv7a-hardfloat-linux-gnueabi
gets me further.

Now it complains about
Code:
../sysdeps/arm/sysdep.h:49:4: error: #error unknown arm architecture
which is the result of a GCC macro that cannot expand to any sane value on my x86_64 machine - I tried to set the value of this macro by hand via
Code:
CFLAGS="-D__ARM_ARCH=7" NM=x86_64-pc-linux-gnu-nm crossdev --show-fail-log --b =2.25.1-r1 --g =5.4.0 --k =4.6 --l =2.23-r2 --target armv7a-hardfloat-linux-gnueabi
but can't get any success. I remember crossdev working perfectly earlier on, but now it seems that stuff is broken, most likely it is glibc itself, not crossdev who is the troublemaker.

Has any of you already had an issue like this, or does anyone have a clue what could be the reason?
Any help is highly appreciated!!!
_________________
There's no stupid questions, only stupid answers.


Last edited by dr_wulsen on Sat Oct 15, 2016 8:30 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 21, 2016 1:07 pm    Post subject: Reply with quote

Author Message
dr_wulsen,

Its worked for me in the past, just with
Code:
crossdev -t armv7a-hardfloat-linux-gnueabi

You may not get gcc-5.4 though. It was only building 5.3 a week ago.
_________________
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
dr_wulsen
n00b
n00b


Joined: 21 Aug 2013
Posts: 72
Location: Beautiful Austria, Lake area in Upper Austria

PostPosted: Tue Jun 21, 2016 2:57 pm    Post subject: Thank you for your support Neddy Reply with quote

It's great to get a reply so quick and focused on the matter, even crossdev still refuses to work it is a joy to be running gentoo and having people like you around. Thanks.

It would fail with your suggestion, so I thought to try the stable branch. Usual errors as reported before, now a
Code:
NM='/usr/x86_64-pc-linux-gnu/binutils-bin/2.25.1/nm' FEATURES="${FEATURES} -ccache" crossdev -S -t armv7a-hardfloat-linux-gnueabi
is running and I'm hoping for the best...I'll update this post after my cigarette.

Just thought that crossdev would manage to replace CFLAGS, LDFLAGS and stuff, so it would use the correct tools - for whatever reason this is not working on my machine.....could it be my exhaustive make.conf?

Code:
CHOST="x86_64-pc-linux-gnu"
CPU="-march=core2 -mcx16 -mfxsr -msahf -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1"
GRAPHITE="-floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize"
CFLAGS="-pipe -O2 -fomit-frame-pointer"
#CFLAGS="${CPU} -pipe -O2 -fomit-frame-pointer -mtls-dialect=gnu2 ${GRAPHITE}"
CXXFLAGS="${CFLAGS}"
LDFLAGS="${CFLAGS}"
####

ACCEPT_KEYWORDS="amd64"
CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3"
USE_SYSTEM="-ipv6 systemd graphite lto threads ccache jit"
USE_X="X acpi branding jpeg tiff png glamor opengl"
USE_CINNAMON="pulseaudio ffmpeg cups dbus networkmanager upower policykit gtk gtk3 -colord -gnome"
USE_USERLAND="exif fuse archive cdda mtp vdpau truetype type1 cleartype corefonts"
USE="${USE_SYSTEM} ${USE_X} ${USE_CINNAMON} ${USE_USERLAND}"
####

PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
DISTDIR="/mnt/daten/distfiles"
PORT_LOGDIR="/var/log/portage/"
PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="save"
####

GENTOO_MIRRORS="http://tux.rainside.sk/gentoo/ http://gentoo.mirror.web4u.cz/"
####

EMERGE_DEFAULT_OPTS="--verbose --jobs=3 --load-average=4 --quiet-build=y --color=y --keep-going"
MAKEOPTS="-j5 -l4"
PORTAGE_NICENESS="5"
PORTAGE_IONICE_COMMAND="ionice -c 1 -p \${PID}"
####

FEATURES="clean-logs cgroup sandbox parallel-install parallel-fetch unmerge-orphans ccache"
####

CCACHE_DIR="/var/tmp/portage/ccache"
CCACHE_TEMPDIR="/var/tmp/portage/ccache"
CCACHE_COMPRESS="true"
CCACHE_MAXSIZE="2G"
####

GRUB_PLATFORMS="pc"
LINGUAS="en de"
VIDEO_CARDS="nouveau"
ALSA_CARDS="hda-intel"
INPUT_DEVICES="evdev"
####

PYTHON_TARGETS="python3_4 python2_7"
PYTHON_SINGLE_TARGET="python2_7"
####

source /var/lib/layman/make.conf
SANE_BACKENDS="hp"


Any help is appreciated - by the way, where should I ship the beer to, so you will get it?
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 21, 2016 3:19 pm    Post subject: Reply with quote

Author Message
dr_wulsen,

I don't have the Graphite stuff, just -O2.
Maybe drop them?

I can't test on amd64 until Sunday at best.

There's no beer required but thank you for the offer.
Helping on the forums, with other peoples breakages, saves me from breaking my own Gentoo.
_________________
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
dr_wulsen
n00b
n00b


Joined: 21 Aug 2013
Posts: 72
Location: Beautiful Austria, Lake area in Upper Austria

PostPosted: Tue Jun 21, 2016 4:00 pm    Post subject: A beer and a few cigarettes later Reply with quote

Hi Neddy,
and thanks for your support!

I've aleady had commented out the graphite stuff in my make.conf as I posted it, so actually it should be using
Code:
CFLAGS="-pipe -O2 -fomit-frame-pointer"

Also the log file shows only the basic CFLAGS being used, so this should not mess with it.

Funneh thing is, when running my main box on unstable, it did work quite well to create the cross-toolchain. After the last apocalypse, I decided to switch to stable.
That breakdown was an enlightening thing, as I found that "-march=core2" which I use instead of "native" for cross-compiling, wouldn't give the same as native. Thus the big bunch of "CPU" in my CFLAGS.

Also trying with a disabled CCACHE results in the same....I'm quite in corn-fusion about where I went wrong so now crossdev will not do what I want anymore.
I've had it with my unstable/testing system, that I had to remove any -march option from CFLAGS, as posted on the Raspberry Pi3 thread.

Edit: I retried with a make conf tailored to this:
Code:
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
LDFLAGS="${CFLAGS}"
####

ACCEPT_KEYWORDS="amd64"
CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3"
USE=""
####

PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
DISTDIR="/mnt/daten/distfiles"
PORT_LOGDIR="/var/log/portage/"
PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="save"
####

GENTOO_MIRRORS="http://tux.rainside.sk/gentoo/ http://gentoo.mirror.web4u.cz/"
####

EMERGE_DEFAULT_OPTS="--verbose --jobs=1 --load-average=4 --quiet-build=y --color=y --keep-going"
MAKEOPTS="-j1 -l4"
####

FEATURES="clean-logs cgroup sandbox parallel-install parallel-fetch unmerge-orphans -ccache"
####

source /var/lib/layman/make.conf
But the result stays the same.

Edit: A thought that came to me - can it be derived from the fact that now I'm running a multilib-enabled system, as opposed to my testing system which was no-multilib AMD64?

The error I am running into now is:
../sysdeps/arm/sysdep.h:53:5: error: "__ARM_ARCH" is not defined [-Werror=undef] and I can't figure out how to pass a -D__ARCH_ARM=7 to gcc so it would just continue...[/b]
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
dr_wulsen
n00b
n00b


Joined: 21 Aug 2013
Posts: 72
Location: Beautiful Austria, Lake area in Upper Austria

PostPosted: Fri Oct 14, 2016 2:06 pm    Post subject: Solved Reply with quote

After some time passed, I took out my RPi2 again... And with the **9999 version of crossdev it built successfully, but only after my usual procedure of removing "march=core2" from my host make.conf

Admin, can you please close this as Resolved?
Thanks!
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14184

PostPosted: Sat Oct 15, 2016 12:26 am    Post subject: Reply with quote

It is traditional for the OP to mark it resolved without administrative help. Edit the post which started the thread and change the title to include a SOLVED marker.
Back to top
View user's profile Send private message
dr_wulsen
n00b
n00b


Joined: 21 Aug 2013
Posts: 72
Location: Beautiful Austria, Lake area in Upper Austria

PostPosted: Sat Oct 15, 2016 8:31 am    Post subject: Reply with quote

sorry, didn't realize that it'd be so easy. Thanks for your kind reply to my stupid request :)
_________________
There's no stupid questions, only stupid answers.
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