There's a bug in the cdr/Makefile and res/Makefile. It appears to be finding the header files for the odbc library, but isn't setting the path for locating the library itself.

I'll submit the following patch to fix it.

Cheers,
Rich


Index: cdr/Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/cdr/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- cdr/Makefile    1 Nov 2005 21:53:29 -0000    1.33
+++ cdr/Makefile    12 Nov 2005 22:43:05 -0000
@@ -21,7 +21,8 @@
endif

ifeq ($(findstring BSD,${OSARCH}),BSD)
- CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
+  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include
+  SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
endif

#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
Index: res/Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/res/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- res/Makefile    8 Nov 2005 00:12:21 -0000    1.29
+++ res/Makefile    12 Nov 2005 22:43:06 -0000
@@ -37,7 +37,8 @@
endif

ifeq ($(findstring BSD,${OSARCH}),BSD)
- CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
+  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include
+  SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
endif

ifeq (${OSARCH},CYGWIN)



Graham Menhennitt wrote:
I just tried building asterisk-1.2rc2 and got the same compilation error twice in two sub-directories:

/usr/bin/ld: cannot find -lodbc

Removing -lodbc from the two Makefiles (res and cdr sub-dirs) allows the build to complete. Is this expected? Should I report it as a Asterisk on FreeBSD bug? Perhaps it's a missing dependency - if so, what should I be installing?

Thanks,
   Graham
_______________________________________________
Asterisk-BSD mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-bsd



_______________________________________________
Asterisk-BSD mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-bsd

Reply via email to