[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HP-UX "module" linking problem
From: |
Kent Boortz |
Subject: |
HP-UX "module" linking problem |
Date: |
Tue, 19 Sep 2006 00:29:50 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.2 (darwin) |
Hi,
On HP-UX 11.11 PA-RISC I try create a "module" that is loadable using
"libltdl". When creating the module, I try link against a static
library "libmysqlclient". This fails.
OS : HP-UX B.11.11 (hppa)
c.guess : hppa2.0w-hp-hpux11.11
libtool : 1.5.22
cc : HP92453-01 B.11.11.12 HP C Compiler
ld : HP92453-07 B.11.41 040909
The final link does (removing the -I<path>, -L<path> and optimizer flags)
% /bin/sh ../libtool --tag=CC --mode=link cc +DAportable -g \
-o libmyodbc3_r.la -rpath <rpath> -release 3.51.13 <.lo-files> \
../myodbc3u/libmyodbc3u.la ../MYODBCDbg/MYODBCDbgLib/libMYODBCDbg.la \
<instbase>/libtool/lib/libltdl.la -lmysqlclient_r \
-lz -lpthread -lnsl -lm -liodbcinst
"libmysqlclient_r" is a static library compiled with "--with-pic", i.e. +Z.
"libiodbcinst" is a shared library.
Libtool complains with
*** Warning: This system can not link to static lib archive
/home/mysqldev/odbc/inst/libtool/lib/libltdl.la.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** Warning: Trying to link with static lib archive libmysqlclient_r.a.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because the file extensions .a of this argument makes me believe
*** that it is just a static archive that I should not used here.
but produces a shared library, just *without* "libmysqlclient_r".If I
copy the expanded link line and insert "<path>/libmysqlclient_r.a", it
links ok, So why this complaint? How to I convince libtool not to
remove this static library from the generated link line?
Note that the "-module" option was not used above. If I add it, it
seems like libtool gives up and produces a standard AR archive with
all the object files.
Thankful for any pointers,
kent
--
Kent Boortz, Senior Software Developer
MySQL AB, www.mysql.com
Office: +46 18 174400 ext. 4450 (VoIP)
Office: +46 19 182931
Mobile: +46 70 2791171
- HP-UX "module" linking problem,
Kent Boortz <=