Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crossdev insists on ignoring libc version
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
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 7:10 am    Post subject: crossdev insists on ignoring libc version Reply with quote

Greetings,

I'm trying to create a crossdev for aarch64 using musl libc, I want to use the stable version but for some reason, crossdev wants the dev version.
why is that?

Code:

NCC-5001-D usr # crossdev --stable -v -t aarch64-unknown-linux-musl -oS musl,ODROID-C2,portage-crossdev
--------------------------------------------------------------------------------------------------------------------------------------------------------
 * crossdev version:      20160602
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm64
 * Target System:         aarch64-unknown-linux-musl
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  arm64

 * binutils:              binutils-[stable]
 * gcc:                   gcc-[stable]
 * headers:               linux-headers-[stable]
 * libc:                  musl-[stable]

 * CROSSDEV_OVERLAY:      /mnt/portage/tree/overlay/portage-crossdev
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:   
 * Portage flags:          -v
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  - 
 * leaving sys-devel/binutils in /mnt/portage/tree/overlay/portage-crossdev
 * leaving sys-devel/gcc in /mnt/portage/tree/overlay/portage-crossdev
 * leaving sys-kernel/linux-headers in /mnt/portage/tree/overlay/portage-crossdev
 * leaving sys-libs/musl in /mnt/portage/tree/overlay/portage-crossdev
 * leaving sys-devel/gdb in /mnt/portage/tree/overlay/portage-crossdev
 * leaving metadata/layout.conf alone in /mnt/portage/tree/overlay/portage-crossdev
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -   
 * Log: /var/log/portage/cross-aarch64-unknown-linux-musl-binutils.log
 * Emerging cross-binutils ...

These are the packages that would be merged, in order:

Calculating dependencies  .... done!

Total: 0 packages, Size of downloads: 0 KiB
                                                                                                                                                                                                                   [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-musl-linux-headers-quick.log
 * Emerging cross-linux-headers-quick ...

These are the packages that would be merged, in order:

Calculating dependencies  ... done!

Total: 0 packages, Size of downloads: 0 KiB
                                                                                                                                                                                                                   [ ok ]
 * Log: /var/log/portage/cross-aarch64-unknown-linux-musl-musl-headers.log
 * Emerging cross-musl-headers ...

These are the packages that would be merged, in order:

[ebuild  N    *] cross-aarch64-unknown-linux-musl/musl-9999::crossdev  0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by cross-aarch64-unknown-linux-musl/musl (argument)
=cross-aarch64-unknown-linux-musl/musl-9999 **

NOTE: The --autounmask-keep-masks option will prevent emerge
      from creating package.unmask or ** keyword changes.

Use --autounmask-write to write changes to config files (honoring
CONFIG_PROTECT). Carefully examine the list of proposed changes,
paying special attention to mask or keyword changes that may expose
experimental or unstable packages.

 * error: musl failed :(
 *
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-aarch64-unknown-linux-musl-info.log
 * /var/log/portage/cross-aarch64-unknown-linux-musl-musl-headers.log.xz
 * /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl*/temp/musl-config.logs.tar.xz



Removed excessive separators to make the post easier to read.
-- NeddySegoon

_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1431

PostPosted: Sat Aug 19, 2017 8:10 am    Post subject: Reply with quote

Code:
grep -r arm /usr/portage/sys-libs/musl/     
/usr/portage/sys-libs/musl/musl-9999.ebuild:   KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
/usr/portage/sys-libs/musl/musl-1.1.16.ebuild:   KEYWORDS="-* amd64 arm ~mips ppc x86"
/usr/portage/sys-libs/musl/musl-1.1.15-r2.ebuild:   KEYWORDS="-* amd64 arm ~mips ppc x86"

Keyword arm64 is missing. Some other packages use it, so I suppose this would be the correct tag for your case, if it was available.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 8:14 am    Post subject: Reply with quote

szatox wrote:
Code:
grep -r arm /usr/portage/sys-libs/musl/     
/usr/portage/sys-libs/musl/musl-9999.ebuild:   KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
/usr/portage/sys-libs/musl/musl-1.1.16.ebuild:   KEYWORDS="-* amd64 arm ~mips ppc x86"
/usr/portage/sys-libs/musl/musl-1.1.15-r2.ebuild:   KEYWORDS="-* amd64 arm ~mips ppc x86"

Keyword arm64 is missing. Some other packages use it, so I suppose this would be the correct tag for your case, if it was available.

imho in that case, the error would have been different, e.g. no supported arch or like.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1431

PostPosted: Sat Aug 19, 2017 8:30 am    Post subject: Reply with quote

Maybe the error should indeed be different, but emerge's default setting is to lower its quality expectation all the way to #masked (inclusive) until it finds a match and then suggest unmasking it.
I'm not familiar with aarch64 (hint: keywords), but this behaviour is nothing new even on amd64 when you have such exotic software like blueman installed. :sad-panda-face:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 19, 2017 9:57 am    Post subject: Reply with quote

DaggyStyle,

That's a portage feature. It wants a package that is not keyworded for arm64.
The advice from portage is poor/incorrect.
Take the hint and keyword the version of cross-aarch64-unknown-linux-musl/musl you want.

After playing with arm64 on a Raspberry Pi 3, I'll say that you probably don't want stable.
Outside the @system set, its ~arm64 or not keyworded at all.

What hardware do you have?
_________________
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
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 10:35 am    Post subject: Reply with quote

NeddySeagoon wrote:
DaggyStyle,

That's a portage feature. It wants a package that is not keyworded for arm64.
The advice from portage is poor/incorrect.
Take the hint and keyword the version of cross-aarch64-unknown-linux-musl/musl you want.

After playing with arm64 on a Raspberry Pi 3, I'll say that you probably don't want stable.
Outside the @system set, its ~arm64 or not keyworded at all.

What hardware do you have?


Greetings,

I just want musl as stable.
I have a odroidc2
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 19, 2017 11:20 am    Post subject: Reply with quote

DaggyStyle,

There is no stable musl for arm64 yet.

The portage message
Code:
 =cross-aarch64-unknown-linux-musl/musl-9999 **
shows that musl is not keyworded at all for arm64.
Maybe you are the first to try it?

Pick a version you like and keyword 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
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 12:58 pm    Post subject: Reply with quote

I see, ok, will try.

still this scenario must be msged properly as it caused me to waste 3 hours for nothing...
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 1:10 pm    Post subject: Reply with quote

btw, is there away to instruct the crossdev to select the ebuilds from specific overlays? I want it to use the musl overlay as first priority.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 19, 2017 1:19 pm    Post subject: Reply with quote

DaggyStyle,

Your /etc/portage/repos.conf/* files contain an entry for each repro you have installed.
They should all contain a priority = entry.

emerge --info will include something like
Code:

Repositories:

[gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.10.119/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --exclude=metadata/cache

gentoo_static
    location: /usr/local/gentoo-static
    masters: gentoo
    priority: 0

static_overlay
    location: /usr/local/portage
    masters: gentoo
    priority: 1

palemoon
    location: /var/lib/layman/palemoon
    masters: gentoo
    priority: 50


The priority is used as a tie breaker when several repros offer the same version of a package.
_________________
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
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 1:27 pm    Post subject: Reply with quote

NeddySeagoon wrote:
DaggyStyle,

Your /etc/portage/repos.conf/* files contain an entry for each repro you have installed.
They should all contain a priority = entry.

emerge --info will include something like
Code:

Repositories:

[gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.10.119/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --exclude=metadata/cache

gentoo_static
    location: /usr/local/gentoo-static
    masters: gentoo
    priority: 0

static_overlay
    location: /usr/local/portage
    masters: gentoo
    priority: 1

palemoon
    location: /var/lib/layman/palemoon
    masters: gentoo
    priority: 50


The priority is used as a tie breaker when several repros offer the same version of a package.


problem is, I want it to affect only the cross compiler not the host system.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 1:28 pm    Post subject: Reply with quote

spoke to soon, the cross compiler has it's own file.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 5:31 pm    Post subject: Reply with quote

I think that crossdev ignores my settings, I get this:
Code:
* Emerging cross-musl ...

These are the packages that would be merged, in order:

Calculating dependencies  .. ... ... done!
[ebuild   R    ] cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev  0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev
 * musl-1.1.16.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...               [ ok ]
 * getconf.c SHA256 SHA512 WHIRLPOOL size ;-) ...                        [ ok ]
 * getent.c SHA256 SHA512 WHIRLPOOL size ;-) ...                         [ ok ]
 * iconv.c SHA256 SHA512 WHIRLPOOL size ;-) ...                          [ ok ]
>>> Unpacking source...
>>> Unpacking musl-1.1.16.tar.gz to /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work
>>> Unpacking getconf.c to /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work
unpack getconf.c: file format not recognized. Ignoring.
>>> Unpacking getent.c to /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work
unpack getent.c: file format not recognized. Ignoring.
>>> Unpacking iconv.c to /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work
unpack iconv.c: file format not recognized. Ignoring.
>>> Source unpacked in /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work
>>> Preparing source in /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work/musl-1.1.16 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work/musl-1.1.16 ...
aarch64-unknown-linux-musl-gcc
checking for C compiler... aarch64-unknown-linux-musl-gcc
checking whether C compiler works... no; compiler output follows:
aarch64-unknown-linux-musl-gcc: error: unrecognized command line option ‘-msse4.1’
 * ERROR: cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev failed (configure phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line 115:  Called src_configure
 *   environment, line 2398:  Called die
 * The specific snippet of code:
 *       ./configure --target=${CTARGET} --prefix=${sysroot}/usr --syslibdir=${sysroot}/lib --disable-gcc-wrapper || die
 *
 * If you need support, post the output of `emerge --info '=cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev'`,
 * the complete build log and the output of `emerge -pqv '=cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev'`.
 * The complete build log is located at '/var/log/portage/cross-aarch64-unknown-linux-musl:musl-1.1.16:20170819-172535.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/temp/environment'.
 * Working directory: '/var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work/musl-1.1.16'
 * S: '/var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work/musl-1.1.16'

>>> Failed to emerge cross-aarch64-unknown-linux-musl/musl-1.1.16, Log file:

>>>  '/var/log/portage/cross-aarch64-unknown-linux-musl:musl-1.1.16:20170819-172535.log'

 * Messages for package cross-aarch64-unknown-linux-musl/musl-1.1.16:

 * Package:    cross-aarch64-unknown-linux-musl/musl-1.1.16
 * Repository: crossdev
 * Maintainer: blueness@gentoo.org lu_zero@gentoo.org,toolchain@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * ERROR: cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev failed (configure phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line 115:  Called src_configure
 *   environment, line 2398:  Called die
 * The specific snippet of code:
 *       ./configure --target=${CTARGET} --prefix=${sysroot}/usr --syslibdir=${sysroot}/lib --disable-gcc-wrapper || die
 *
 * If you need support, post the output of `emerge --info '=cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev'`,
 * the complete build log and the output of `emerge -pqv '=cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev'`.
 * The complete build log is located at '/var/log/portage/cross-aarch64-unknown-linux-musl:musl-1.1.16:20170819-172535.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/temp/environment'.
 * Working directory: '/var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work/musl-1.1.16'
 * S: '/var/tmp/portage/cross-aarch64-unknown-linux-musl/musl-1.1.16/work/musl-1.1.16'

 * error: musl failed :(
 *
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-aarch64-unknown-linux-musl-info.log
 * /var/log/portage/cross-aarch64-unknown-linux-musl-musl.log.xz
 * /var/tmp/portage/cross-aarch64-unknown-linux-musl/musl*/temp/musl-config.logs.tar.xz

e.g. musl is compiled with the crosscompiler but with the USE set of the native system, see
Code:
NCC-5001-D musl-1.1.16 # cat /usr/aarch64-unknown-linux-musl/etc/portage/make.conf
CHOST=aarch64-unknown-linux-musl
CBUILD=x86_64-pc-linux-gnu
ARCH=arm64

HOSTCC=x86_64-pc-linux-gnu-gcc

ROOT=/usr/${CHOST}/

ACCEPT_KEYWORDS="arm64"

USE="${ARCH} cxx multilib"

CFLAGS="-O2 -pipe -march=armv8-a+crc+fp+simd -mabi=lp64 -mcpu=cortex-a53+crc+fp+simd"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j49"
CPU_FLAGS_ARM="edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2"

FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
# Be sure we dont overwrite pkgs from another repo..
PKGDIR=${ROOT}packages/
PORTAGE_TMPDIR=${ROOT}tmp/

ELIBC="__LIBC__"

PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"
#PORTDIR_OVERLAY="/usr/portage/local/"


and crossdev seems to ignore my request to give musl overlay priority, see:
Code:
NCC-5001-D musl-1.1.16 # ll /usr/local/portage-crossdev/cross-aarch64-unknown-linux-musl/
total 0
lrwxrwxrwx 1 root root  40 Aug 19 16:36 musl -> /mnt/portage/tree/official/sys-libs/musl
lrwxrwxrwx 1 root root  51 Aug 19 16:36 linux-headers -> /mnt/portage/tree/official/sys-kernel/linux-headers
lrwxrwxrwx 1 root root  40 Aug 19 16:36 gdb -> /mnt/portage/tree/official/sys-devel/gdb
lrwxrwxrwx 1 root root  40 Aug 19 16:36 gcc -> /mnt/portage/tree/official/sys-devel/gcc
lrwxrwxrwx 1 root root  45 Aug 19 16:36 binutils -> /mnt/portage/tree/official/sys-devel/binutils
drwxr-xr-x 2 root root 176 Aug 19 16:36 .
drwxr-xr-x 6 root root 176 Aug 19 18:30 ..
NCC-5001-D musl-1.1.16 # cat /etc/portage/repos.conf/crossdev.conf

[DEFAULT]
main-repo = musl

[musl]
priority = 51
location = /var/lib/layman/musl
layman-type = git
auto-sync = No

[ODROID-C2]
priority = 50
location = /var/lib/layman/ODROID-C2
layman-type = git
auto-sync = No

[crossdev]
location = /usr/local/portage-crossdev
priority = 10
masters = gentoo
auto-sync = no


ideas?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 19, 2017 7:42 pm    Post subject: Reply with quote

DaggyStyle,

That's cross-musl.

The cross toolchain (including cross-musl) it built with the host settings.
That's correct as it runs there.

/usr/aarch64-unknown-linux-musl is the target root.
Its empty until you run
Code:
aarch64-unknown-linux-musl-emerge <packages>


The musl you build there will use the settings in /usr/aarch64-unknown-linux-musl/etc/portage/make.conf
and it will run on an arm64 system.

crossdev builds things to run on the host, that in turn will build code to run on the target.
_________________
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
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sat Aug 19, 2017 7:48 pm    Post subject: Reply with quote

Neddy,

the error log shows this:
Code:
aarch64-unknown-linux-musl-gcc: error: unrecognized command line option ‘-msse4.1’

doesn't this means that aarch64-unknown-linux-musl-gcc is used? in that case, why it needs the host's make.conf?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 19, 2017 8:00 pm    Post subject: Reply with quote

DaggyStyle'

Pastebin the entire log.
I need the command you issued too.

If you are building for arm64 on your build host, it should be using the cross toolchain. -msse4.1 would be illegal as arm64 does not have sse4.1.
Cross compiling is a bit of a minefield. Some build systems just work. Some think it will never happen and need to be coaxed, yet others are cross compile hostile.
_________________
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
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Sun Aug 20, 2017 5:58 pm    Post subject: Reply with quote

here: https://paste.pound-python.org/show/noOpNmNiiGPDKdedgyxl/
I hope this is what you've asked for.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Aug 21, 2017 1:52 pm    Post subject: Reply with quote

DaggyStyle,

I can repeat the
Code:
checking for C compiler... aarch64-unknown-linux-musl-gcc
checking whether C compiler works... no; compiler output follows:
aarch64-unknown-linux-musl-gcc: error: unrecognized command line option ‘-msse4.1’
 * ERROR: cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev failed (configure phase):


and get past it to the next error with
Code:
CFLAGS="-O2 -pipe -fomit-frame-pointer" emerge cross-aarch64-unknown-linux-musl/musl -av


That builds but fails to link with
Code:
/usr/libexec/gcc/aarch64-unknown-linux-musl/ld: cannot find Scrt1.o: No such file or directory
/usr/libexec/gcc/aarch64-unknown-linux-musl/ld: cannot find crti.o: No such file or directory
/usr/libexec/gcc/aarch64-unknown-linux-musl/ld: cannot find -lc
/usr/libexec/gcc/aarch64-unknown-linux-musl/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status


It needs -I/path/to/Scrt1.o and friends to get it past that.
_________________
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
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4776
Location: The Peanut Gallery

PostPosted: Mon Aug 21, 2017 5:16 pm    Post subject: Reply with quote

DaggyStyle wrote:
the error log shows this:
Code:
aarch64-unknown-linux-musl-gcc: error: unrecognized command line option ‘-msse4.1’

doesn't this means that aarch64-unknown-linux-musl-gcc is used? in that case, why it needs the host's make.conf?
The question is, how come the CBUILD flags are leaking through to CFLAGS.
It may just be leaking because you don't have a setting for it in the crossdev --config-root (read up on that parm for portage; afair the crossdev sysroot is the config-root by default.) Don't forget to (re)set CXXFLAGS, FCFLAGS and FFLAGS after you've set CFLAGS.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Mon Aug 21, 2017 5:24 pm    Post subject: Reply with quote

NeddySeagoon wrote:
DaggyStyle,

I can repeat the
Code:
checking for C compiler... aarch64-unknown-linux-musl-gcc
checking whether C compiler works... no; compiler output follows:
aarch64-unknown-linux-musl-gcc: error: unrecognized command line option ‘-msse4.1’
 * ERROR: cross-aarch64-unknown-linux-musl/musl-1.1.16::crossdev failed (configure phase):


and get past it to the next error with
Code:
CFLAGS="-O2 -pipe -fomit-frame-pointer" emerge cross-aarch64-unknown-linux-musl/musl -av


if I'm not mistaken, this should be the actual arch64 libc, incase I'm right, then why the cross compiler takes the data from /etc/portage/make.conf and not from /usr/aarch64-unknown-linux-musl/etc/portage/make.conf?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Aug 21, 2017 8:00 pm    Post subject: Reply with quote

DaggyStyle,

This is still the cross toolkit. Its building cross-musl on the build host using the hosts make.conf.
Its the right thing to do but it fails.
_________________
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
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5106

PostPosted: Mon Aug 21, 2017 9:00 pm    Post subject: Reply with quote

NeddySeagoon wrote:
DaggyStyle,

This is still the cross toolkit. Its building cross-musl on the build host using the hosts make.conf.
Its the right thing to do but it fails.

I understand but it tries to use incompatible cflags, imho that isn't so cross...
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4776
Location: The Peanut Gallery

PostPosted: Wed Aug 30, 2017 9:14 am    Post subject: Reply with quote

NeddySeagoon wrote:
This is still the cross toolkit. Its building cross-musl on the build host using the hosts make.conf.
Its the right thing to do but it fails.
Not sure that is the right thing to do at all; a libc should be built for the runtime CHOST. Flags for CBUILD are irrelevant (except as they relate to build-time tools, and ctype.)

A cross-compiler or binutils, ie toolchain apps in general, are the odd case: CBUILD = CHOST if we're building on the "build host", where CTARGET is the runtime CHOST for later packages' CBUILD. (All other builds do not use CTARGET.)

That's why libc is usually kept out of SYSROOT, in logical terms, though it might well be installed in SYSROOT for convenience (which is what crossdev is trying to do, by the looks of it.)
It is still not (meant to be) built in the same way as the other SYSROOT packages like compiler and binutils (which use the full triplet.)
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