ATF-devel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Error "Shared object "libatf-c.so.0" not found" on NetBSD
Hello,
I am making attempts to run my atf tests on NetBSD 5.02 and I am
having some problems. I am using the following configure.ac script:
$ cat ./configure.ac
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([cryptoexamples], [0.1], [rambiusparkisanius%gmail.com@localhost])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_PATH_PROG([ATFRUN], [atf-run])
# Checks for libraries.
AC_CHECK_LIB([ssl], [SSL_library_init], [],
[AC_MSG_FAILURE([can't find openssl ssl lib])])
AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
[AC_MSG_FAILURE([can't find openssl crypto lib])])
AC_CHECK_LIB([atf-c], [atf_no_error])
# Checks for header files.
AC_CHECK_HEADER([atf-c.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
I ran my ./configure and ATF lib and headers are found correctly:
[...]
checking for atf_no_error in -latf-c... yes
[...]
checking atf-c.h usability... yes
checking atf-c.h presence... yes
checking for atf-c.h... yes
I attempted to compile my sources and tests:
$ make
make all-recursive
Making all in src
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT countnb.o -MD -MP -MF
.deps/countnb.Tpo -c -o countnb.o countnb.c
mv -f .deps/countnb.Tpo .deps/countnb.Po
gcc -g -O2 -o countnb countnb.o -latf-c -lcrypto -lssl
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT seed_prng.o -MD -MP -MF
.deps/seed_prng.Tpo -c -o seed_prng.o seed_prng.c
mv -f .deps/seed_prng.Tpo .deps/seed_prng.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT test_seed_prng.o -MD -MP
-MF .deps/test_seed_prng.Tpo -c -o test_seed_prng.o test_seed_prng.c
mv -f .deps/test_seed_prng.Tpo .deps/test_seed_prng.Po
gcc -g -O2 -o test_seed_prng seed_prng.o test_seed_prng.o -latf-c
-lcrypto -lssl
test_seed_prng.o: In function `atfu_ce_seed_prng_egd_pools_body':
/home/rambius/projects/cryptoexamples/src/test_seed_prng.c:41:
undefined reference to `ATF_REQUIRE_MSG'
test_seed_prng.o: In function `atfu_ce_seed_prng_egd_body':
/home/rambius/projects/cryptoexamples/src/test_seed_prng.c:31:
undefined reference to `ATF_REQUIRE_MSG'
test_seed_prng.o: In function `atfu_ce_seed_prng_dev_urandom_body':
/home/rambius/projects/cryptoexamples/src/test_seed_prng.c:21:
undefined reference to `ATF_REQUIRE_MSG'
test_seed_prng.o: In function `atfu_ce_seed_prng_dev_random_body':
/home/rambius/projects/cryptoexamples/src/test_seed_prng.c:11:
undefined reference to `ATF_REQUIRE_MSG'
*** Error code 1
It seems that the library in NetBSD base system is older and is
missing some functions. I installed ATF from pkgsrc:
# cd /usr/pkgsrc/devel/atf
# make describe
atf-0.10|/usr/pkgsrc/devel/atf| ...
Ok, it is the latest version. I installed it
# make install && make clean && make depends
Now I have atf-run and atf-report in /usr/pkg/bin, the headers in
/usr/pkg/include and the libs in /usr/pkg/lib:
$ ls /usr/pkg/lib/libatf*
/usr/pkg/lib/libatf-c++.a
/usr/pkg/lib/libatf-c++.la
/usr/pkg/lib/libatf-c++.so
/usr/pkg/lib/libatf-c++.so.0
/usr/pkg/lib/libatf-c++.so.0.0.0
/usr/pkg/lib/libatf-c.a
/usr/pkg/lib/libatf-c.la
/usr/pkg/lib/libatf-c.so
/usr/pkg/lib/libatf-c.so.0
/usr/pkg/lib/libatf-c.so.0.0.0
Back to my project I ran:
$ make clean distclean
$ ./configure CPPFLAGS=-I/usr/pkg/include LDFLAGS=-L/usr/pkg/lib
$ make
ATF_REQUIRE_MSG is found now I am able to build the sources now.
But when I run the tests I received the following error:
$ make check
Making check in src
make check-local
logfile=$(pwd)/check.log; fifofile=$(pwd)/check.fifo; dir=.; rm -f
${fifofile}; mkfifo ${fifofile}; cd ${dir}; cat ${fifofile} | tee
${logfile} | atf-report & atf-run >>${fifofile}; res=${?}; wait;
echo "The verbatim output of atf-run has been saved to" "${logfile};
exit code was ${res}"; test ${res} -eq 0
Tests root: /home/rambius/projects/cryptoexamples/src
Shared object "libatf-c.so.0" not found
test_seed_prng (1/2): 0 test cases
test_seed_prng: BOGUS TEST PROGRAM: Cannot trust its results because
of `Invalid format for test case list: 1: Unexpected token `<<EOF>>';
expected a
header name'
Shared object "libatf-c.so.0" not found
test_init_bf (2/2): 0 test cases
test_init_bf: BOGUS TEST PROGRAM: Cannot trust its results because of
`Invalid format for test case list: 1: Unexpected token `<<EOF>>';
expected a header
name'
Failed (bogus) test programs:
test_seed_prng, test_init_bf
Summary for 2 test programs:
0 passed test cases.
0 failed test cases.
0 expected failed test cases.
0 skipped test cases.
The verbatim output of atf-run has been saved to
/home/rambius/projects/cryptoexamples/src/check.log; exit code was 1
The relevant contents from src/check.log is
tps-count: 2
tp-start: test_seed_prng, 0
tp-end: test_seed_prng, Invalid format for test case list: 1:
Unexpected token `<<EOF>>'; expected a header name
tp-start: test_init_bf, 0
tp-end: test_init_bf, Invalid format for test case list: 1: Unexpected
token `<<EOF>>'; expected a header name
info: time.end, Wed Jul 14 00:36:29 EEST 2010
There is a message in 'make check' output that shared object
"libatf-c.so.0" is not found. Here is what I have is /usr/pkg/lib:
$ ls -l /usr/pkg/lib/libatf*
-rw-r--r-- 1 root wheel 2419018 Jul 14 00:06 /usr/pkg/lib/libatf-c++.a
-rwxr-xr-x 1 root wheel 1007 Jul 14 00:06 /usr/pkg/lib/libatf-c++.la
lrwxr-xr-x 1 root wheel 19 Jul 14 00:06
/usr/pkg/lib/libatf-c++.so -> libatf-c++.so.0.0.0
lrwxr-xr-x 1 root wheel 19 Jul 14 00:06
/usr/pkg/lib/libatf-c++.so.0 -> libatf-c++.so.0.0.0
-rwxr-xr-x 1 root wheel 1439214 Jul 14 00:06 /usr/pkg/lib/libatf-c++.so.0.0.0
-rw-r--r-- 1 root wheel 252652 Jul 14 00:06 /usr/pkg/lib/libatf-c.a
-rwxr-xr-x 1 root wheel 971 Jul 14 00:06 /usr/pkg/lib/libatf-c.la
lrwxr-xr-x 1 root wheel 17 Jul 14 00:06
/usr/pkg/lib/libatf-c.so -> libatf-c.so.0.0.0
lrwxr-xr-x 1 root wheel 17 Jul 14 00:06
/usr/pkg/lib/libatf-c.so.0 -> libatf-c.so.0.0.0
-rwxr-xr-x 1 root wheel 188433 Jul 14 00:06 /usr/pkg/lib/libatf-c.so.0.0.0
I have libatf-c.so.0 pointing to libatf-c.so.0.0.0.
I do not know how to resolve. I would be very grateful for any hint or advice.
By the way, I check /usr/bin/atf-run and /usr/bin/atf-report and none
of it has an option to show its version. I know that the version is
actually dumped in the output of atf-run when it executed tests, but
in cases like this I am not able to execute my tests.
Thank you very much in advance.
Regards
Rambius
--
Tangra Mega Rock: http://www.radiotangra.com
Home |
Main Index |
Thread Index |
Old Index