ATF-devel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Error "Shared object "libatf-c.so.0" not found" on NetBSD



Hello Julio,

On Thu, Jul 15, 2010 at 11:10 AM, Julio Merino <jmmv%netbsd.org@localhost> 
wrote:
> There is nothing to fix here.  Each platform has its own way of
> specifying compiler flags, and in particular, the rpath stuff is quite
> platform dependent.  If the user is providing additional flags, he is
> responsible for doing the right thing.
>
> Using the pkgconfig files for the libraries you are interested in will
> "just work" though.  You will just need to point configure to the
> right location of the .pc files (with PKG_CONFIG_PATH) and all
> compiler/linker flags will be detected automatically.

After some reading I understood how to use pkg-config with autotools.
For the sake of completeness, I am posting my build scripts.

In configure.ac I have

#                                               -*- 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])
AC_PATH_PROG([ATFREPORT], [atf-report])

# Checks for libraries.

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

# Checks for packages with pkg-config .pc files
PKG_CHECK_MODULES([OPENSSL], [openssl >= 0.9.7])
PKG_CHECK_MODULES([ATF_C], [atf-c >= 0.10])

AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT

I replaced all autoconf checks for libs and headers for openssl and
atf with pkg-config checks for the modules. In my src/Makefile.am I
have

AM_CPPFLAGS=$(OPENSSL_CFLAGS) $(ATF_C_CFLAGS)
AM_LDFLAGS=$(OPENSSL_LIBS) $(ATF_C_LIBS)


Of course, my scripts are not perfect. Next I will split the sources
and the tests in different directories.

Once again, thank you very much for your pointers.

Regards
Rambius

-- 
Tangra Mega Rock: http://www.radiotangra.com


Home | Main Index | Thread Index | Old Index