Skip to content

libtool: fix include paths when cross compiling - #40606

Merged
paper42 merged 1 commit into
void-linux:masterfrom
oreo639:libtool
Feb 26, 2023
Merged

libtool: fix include paths when cross compiling#40606
paper42 merged 1 commit into
void-linux:masterfrom
oreo639:libtool

Conversation

@oreo639

@oreo639 oreo639 commented Nov 19, 2022

Copy link
Copy Markdown
Member

Testing the changes

  • I tested the changes in this PR: briefly

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

@dkwo

dkwo commented Nov 19, 2022

Copy link
Copy Markdown
Contributor

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

oreo639 commented Nov 19, 2022

Copy link
Copy Markdown
Member Author

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

dkwo commented Nov 20, 2022

Copy link
Copy Markdown
Contributor

Sure, will do it tomorrow.

@paper42

paper42 commented Nov 20, 2022

Copy link
Copy Markdown
Contributor

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

@oreo639

oreo639 commented Nov 20, 2022

Copy link
Copy Markdown
Member Author

Thank you.

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

dkwo commented Nov 21, 2022

Copy link
Copy Markdown
Contributor

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

oreo639 commented Nov 21, 2022

Copy link
Copy Markdown
Member Author

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

dkwo commented Nov 21, 2022

Copy link
Copy Markdown
Contributor

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

@oreo639

oreo639 commented Nov 21, 2022

Copy link
Copy Markdown
Member Author

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

@dkwo

dkwo commented Nov 21, 2022

Copy link
Copy Markdown
Contributor

yes, it is.

@dkwo

dkwo commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

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

@paper42

paper42 commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

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

oreo639 commented Feb 15, 2023

Copy link
Copy Markdown
Member Author

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

dkwo commented Feb 15, 2023

Copy link
Copy Markdown
Contributor

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.

3 participants