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

mandrel: update to 23.0.1.2; update revdeps #45056

Merged
merged 3 commits into from
Aug 3, 2023

Conversation

icp1994
Copy link
Contributor

@icp1994 icp1994 commented Jul 15, 2023

Testing the changes

  • I tested the changes in this PR: briefly (built jet, included in PR)

Local build testing

  • I built this PR locally for my native architecture: x86_64

cc @leahneukirchen

@icp1994
Copy link
Contributor Author

icp1994 commented Jul 15, 2023

I'm not sure the patch is necessary. The source file it patched was completely removed with it's parent dir. Found some similar code at substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/libc/HostedMuslLibC.java

@leahneukirchen
Copy link
Member

The patch is needed if it links musl statically else (easy to verify).

Please also rebuild Babashka.

@icp1994
Copy link
Contributor Author

icp1994 commented Jul 16, 2023

The patch is needed if it links musl statically else (easy to verify).

Does that require a musl system to verify?

@leahneukirchen
Copy link
Member

2023-07-16T11:06:37.4448375Z => babashka-1.3.181_1: running post-install hook: 06-strip-and-debug-pkgs ...
2023-07-16T11:06:37.8129728Z    Stripped static executable: /usr/bin/bb

We want this dynamically linked.

@icp1994 icp1994 force-pushed the mandrel branch 2 times, most recently from d4c3c07 to c485f2e Compare August 2, 2023 21:04
@leahneukirchen
Copy link
Member

Something is wrong, bb and jet are still static binaries on x86_64-musl.

@icp1994
Copy link
Contributor Author

icp1994 commented Aug 3, 2023

I'm a bit stumped. There's a BABASHKA_STATIC envvar that's being exported in these templates which add's --static to the native-image build args. See Jet for example. If I patch that arg out from the compile scripts, I get:

=> jet-0.6.26_1: running post-install hook: 06-strip-and-debug-pkgs ...
   Stripped executable: /usr/bin/jet
=> ERROR: jet-0.6.26_1: non-PIE executable found in PIE build: /usr/bin/jet
=> ERROR: jet-0.6.26_1: post-install_06-strip-and-debug-pkgs: 'find ${PKGDESTDIR} -type f' exited with 1

@leahneukirchen
Copy link
Member

Hmm, looks like the linker doesn't get passed fPIE or so.

@leahneukirchen
Copy link
Member

You need to patch /mandrel-mandrel-23.0.0.0-Final/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/libc/HostedMuslLibC.java getAdditionalLinkerOptions which hard-codes -no-pie.

@leahneukirchen
Copy link
Member

ugh, I just now saw the TEXTREL comment there -.- perhaps we actually wanna static link. sorry.

@leahneukirchen
Copy link
Member

Indeed, bb builds fine as PIE executable but segfaults on startup with musl.

So let's scrap that, sorry for the distraction.

@leahneukirchen
Copy link
Member

Then this is good to go, I think!

@icp1994
Copy link
Contributor Author

icp1994 commented Aug 3, 2023

Do you want me to remove the musl.patch file again then? I don't think it's doing anything we need.

@leahneukirchen
Copy link
Member

Okay, but please keep the line that non-static is broken on musl.

@icp1994 icp1994 changed the title mandrel: update to 23.0.0.0. mandrel: update to 23.0.1.2; update revdeps Aug 3, 2023
@leahneukirchen leahneukirchen merged commit b66fc36 into void-linux:master Aug 3, 2023
8 checks passed
@icp1994 icp1994 deleted the mandrel branch August 3, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants