I'm right now linking libgit2, the problem is that...
# kotlin-native
j
I'm right now linking libgit2, the problem is that in WSL, the version is pretty old so I built it myself. The problem is that now I don't know how to link the newly built library in the linker ops as it seems to ignore my -L
Copy code
Before:
linkerOpts.linux = -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu -lgit2
After:
linkerOpts.linux = -L/usr/lib64 -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu -lgit2
And I can see it in
ldconfig -v | grep -C3 libgit
(libgit2.so.1.0 -> libgit2.so.1.0.0). What am I missing?
I can see that
libgit2.so.0 -> libgit2.so.0.19.0
, not sure if I need to remap it to point to the new version. And if I need it, I don't know how.
I could do it by pointing the symbolic link to the new lib, is there any way to not have to do this? (Or even embed the library with the executable)
d
Maybe reorder the
-L
arguments?
-L/usr/local/lib
should come either first or last.
j
I tried adding it in all the positions, also adding -lgit2 right after
-L/usr/local/lib
as I read in one comment that the order might matter, but that didn't happen
rm /usr/lib/x86_64-linux-gnu/libgit2.so.0 && sudo ln -s /usr/local/lib/libgit2.so.1.0.0 /usr/lib/x86_64-linux-gnu/libgit2.so.0
This is what I did, just removing the link to the old version and creating one to the new version