[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Circular dependency building test programs
I'm not terribly good with libtool and automake so I'm hoping someone
on the list has a suggestion for a problem I'm having (also, experience
has shown that I aways solve my problem 5 minutes after I post a message
to this list which would be great too :-)
I'm trying to link Heimdal with a library that links with Heimdal. Meaning
I have a circular dependency. Linking libraries is not a problem
since the linker doesn't try to resolve dependencies when creating
libraries. However, Heimdal's makefiles try to create a number of test
programs which *do* need to resolve the dependencies.
In particular when building roken/.libs/snprintf-test I get 'undefined
gcc <stuff> -o .libs/snprintf-test snprintf_test-snprintf-test.o \
<stuff> ./.libs/libtest.a ./.libs/libroken.so -pthread \
-l<mylibhere> -l<heimdallibshere> <morestuff>
/var/ioplex/heimdal/lib/libkrb5.so: undefined reference to `bswap16'
/var/ioplex/heimdal/lib/libkrb5.so: undefined reference to `setprogname
It seems the linker is using .libs/libroken.so which doesn't have all of
the necessary symbols required by the libkrb5 my library is linked with:
snprintf-test -> libmylib -> libkrb5 -> .libs/libroken.so (needs
to be /var/ioplex/heimdal/lib/libroken.so)
Ideally I would prefer to simply not build any test programs at all. Then
I would only need to add the LIBS necessary to link the libraries and
So is there any option to NOT build test programs?
Or perhaps there's a way to specify different options for linking
executables so that I can leave out the link to my lib?
Michael B Allen
PHP Active Directory SPNEGO SSO