Open trasz opened 7 years ago
odd, these pack and unpack helper functions should have been linked as part of librpc2. Maybe building the rpc2 library failed and it is now trying to link with a system installed (older) version of the library.
Bingo, that's it - libraries from older versions in /usr/local/lib/. Still, it shouldn't try to link against those, should it?
Correct, it should try to use the 'uninstalled' package config file at lib-src/rpc2/rpc2-uninstalled.pc
, but looking at that now I don't think it really does anything to force linking against the locally built version. It just adds a search path with '-L' and crosses it's fingers that it is searched before any system paths (or /usr/local/lib
).
Is there any way to make sure the correct search path is inserted in the linker command line before the system paths?
I wish I knew. I thought the current approach would do it, but looking at the link line it looks like -I/usr/local/include
and -L/usr/local/lib -L/usr/local/lib
(listed twice it seems) are somehow added to the link line before the more specific paths for the lwp
and rpc2
libraries. I have no idea why it would even need to search /usr/local
unless it happens to be for one of the readline or ncurses libraries.
The coda-src/auth2/Makefile.am
doesn't show why the /usr/local
paths would be added, everything goes through AM_CPPFLAGS and LDADD correctly. The generated makefile uses
au$(EXEEXT): ...
@rm -f au$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(au_OBJECTS) $(au_LDADD) $(LIBS)
And walking down the chain of macros it looks like /usr/local/
was for some reason specifically added to either AM_CFLAGS/AM_LDFLAGS
or CFLAGS/LDFLAGS
. We cannot supersede those search paths because the au_LDADD
variable we control will always be later in the linker command line.
On FreeBSD 12-CURRENT, trying to build it (with either make or gmake) fails like this:
[etc, lots of other missing pack and unpack symbols]