On 2013-01-25 19:43, Chris Rees wrote:
On 25 Jan 2013 18:28, "Dimitry Andric" <d...@freebsd.org
<mailto:d...@freebsd.org>> wrote:
...
> Thanks, but the port does not link on head, due to a problem in apr:
>
> /usr/local/lib/libapr-1.a(apr_snprintf.o): In function `apr_vformatter':
> /usr/ports/devel/apr1/work/apr-1.4.6/strings/apr_snprintf.c:1023: undefined
reference to `isnan'
>
> The issue is that apr-1-config --libs does not list -lm. Any idea how
> to correct that?
That's a question for Lev really, since it applies equally to devel/subversion.
I'll fix it tomorrow when I'm back at the keyboard unless Lev fixes it first.
I'm currently using the attached patch. The relevant change is that I
changed the check for modf (which is in our libc) to modff (which is in
libm), the others are just standard fixes for clang.
Index: devel/apr1/files/patch-apr_network.m4
===================================================================
--- devel/apr1/files/patch-apr_network.m4 (revision 0)
+++ devel/apr1/files/patch-apr_network.m4 (working copy)
@@ -0,0 +1,29 @@
+--- apr-1.4.6/build/apr_network.m4.orig 2011-07-31 16:30:56.000000000 +0200
++++ apr-1.4.6/build/apr_network.m4 2011-07-31 16:31:06.000000000 +0200
+@@ -64,7 +64,7 @@
+ #include <sys/socket.h>
+ #endif
+
+-void main(void) {
++int main(void) {
+ struct addrinfo hints, *ai;
+ int error;
+
+@@ -152,7 +152,7 @@
+ #include <netinet/in.h>
+ #endif
+
+-void main(void) {
++int main(void) {
+ struct sockaddr_in sa;
+ char hbuf[256];
+ int error;
+@@ -195,7 +195,7 @@
+ #include <netdb.h>
+ #endif
+
+-void main(void) {
++int main(void) {
+ if (EAI_ADDRFAMILY < 0) {
+ exit(0);
+ }
Index: devel/apr1/files/patch-configure.in
===================================================================
--- devel/apr1/files/patch-configure.in (revision 0)
+++ devel/apr1/files/patch-configure.in (working copy)
@@ -0,0 +1,20 @@
+--- apr-1.4.6/configure.in.orig 2011-05-20 19:39:54.000000000 +0200
++++ apr-1.4.6/configure.in 2013-01-28 22:09:21.000000000 +0100
+@@ -583,7 +583,7 @@
+ #include <stdio.h>
+ #include <unistd.h>
+
+-void main(void)
++int main(void)
+ {
+ int fd, ret = 0;
+ struct stat64 st;
+@@ -677,7 +677,7 @@
+ AC_SEARCH_LIBS(socket, socket)
+ AC_SEARCH_LIBS(crypt, crypt ufc)
+ AC_CHECK_LIB(truerand, main)
+- AC_SEARCH_LIBS(modf, m)
++ AC_SEARCH_LIBS(modff, m)
+ ;;
+ esac
+
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"