void-linux / xbps

The X Binary Package System (XBPS)
https://voidlinux.org/xbps/
Other
821 stars 124 forks source link

Undefined reference to `archive_*` functions #550

Closed abrendtro closed 1 year ago

abrendtro commented 1 year ago

I have libarchive installed on my system, along with header files. XBPS fails to link main.o, reporting undefined references even though /usr/local/lib/libarchive.so exists

classabbyamp commented 1 year ago

do you have pkg-config and libarchive's pc file installed?

https://github.com/void-linux/xbps/blob/master/configure#L688-L702

abrendtro commented 1 year ago

Yep:

$ pkg-config --cflags --libs libarchive
-I/usr/local/include -L/usr/local/lib -larchive
classabbyamp commented 1 year ago

can you post a make log after configuring with --verbose? or at least the actual errors?

abrendtro commented 1 year ago

I'm sorry for the (very) late reply. I haven't used XBPS since then, but the build works on Ubuntu (after removing -Werror)