Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target mipsel-unknown-linux-gnu standard libraries problem #102638

Closed
sceedy opened this issue Oct 3, 2022 · 4 comments
Closed

target mipsel-unknown-linux-gnu standard libraries problem #102638

sceedy opened this issue Oct 3, 2022 · 4 comments
Labels
C-bug Category: This is a bug. O-MIPS Target: MIPS processors

Comments

@sceedy
Copy link

sceedy commented Oct 3, 2022

Problem

I have sucessfully compiled a static librsvg for 10 targets (1 native and 9 crosses) but my last target is giving me problems.

"export RUSTFLAGS='-C target-cpu=mips32'" sorts out the code in the tarball but I still have unimplemented opcodes in the compiler libraries for target mipsel-unknown-linux-gnu (see "unimplemented opcodes.txt") i.e. opcodes for mips32r2 (i.e. mips32 version 2 as per gcc compiler default, not version 1 as per my target).
I then installed Xargo to try and produce a set of standard libraries that can be run by every processor in the supported cpu list for the target. It fails on the last step with an internal compiler error (see "rust error.txt", the ... represents every step with no error, as re-iterated in the error message).
As Xargo is based on the nightly build, if I just have to wait for the internal bug to be fixed so I can generate my own standard libraries that is fine.
rust error.txt
unimplemented opcodes.txt

Please note that my prefered solution is that the standard libraries for rust can be executed by every cpu on the supported list for the target.

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

debian@debian:~$ cargo version --verbose

cargo 1.66.0-nightly (f5fed93ba 2022-09-27)

release: 1.66.0-nightly

commit-hash: f5fed93ba24607980647962c59863bbabb03ce14

commit-date: 2022-09-27

host: x86_64-unknown-linux-gnu

libgit2: 1.5.0 (sys:0.15.0 vendored)

libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q)

os: Debian 11 (bullseye) [64-bit]

debian@debian:~$ xargo version --verbose

+ "cargo" "version" "--verbose"

cargo 1.66.0-nightly (f5fed93ba 2022-09-27)

release: 1.66.0-nightly

commit-hash: f5fed93ba24607980647962c59863bbabb03ce14

commit-date: 2022-09-27

host: x86_64-unknown-linux-gnu

libgit2: 1.5.0 (sys:0.15.0 vendored)

libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q)

os: Debian 11 (bullseye) [64-bit]

debian@debian:~$
@sceedy sceedy added the C-bug Category: This is a bug. label Oct 3, 2022
@ehuss ehuss transferred this issue from rust-lang/cargo Oct 3, 2022
@ehuss
Copy link
Contributor

ehuss commented Oct 3, 2022

Transferred the issue to rust-lang/rust as I believe this is a compiler issue.

As for the trimmed_def_paths constructed error, I believe there are several other reports of that: #102561, #100114, #99563, though I do not know if they are at all related.

@cuviper
Copy link
Member

cuviper commented Oct 3, 2022

target mipsel-unknown-linux-gnu [...] opcodes for mips32r2

We've had that cpu level since #48874, configured here:

cpu: "mips32r2".into(),
features: "+mips32r2,+fpxx,+nooddspreg".into(),

And big-endian has been mips32r2 since #31303.

@cuviper cuviper added the O-MIPS Target: MIPS processors label Oct 3, 2022
@sceedy
Copy link
Author

sceedy commented Oct 6, 2022

The nightly compiler stated to build without error yesterday (cargo configurations uploaded under 'date'.txt).
06 October 2022.txt
05 October 2022.txt
However xargo dir not build all the standard libraries so I switched to :-
cargo build -Z build-std=std,core,alloc,panic_abort --verbose --release --lib --target mipsel-humax-linux-gnu
mipsel-humax-linux-gnu.json.txt
I got what I wanted with 2 hacks

  1. crossbeam-utils-0.8.12 :: sed -i 's/crossbeam_no_atomic_64/feature = "std"/' applied to src/lib.rs src/atomic/atomic_cell.rs src/atomic/consume.rs
  2. system-deps-6.0.2 :: updated src/lib.rs to remove all checks (in order to stop ‘Invalid TARGET’ panic)
    lib.rs.diff.txt

As I am now able to generate what I want, and can generate other libraries as desired, I will be happy if you close this problem.

@cuviper
Copy link
Member

cuviper commented Oct 6, 2022

Ok, if you're satisfied, I will close this.

@cuviper cuviper closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-MIPS Target: MIPS processors
Projects
None yet
Development

No branches or pull requests

3 participants