Repository navigation
Replace -rpath= with -rpath, in build.rs - #8
Merged
Merged
Conversation
`-rpath=` seems to be a GNUism, if the linker is clang it will fail
with:
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "/cga/target/debug/build/cga/a45e97d9ccb012a1/out/rustc5X5Kvd/symbols.o" "<111 object files omitted>" "/cga/target/debug/build/serde_json/67eac2c3d529bfff/out/libserde_json-67eac2c3d529bfff.rlib" "/cga/target/debug/build/itoa/b75844b8c5c153be/out/libitoa-b75844b8c5c153be.rlib" "/cga/target/debug/build/zmij/bfe4c29a36ebaf4f/out/libzmij-bfe4c29a36ebaf4f.rlib" "/cga/target/debug/build/cga_analysis/66443152dc116db6/out/libcga_analysis-66443152dc116db6.rlib" "/cga/target/debug/build/itertools/b563f68ede7abee1/out/libitertools-b563f68ede7abee1.rlib" "/cga/target/debug/build/either/5bc9d9c01a3b73fb/out/libeither-5bc9d9c01a3b73fb.rlib" "/cga/target/debug/build/lazy-regex/12a72edadb34fe98/out/liblazy_regex-12a72edadb34fe98.rlib" "/cga/target/debug/build/regex/872e0fac336f9a00/out/libregex-872e0fac336f9a00.rlib" "/cga/target/debug/build/regex-automata/92fbd1cdc09d75f1/out/libregex_automata-92fbd1cdc09d75f1.rlib" "/cga/target/debug/build/aho-corasick/88978503055d2191/out/libaho_corasick-88978503055d2191.rlib" "/cga/target/debug/build/memchr/c9c1598db75d5ae4/out/libmemchr-c9c1598db75d5ae4.rlib" "/cga/target/debug/build/regex-syntax/af1b16545c3a3beb/out/libregex_syntax-af1b16545c3a3beb.rlib" "/cga/target/debug/build/once_cell/55d28c4bd098a7ad/out/libonce_cell-55d28c4bd098a7ad.rlib" "/cga/target/debug/build/cga_data/d84172bba3b16b90/out/libcga_data-d84172bba3b16b90.rlib" "/cga/target/debug/build/serde/dc26601c252d5c9e/out/libserde-dc26601c252d5c9e.rlib" "/cga/target/debug/build/serde_core/5ede9758a343bcc3/out/libserde_core-5ede9758a343bcc3.rlib" "/cga/target/debug/build/indexmap/608b0c0307a87086/out/libindexmap-608b0c0307a87086.rlib" "/cga/target/debug/build/equivalent/ce6bc52b17163e3d/out/libequivalent-ce6bc52b17163e3d.rlib" "/cga/target/debug/build/hashbrown/c00f972516958982/out/libhashbrown-c00f972516958982.rlib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/librustc_driver-94552c7fba21bce4.dylib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-*.rlib" "-lSystem" "-lSystem" "-lobjc" "-framework" "Foundation" "-lz" "-lLLVM" "-lc++" "-liconv" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/cga/target/debug/build/cga/a45e97d9ccb012a1/out/cga_driver" "-Wl,-dead_strip" "-nodefaultlibs" "-Wl,-rpath=<sysroot>/lib"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: ld: unknown options: -rpath=/.rustup/toolchains/nightly-2026-10-18-aarch64-apple-darwin/lib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Contributor
|
Looks good to me. I cannot reproduce this easily on Linux as GCC and Clang as a wrapper change the rpath to the correct format silently. On Mac OS ldd seems to be invoked directly without a wrapper. Applying this change on Linux does not break it in any case. |
felipebalbi
approved these changes
Nov 10, 2026
felipebalbi
left a comment
There was a problem hiding this comment.
Looks like we need CI running on windows, mac, and linux for this ;-)
kurtjd
approved these changes
Nov 10, 2026
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.
-rpath=seems to be a GNUism, if the linker is clang it will fail with: