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

libtool: fix include paths when cross compiling #40606

Merged
merged 1 commit into from
Feb 26, 2023

Conversation

oreo639
Copy link
Member

@oreo639 oreo639 commented Nov 19, 2022

Testing the changes

  • I tested the changes in this PR: briefly

@dkwo Can you test this? (whenever you are available ofc)

@dkwo
Copy link
Contributor

dkwo commented Nov 19, 2022

Thanks for looking into this. I've crossbuilt the package, I can install it on my aarch64 machine, but how do I make sure it is used in the build chroot when building ntl? I tried to build ntl in /tmp, but it fails before reaching that point.

@oreo639
Copy link
Member Author

oreo639 commented Nov 19, 2022

You can build libtool as cross, then build it as native, then replace the native package with the cross package in your hostdir/binpkgs and then try building ntl.

Also if you can share the native-build package here for comparison, that would be appreciated.

(You can also use xbps-rindex)

@dkwo
Copy link
Contributor

dkwo commented Nov 20, 2022

Sure, will do it tomorrow.

@paper42
Copy link
Member

paper42 commented Nov 20, 2022

native builds for aarch64-musl: https://vasilek.cz/repo/libtool/

@oreo639
Copy link
Member Author

oreo639 commented Nov 20, 2022

Thank you.

@oreo639 oreo639 force-pushed the libtool branch 2 times, most recently from 8a3715d to 2088d9c Compare November 20, 2022 21:05
@dkwo
Copy link
Contributor

dkwo commented Nov 21, 2022

You can build libtool as cross, then build it as native, then replace the native package with the cross package in your hostdir/binpkgs and then try building ntl.

if I do that, it gives
ERROR: libtool-2.4.7_2: SHA256 hash is not valid: Numerical result out of range
Do you know how to fix this?

@oreo639
Copy link
Member Author

oreo639 commented Nov 21, 2022

You need to do xbps-rindex -fa libtool-2.4.7_1.<arch>.xbps libltdl-2.4.7_1.<arch>.xbps libltdl-devel-2.4.7_1.<arch>.xbps
(Also make sure you copied libltdl and libltdl-devel)

@dkwo
Copy link
Contributor

dkwo commented Nov 21, 2022

Thanks, now it errors out in a different way: https://paste.c-net.org/WedgedMopping

@oreo639
Copy link
Member Author

oreo639 commented Nov 21, 2022

Is this from the latest version of the branch, just checking?

@dkwo
Copy link
Contributor

dkwo commented Nov 21, 2022

yes, it is.

@dkwo
Copy link
Contributor

dkwo commented Feb 6, 2023

Shall we try the approach suggested by @paper42 in #40980 at least for now?

@paper42
Copy link
Member

paper42 commented Feb 6, 2023

Shall we try the approach suggested by @paper42 in #40980 at least for now?

no, that's a hack that needs modifying xbps-src

@paper42 paper42 added the core core package label Feb 10, 2023
@oreo639 oreo639 force-pushed the libtool branch 5 times, most recently from aaf2d14 to 78d1a79 Compare February 15, 2023 06:07
@oreo639
Copy link
Member Author

oreo639 commented Feb 15, 2023

Alright, I think I see the issue.
libtool: link: cc -fPIC -DPIC -shared -nostdlib /usr/lib/../lib64/crti.o ... is supposed to be libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/../lib64/crti.o ...

That seems to be due to it being sed'ed to the form of CC=${CC:=c++} where that is just a regular assignment when compiled natively. (CC="g++")

The latest commit works for me with binfmt/qemu, feel free to verify when you are available @dkwo

@oreo639 oreo639 force-pushed the libtool branch 5 times, most recently from 8b3da2a to b94a5d4 Compare February 15, 2023 07:04
@oreo639 oreo639 marked this pull request as ready for review February 15, 2023 09:43
@dkwo
Copy link
Contributor

dkwo commented Feb 15, 2023

It works :) Thanks for figuring this out!

Fix library and object include paths.
Fix ntl build by directly assigning cc/cxx/etc instead of using := assignment.
@paper42 paper42 merged commit dd789b9 into void-linux:master Feb 26, 2023
@oreo639 oreo639 deleted the libtool branch February 26, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants