[kde-freebsd] FreeBSD port databases/libiodbc linker issue during compile ports linked with iodbc
Raphael Kubo da Costa
rakuco at FreeBSD.org
Fri Nov 14 10:15:18 UTC 2014
"Valery V.Smirnov" <valery at smirnov.tv> writes:
> There is an issue like "/usr/bin/ld: cannot find -liodbc" during
> compile any linked ports on FreeBSD 10.0 amd64.
>
> Detailed information here:
> https://forums.freebsd.org/threads/compiling-openldap24-server-with-odbc-checked-fails-with-linker-error-liodbc.48947/
> Topic-starter is me.
>
> Problem, IMHO, whith autocreate Makefiles using iodbc-config:
> [root at host /usr/ports]# iodbc-config --libs
> -L/usr/local/lib -liodbc -liodbcinst
> [root at host /usr/ports]#
>
> But only libs whith prefix "lib" are presents in /usr/local/lib after
> databases/libiodbc installing:
You're mixing many different things here, none of which are the actual
cause of your problem :-)
First of all, there's databases/libiodbc, which installs libiodbc.so and
which we maintain, and there's databases/unixODBC, which installs
libodbc.so and which we don't maintain.
databases/openldap24-server uses the latter, and is the only port
affected by this issue, not "any linked ports on FreeBSD".
Moreover, "-lfoo" is expanded to "libfoo.{so,a}" by the compiler/linker,
so there's nothing to worry about.
Now to the specific problem you're having: it's caused by
openldap24-server's configure.in just hardcoding "-lodbc" when unixODBC
is used instead of using a full path or the output of odbc_config to
properly pass -L/usr/local/lib to the compiler/linker. It is a bug in
the upstream Makefile.in, which should be using $(LIBS) just like the
others do to get the value we pass in the port's Makefile.
The attached patch should solve your problem, but you should really file
a PR for the openldap24-server port instead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-servers__slapd__back-sql__Makefile.in
Type: text/patch
Size: 501 bytes
Desc: Patch
URL: <http://mail.kde.org/pipermail/kde-freebsd/attachments/20141114/716f7307/attachment.bin>
More information about the kde-freebsd
mailing list