Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 763606 - cross-or1k-linux-musl/linux-headers-5.10::portage-crossdev failed(setup phase): Package unsupported for unknown
Summary: cross-or1k-linux-musl/linux-headers-5.10::portage-crossdev failed(setup phase...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-04 22:55 UTC by adam
Modified: 2021-01-05 23:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
zip archive with the two log files I was able to get. (or1k-error-log.zip,7.62 KB, application/zip)
2021-01-04 22:55 UTC, adam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adam 2021-01-04 22:55:12 UTC
Created attachment 681064 [details]
zip archive with the two log files I was able to get.

I was trying to get an or1k-linux-musl toolchain to compile some firmware, but it seems like it didn't work correctly. aarch64-linux-musl worked fine however, but I happen to need both. I've attached the log files it the error message told me to.

I was building the cross-toolchain on an AMD64 system for an ARM64 system, using the command "sudo crossdev --target or1k-linux-musl"
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-05 22:28:51 UTC
linux-headers (via kernel-2.eclass) does not recognise openrisc targets yet.

What kind of firmware is that? Do you need to build openrisc userspace as well?
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-05 22:30:09 UTC
Actually, H_SUPPORTEDARCH="openrisc". Maybe it's only a matter of a few crossdev variables.

But the question still stands: do you need to build openrisc userspace as well?
Comment 3 Larry the Git Cow gentoo-dev 2021-01-05 23:01:41 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8ed334c4a1f2a9802f898663b3facac5ec15e01

commit f8ed334c4a1f2a9802f898663b3facac5ec15e01
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-01-05 22:40:59 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-01-05 23:01:37 +0000

    toolchain-funcs.eclass: fix or1k* tuple detection
    
    Before the change the only recognised CHOST was 'or1k'.
    After the change CHOSTs like 'or1k-linux-musl' are
    also recognised as 'openrisc'.
    
    Reported-by: adam@pimentel.space
    Bug: https://bugs.gentoo.org/763606
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/tests/toolchain-funcs.sh | 3 ++-
 eclass/toolchain-funcs.eclass   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-05 23:16:52 UTC
With #comment3 the toolchain seems to be able to get even c++ userspace working:

$ cat a.c
#include <iostream>

int main() { std::cout << "hi!\n"; }
$ or1k-linux-musl-g++ a.c -o a

$ LD_LIBRARY_PATH=/usr/lib/gcc/or1k-linux-musl/10.2.0/ qemu-or1k -L /usr/or1k-linux-musl/ ./a
hi!
$ file a
a: ELF 32-bit MSB pie executable, OpenRISC, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-or1k.so.1, not stripped

I hope it will help you get the toolchain.