Use :standard in dune flags stanza#44
Merged
xguerin merged 1 commit intoxguerin:masterfrom Nov 11, 2025
Merged
Conversation
Owner
|
This PR looks fine. However, I fail to see how an include path can cause the linker to fail. I'm gonna check your setup on my end to see what's going on. |
Contributor
Author
|
I build on Fedora 43 x86_64. Either adding -fPIC in flags or remove the flags stanza will work. |
Owner
|
Would adding |
The flags without `:standard` causes compilation error on OCaml 5.4.0 and gcc (GCC) 15.2.1 20251022 (Red Hat 15.2.1-3) Log: ``` File "src/dune", lines 1-8, characters 0-162: 1 | (library 2 | (name bitstring) 3 | (public_name bitstring) 4 | (foreign_stubs 5 | (language c) 6 | (names bitstring_fastpath) 7 | (flags -I.)) 8 | (libraries str unix stdlib-shims)) /usr/bin/ld: src/bitstring_fastpath.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status ```
Contributor
Author
Sounds great. I didn't know the |
xguerin
approved these changes
Nov 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The include flag causes compilation error on OCaml 5.4.0 and gcc (GCC) 15.2.1 20251022 (Red Hat 15.2.1-3)
Log: