ports/124891: ports devel/aegis make configure finds strverscmp()
robertjenssen at ozemail.com.au
Mon Jun 23 01:00:11 UTC 2008
>Synopsis: ports devel/aegis make configure finds strverscmp()
>Arrival-Date: Mon Jun 23 01:00:10 UTC 2008
>Originator: Robert Jenssen
FreeBSD kraken.wollstonecraft 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jun 18 22:11:14 EST 2008 root at kraken.wollstonecraft:/usr/obj/usr/src/sys/KRAKEN i386
Here is an edited log of a build of the devel/aegis port:
===> aegis-4.24_1 depends on file: /usr/local/bin/perl5.8.8 - found
===> aegis-4.24_1 depends on executable: pkg-config - found
===> aegis-4.24_1 depends on shared library: curl.4 - found
===> aegis-4.24_1 depends on shared library: tk84 - found
===> aegis-4.24_1 depends on shared library: intl - found
===> aegis-4.24_1 depends on shared library: xml2.5 - found
===> Configuring for aegis-4.24_1
checking for strverscmp... yes
c++ -I. -I/usr/local/include -O2 -fno-strict-aliasing -pipe -march=pentium4 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -c common/str_list/sort_vers.cc
common/str_list/sort_vers.cc: In function 'int wl_sort_verscmp(const void*, const void*)':
common/str_list/sort_vers.cc:32: error: 'strverscmp' was not declared in this scope
*** Error code 1
Stop in /usr/ports/devel/aegis/work/aegis-4.24.
*** Error code 1
Stop in /usr/ports/devel/aegis.
/* Define to 1 if you have the `strverscmp' function. */
#define HAVE_STRVERSCMP 1
On the other hand if I:
cd /usr/ports/devel/aegis/work/aegis-4.24 && ./configure
checking for strverscmp... no
So, when running the ports "make configure" in /usr/ports/devel/aegis strverscmp() is (incorrectly) found, but when running the aegis-4.24 configure script in /usr/ports/devel/aegis/work/aegis-4.24 strverscmp() is (correctly) not found.
I am not familiar with GNU configure etc. so I hope you will bear with me in the following.
Further investigation shows that the ports "make configure" produces the following in work/aegis-4.24/config.log:
c++ -o conftest -O2 -fno-strict-aliasing -pipe -march=pentium4 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -L/usr/local/lib conftest.cpp -lc -lxml2 -lcurl -lmagic -lcrypt -lbz2 -lz -lm -lintl -liconv >&5
On the other hand running work/aegis-4.24/configure produces the following in config.log:
g++ -o conftest -g -O2 -I/usr/local/include -I/usr/local/include
/libxml2 -I/usr/local/include conftest.cpp -lxml2 -lcurl -lmagic -lcrypt -lbz2
-lz -lm >&5
Note that the ports "make configure" output shows that the test program is compiled with "-lintl -liconv" whereas the command which fails in the actual build does not find a declaration of strverscmp. A search of /usr/local/include did not turn up a declaration of strverscmp().
Examining the configure script suggests that the test program looks something like this:
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
# include <limits.h>
# include <assert.h>
Calling this tt.cpp and compiling it with:
c++ -o tt -O0 -g -fno-strict-aliasing -pipe -march=pentium4 -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -L/usr/local/lib tt.cpp -lc -lxml2 -lcurl -lmagic -lcrypt -lbz2 -lz -lm -lintl -liconv
then running gdb:
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) b main
Breakpoint 1 at 0x80485d8: file tt.cpp, line 18.
Starting program: /usr/ports/devel/aegis/work/aegis-4.24/tt
Breakpoint 1, main () at tt.cpp:18
18 main ()
main () at tt.cpp:20
20 return strverscmp();
0x285204cc in tld_check_4z () from /usr/local/lib/libidn.so.16
The program is running. Exit anyway? (y or n) y
libidn.so.16 belongs to the port libidn-1.8_2 which depends on libiconv-1.11_1
During "make configure" of devel/aegis the ports system is including "-lintl -liconv". This causes the aegis-4.24 configure script to find a strverscmp(). Those libraries are not included in the actual build compile and link commands.
Run "make" in /usr/ports/devel/aegis
A hack to allow the build to complete is to undefine HAVE_STRVERSCMP in /usr/ports/devel/aegis/work/aegis-4.24/common/config.h
More information about the freebsd-ports-bugs