anderslanglands / bbl-build-rs

Apache License 2.0
1 stars 2 forks source link

Recent changes broke linux shared object linking (`cdylib`) #1

Open expenses opened 10 months ago

expenses commented 10 months ago

Just thought I'd like you know that d2c25a639905aefbe2bcbc3c5761faf5897977c4 broke the linking of my https://github.com/expenses/usd-iroh-resolver project. It's not a big deal, I can use fa760a565c2c1c84e25cc8704bfacd39107b7ef7 for now.

= note: /usr/bin/ld: /home/ashley/projects/usd-http-plugin/target/release/build/bbl-usd-8d5f057e31a471f8/out/build/libopenusd-c.a(openusd-c.cpp.o): relocation R_X86_64_TPOFF32 against '__tls_guard' 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

expenses commented 10 months ago

Easily fixed by adding -DCMAKE_POSITION_INDEPENDENT_CODE=ON. I'll close this when I figure out how to add that as an environment variable.

anderslanglands commented 10 months ago

I think we should just enable this by default for Linux.

On Sun, 21 Jan 2024 at 14:55, Ashley @.***> wrote:

Easily fixed by adding -DCMAKE_POSITION_INDEPENDENT_CODE=ON. I'll close this when I figure out how to add that as an environment variable.

— Reply to this email directly, view it on GitHub https://github.com/anderslanglands/bbl-build-rs/issues/1#issuecomment-1902793810, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOYQXN5FAEO47L5Q4CQYJTYPWMHFAVCNFSM6AAAAABB2SK6VSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSG44TGOBRGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>