[Asterisk-bsd] 1.2-rc2 can't find -lodbc on FreeBSD
Dr. Rich Murphey
Rich at WhiteOakLabs.com
Sat Nov 12 21:54:14 CST 2005
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
> Asterisk-BSD at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
>
>
More information about the Asterisk-BSD
mailing list