typelevel / typelevel-nix

Development tools for Typelevel projects
Apache License 2.0
107 stars 12 forks source link

Add `LD_LIBRARY_PATH` #74

Closed armanbilge closed 1 year ago

rossabaker commented 1 year ago

What problem are we facing here? LIBRARY_PATH is used at compile time. I haven't yet needed LD_LIBRARY_PATH, which is the runtime setting.

armanbilge commented 1 year ago

Huh, what uses LIBRARY_PATH? I don't think I've seen that before.

I'm hoping that we can remove some of the custom configuration from the http4s build, if all the envs are properly set. https://github.com/http4s/http4s/blob/4c644d4c67028519316442cbcb7798c3d0647f3d/build.sbt#L887

rossabaker commented 1 year ago

LIBRARY_PATH is used at link time. That was the only thing I needed to get the tests passing here, and I'm a little surprised they're passing now.

Does the http4s build not work without that variable?

armanbilge commented 1 year ago

Ah, my bad. LIBRARY_PATH is indeed a thing. Sorry.

https://stackoverflow.com/a/42997381

So I think the change I want to make is additive.

rossabaker commented 1 year ago

LD_LIBRARY_PATH is usually considered a hack. What specifically doesn't work without it? The binary builds but doesn't run?

armanbilge commented 1 year ago

Hmm, is it? Well I was wrong before so let me verify that it's actually needed to run it.

armanbilge commented 1 year ago

Ok very sorry for wasting your time ... it seems that everything works perfectly without all the extra configuration I was doing. Thanks for setting me straight 😅