ports/150592: AX_BOOST_FILESYSTEM macro from autoconf-archive gives an error at configure
Enrique
cquike at arcor.de
Wed Sep 15 15:00:02 UTC 2010
>Number: 150592
>Category: ports
>Synopsis: AX_BOOST_FILESYSTEM macro from autoconf-archive gives an error at configure
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Sep 15 15:00:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Enrique
>Release: 8.1
>Organization:
-
>Environment:
FreeBSD fb014699 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
I am using the AX_BOOST_FILESYSTEM and AX_BOOST_UNIT_TEST_FRAMEWORK macros found in the autoconf-archive package. I have also installed boost itself from a package:
pkg_add -r boost-all autoconf-archive
I am using a very simple configure.ac that tests for Boost like:
..
AX_BOOST_BASE
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AX_BOOST_THREAD
AX_BOOST_UNIT_TEST_FRAMEWORK
..
When I run configure I get:
....
checking whether the Boost::System library is available... yes
checking whether the Boost::Filesystem library is available... yes
configure: error: Could not link against !
However, I have successfully compiled and linked a program which uses the filesystem library. I have tried with the options provided by the configure:
./configure --with-boost-filesystem=boost_filesystem --with-boost-unit-test-framework=boost-unit-test-framework
and then I get:
..
checking whether the Boost::System library is available... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread... yes
checking whether the Boost::Unit_Test_Framework library is available... yes
configure: error: Could not link against boost-unit-test-framework !
So now it seems like Boost::Filesystem is properly found, but Boost::Unit_Test_Framework cannot be linked.
This behaviour is rather odd. I would just expect ./configure to work out of the box, and generate properly the $(BOOST_CPPFLAGS), $(BOOST_FILESYSTEM_LIB) and $(BOOST_UNIT_TEST_FRAMEWORK_LIB) variables.
I have tried exactly the same in several Linux distributions and it works fine.
I have created a very small test case to show the problem, please see "How to repeat the problem"
The versions of the packages I use:
autoconf-2.62
autoconf-wrapper-20071109
autoconf-archive-0.2009.04.19
automake-1.10.1
automake-wrapper-20071109
boost-all-1.43.0
>How-To-Repeat:
1. Create a file configure.ac:
AC_INIT([Package],[0.1],[user at com],[pack])
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE
AC_PROG_CXX
# Checks for boost libraries (the macros are found in the autoconf archive)
AX_BOOST_BASE
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AX_BOOST_THREAD
AX_BOOST_UNIT_TEST_FRAMEWORK
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
2. Create a simple Makefile.am file:
AUTOMAKE_OPTIONS = 1.8 foreign
3. Run autoreconf:
# autoreconf -i -f
4. Run configure:
# ./configure
5. Check the error reported:
checking whether the Boost::System library is available... yes
checking whether the Boost::Filesystem library is available... yes
configure: error: Could not link against !
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list