libtool

Using -rpath and $ORIGIN with libtool-based projects?

守給你的承諾、 提交于 2019-12-04 11:30:59
I am trying to incorporate a libtool-based package into a project of my own, perhaps in a non-standard way. Here is my goal: Build external project: ./configure --prefix=$HOME/blah --etcetera && make && make install Build my own project which depends upon the external project's shared libraries and executables at runtime: gcc -I$HOME/blah/include -L$HOME/blah/lib -o $HOME/blah/bin/program Package everything into a single "localized" tarball... that is, while I have everything in $HOME/blah on the build host I want the ability to extract the tarball to any arbitrary directory (on some other

Force linking a static library into a shared one with Libtool

99封情书 提交于 2019-12-04 01:26:30
I have a library ( libfoo ) that is compiled using libtool into two objects: libfoo.a and libfoo.so. I have to create, using libtool also, another library ( libbar ) that will be a single shared library (libbar.so) containing all libfoo's code. In order to do this, I have to force libbar to link against libfoo.a , and not libfoo.so. I am in an autotools environment, so I have to solve this using standard configure.in or Makefile.am rules. I tried several things, like in configure.in : LDFLAGS="$LDFLAGS "-Wl,-Bstatic -lfoo -Wl,-Bdynamic" That always results in the -Wl flags on the linking line;

How to install and use libtool shared library (.lo files)?

房东的猫 提交于 2019-12-03 21:34:39
So after I ran libtool and got out a libfoo.lo and foo.o file from my library source, how do I convert the libfoo.lo file into a normal Linux shared library, like libfoo.so.1.0.0 so I can install and link to it on my target system? From the outputs mentioned in the question, it looks like you ran libtool with --mode=compile mode. You will need to run libtool again with --mode=link to produce .a and .so libraries. libtool is just a simple wrapper for gcc, ln ar and ranlib which is needed to produce libraries. All it does is run gcc adding the necessary options to ensure that your static and

Libtool version mismatch

为君一笑 提交于 2019-12-03 21:08:34
I have downloaded the source of some old project. I'm trying to build it now: ./bootstrap && ./configure It works fine, but: make /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -W -g -O2 -DDEBUG -MT rcclexer.lo -MD -MP -MF .deps/rcclexer.Tpo -c -o rcclexer.lo rcclexer.cpp ../libtool: line 415: CDPATH: command not found libtool: Version mismatch error. This is libtool 2.4.2, but the libtool: definition of this LT_INIT comes from an older release. libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 libtool: and run autoconf again. p.s. that small project page:

libtool: undefined symbols not allowed in i686-pc-mingw32 shared

邮差的信 提交于 2019-12-03 17:10:56
I'm using autotools as build system for a library of mine. Recently library is ported to Windows. Library compiles and links successfully though I encountered a strange error. There is only static libraries after configure and make. Evertything looks OK except a warning from libtool : libtool: undefined symbols not allowed in i686-pc-mingw32 shared I have exported all symbols for Windows machines by this code: #ifdef _WIN32 # ifdef DLL_EXPORT # define LIBRARY_API __declspec(dllexport) # else # define LIBRARY_API __declspec(dllimport) # endif #endif #ifndef _WIN32 # define LIBRARY_API #endif

Error installing PCRE

别等时光非礼了梦想. 提交于 2019-12-03 10:42:40
问题 I'm trying to install PCRE on my Ubuntu 11.10 Server. When I run the "make" command, I get a really long output which always ends in this error: libtool: link: ( cd ".libs" && rm -f "libpcreposix.la" && ln -s "../libpcreposix.la" "libpcreposix.la" ) source='pcrecpp.cc' object='pcrecpp.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/bash ./depcomp \ /bin/bash ./libtool --tag=CXX --mode=compile -DHAVE_CONFIG_H -I. -c -o pcrecpp.lo pcrecpp.cc libtool: compile: unrecognized option `-DHAVE_CONFIG

Link a static library to a shared one during build?

China☆狼群 提交于 2019-12-03 08:04:25
问题 I have a problem building a shared library with GCC/Linux. Currently this shared library is created with GCC/libtool option "-shared" and everything is fine. Now there are two additional, static libraries (.a-files) that have to be added to this shared one since they provide some functionality that is required by the shared one. Adding these static libraries with option "-l" does not help, afterwards they are not part of the .so file. So how can I force GCC/libtool to really add the code of

Relative or independent paths in libtool .la file

帅比萌擦擦* 提交于 2019-12-03 07:46:48
My .la file has full pathnames in both the dependency_libs= section and the libdir= section which makes it difficult to copy my libraries to a different machine (same arch but different path structure). What is the solution to this, besides having some script to hack the .la file to adjust for the paths on the new machine? ==Details== When I ./configure; make; make install my libfoo , depending on how I use the --prefix , --exec-prefix , and DESTDIR= flags, I'll get an entry in the libfoo.la file that reads libdir=/dir1/lib and I'll have the actual .so files in the same dir as libfoo.la . All

How to debug a program wrapped in a libtool script?

。_饼干妹妹 提交于 2019-12-03 06:06:59
I have a project involving shared libraries ie: mylib.so (test) program using these shared libraries ie: test_mylib When I try to run gdb on test_mylib , it prints: "test_mylib": not in executable format: File format not recognized When I use the real program ( .libs/test_mylib ) directly instead, it still complains: .libs/test_mylib: can't load library 'libhello.so.0' How Can I run gdb to debug my program ? This is problem I ran into a couples of days ago and there is no generic answer on SO yet. Only special cases. Here is the answer I found on this page: http://www.gnu.org/software/libtool

Automake error './ltmain.sh' not found

蓝咒 提交于 2019-12-03 03:13:46
问题 I've installed mingw and msys by using mingw-get-setup.exe . I've also installed Autotools(autoconf, automake,m4,libtool) into C:\/opt/autotools . When I run automake, the following error always occurs: configure.ac:11: error: required file './ltmain.sh' not found If I copy ltmain.sh from libtool’s installed tree, execution will finish normally. How can I configuure automake to find ltmain.sh without copying? 回答1: In an autoconf / automake / libtool project you have to invoke: libtoolize :