#7189 make check is failed
Closed: fixed 6 years ago Opened 6 years ago by slev.

After successful build make check is failed with the next error log

make  t_hotp
make[4]: Entering directory `/usr/src/RPM/BUILD/freeipa-4.6.1/daemons/ipa-slapi-plugins/libotp'
x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../..  -I./../common -DUSE_OPENLDAP -I/usr/include/dirsrv   -I/usr/include/nspr   -I/usr/include/nspr   -I/usr/include/nss -I/usr/include/nspr    -I/usr/include/nspr   -I/usr/include/nss -I/usr/include/nspr    -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Werror-implicit-function-declaration  -pipe -Wall -g -O2 -Werror=implicit-function-declaration -c -o t_hotp.o t_hotp.c
/bin/sh ../../../libtool  --tag=CC   --mode=link x86_64-alt-linux-gcc  -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Werror-implicit-function-declaration  -pipe -Wall -g -O2 -Werror=implicit-function-declaration   -o t_hotp t_hotp.o -lplds4 -lplc4 -lnspr4 -lpthread -ldl   -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl   libhotp.la 
libtool: link: x86_64-alt-linux-gcc -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Werror-implicit-function-declaration -pipe -Wall -g -O2 -Werror=implicit-function-declaration -o t_hotp t_hotp.o  -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl ./.libs/libhotp.a 
/usr/bin/ld: ./.libs/libhotp.a(hotp.o): undefined reference to symbol 'PR_htonll'
/usr/lib64/gcc/x86_64-alt-linux/6/../../../../lib64/libnspr4.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [t_hotp] Error 1
make[4]: Leaving directory `/usr/src/RPM/BUILD/freeipa-4.6.1/daemons/ipa-slapi-plugins/libotp'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/usr/src/RPM/BUILD/freeipa-4.6.1/daemons/ipa-slapi-plugins/libotp'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/usr/src/RPM/BUILD/freeipa-4.6.1/daemons/ipa-slapi-plugins'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/usr/src/RPM/BUILD/freeipa-4.6.1/daemons'
make: *** [check-recursive] Error 1
make: Leaving directory `/usr/src/RPM/BUILD/freeipa-4.6.1'

File /usr/lib64/gcc/x86_64-alt-linux/6/../../../../lib64/libnspr4.so is in and provides 'PR_htonll'.

Workaround is patch daemons/ipa-slapi-plugins/libotp/Makefile.am

-t_hotp_LDADD = $(NSPR_LIBS) $(NSS_LIBS) libhotp.la
+t_hotp_LDADD = $(NSPR_LIBS) $(NSS_LIBS) libhotp.la $(NSPR_LIBS)

But i guess it's not a proper way.


What version of NSPR do you have? This is a public function:

NSPR_API(PRUint64) PR_htonll(PRUint64);

I'm not sure why the include would be there but not the symbol.

Sorry, I read this too quickly the first time.

I suspect that the libraries should be listed after the object as is your workaround.

Something like:

$ git diff
diff --git a/daemons/ipa-slapi-plugins/libotp/Makefile.am b/daemons/ipa-slapi-plugins/libotp/Ma
kefile.am
index e7525f3..1e209e7 100644
--- a/daemons/ipa-slapi-plugins/libotp/Makefile.am
+++ b/daemons/ipa-slapi-plugins/libotp/Makefile.am
@@ -15,4 +15,4 @@ libotp_la_LIBADD = libhotp.la

check_PROGRAMS = t_hotp
TESTS = $(check_PROGRAMS)
-t_hotp_LDADD = $(NSPR_LIBS) $(NSS_LIBS) libhotp.la
+t_hotp_LDADD = libhotp.la $(NSPR_LIBS) $(NSS_LIBS)

Did my patch work for you?

Metadata Update from @pvoborni:
- Issue set to the milestone: FreeIPA 4.6.2

6 years ago

Metadata Update from @cheimes:
- Issue assigned to cheimes

6 years ago

master:

  • ba037a3 libotp: add libraries after objects

Metadata Update from @cheimes:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

6 years ago

ipa-4-6:

  • 40c9838 libotp: add libraries after objects

Login to comment on this ticket.

Metadata