Libtool在make install

时间:2016-03-13 17:58:35

标签: cross-compiling automake libtool

我在构建此库时寻求libtool难题的帮助:http://github.com/mspanc/vspec

当我在我的ubuntu 14.04盒子上构建它时,它工作正常,在make install期间添加它会创建适当的.so.VERSION_INFO符号链接。

然而,当我尝试使用来自GStreamer项目(http://cgit.freedesktop.org/gstreamer/cerbero/)的Cerbero构建系统交叉编译它时,它基本上引导了用于交叉编译的工具链,在make install期间它只创建.so文件(没有.so。 VERSION_INFO符号链接),但仅适用于此库,它使同一构建环境中的其他库成功。

显然,肯定会有一些区别,但我认为vspec和其他项目的自动化程序已经安装好了很长时间,但仍然无法弄清问题的根本原因。

我发现在运行libtool时生成的已损坏库中的./configure --prefix /root/cerbero/dist/android_armv7 --libdir /root/cerbero/dist/android_armv7/lib --disable-maintainer-mode --disable-silent-rules --disable-introspection --host=arm-linux-androideabi脚本具有version_type=none,而构建的脚本已将此变量正确设置为linux。之后的差异导致libtool不添加符号链接。

这里的任何人都可以给我任何提示,在生成libtool时,我应该在哪里寻找导致无效主机识别的原因?

来自Cerbero的make install的日志:

Making install in src
make[1]: Entering directory `/root/cerbero/sources/android_armv7/libvspec-1.0-1.0.0/src'
make[2]: Entering directory `/root/cerbero/sources/android_armv7/libvspec-1.0-1.0.0/src'
 /bin/mkdir -p '/root/cerbero/dist/android_armv7/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libvspec-1.0.la '/root/cerbero/dist/android_armv7/lib'
libtool: install: /usr/bin/install -c .libs/libvspec-1.0.so /root/cerbero/dist/android_armv7/lib/libvspec-1.0.so
libtool: install: /usr/bin/install -c .libs/libvspec-1.0.lai /root/cerbero/dist/android_armv7/lib/libvspec-1.0.la
libtool: install: /usr/bin/install -c .libs/libvspec-1.0.a /root/cerbero/dist/android_armv7/lib/libvspec-1.0.a
libtool: install: chmod 644 /root/cerbero/dist/android_armv7/lib/libvspec-1.0.a
libtool: install: arm-linux-androideabi-ranlib /root/cerbero/dist/android_armv7/lib/libvspec-1.0.a
 /bin/mkdir -p '/root/cerbero/dist/android_armv7/share/vala/vapi'
 /usr/bin/install -c -m 644 libvspec-1.0.vapi libvspec-1.0.deps '/root/cerbero/dist/android_armv7/share/vala/vapi'
 /bin/mkdir -p '/root/cerbero/dist/android_armv7/include/libvspec-1.0'
 /usr/bin/install -c -m 644 libvspec.h '/root/cerbero/dist/android_armv7/include/libvspec-1.0'
 /bin/mkdir -p '/root/cerbero/dist/android_armv7/lib/pkgconfig'
 /usr/bin/install -c -m 644 libvspec-1.0.pc '/root/cerbero/dist/android_armv7/lib/pkgconfig'
make[2]: Leaving directory `/root/cerbero/sources/android_armv7/libvspec-1.0-1.0.0/src'
make[1]: Leaving directory `/root/cerbero/sources/android_armv7/libvspec-1.0-1.0.0/src'
make[1]: Entering directory `/root/cerbero/sources/android_armv7/libvspec-1.0-1.0.0'
make[2]: Entering directory `/root/cerbero/sources/android_armv7/libvspec-1.0-1.0.0'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/cerbero/sources/android_armv7/libvspec-1.0-1.0.0'
make[1]: Leaving directory `/root/cerbero/sources/android_armv7/libvspec-1.0-1.0.0'
Running command 'make install'

和我的ubuntu 14.04盒子上的命令相同:

$ LC_ALL=C sudo make install
Making install in src
make[1]: Entering directory `/home/marcin/aktivitis/radiokit/vspec/src'
make[2]: Entering directory `/home/marcin/aktivitis/radiokit/vspec/src'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libvspec-1.0.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libvspec-1.0.so.1.0.0 /usr/local/lib/libvspec-1.0.so.1.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libvspec-1.0.so.1.0.0 libvspec-1.0.so.1 || { rm -f libvspec-1.0.so.1 && ln -s libvspec-1.0.so.1.0.0 libvspec-1.0.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libvspec-1.0.so.1.0.0 libvspec-1.0.so || { rm -f libvspec-1.0.so && ln -s libvspec-1.0.so.1.0.0 libvspec-1.0.so; }; })
libtool: install: /usr/bin/install -c .libs/libvspec-1.0.lai /usr/local/lib/libvspec-1.0.la
libtool: install: /usr/bin/install -c .libs/libvspec-1.0.a /usr/local/lib/libvspec-1.0.a
libtool: install: chmod 644 /usr/local/lib/libvspec-1.0.a
libtool: install: ranlib /usr/local/lib/libvspec-1.0.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/share/vala/vapi'
 /usr/bin/install -c -m 644 libvspec-1.0.vapi libvspec-1.0.deps '/usr/local/share/vala/vapi'
 /bin/mkdir -p '/usr/local/include/libvspec-1.0'
 /usr/bin/install -c -m 644 libvspec.h '/usr/local/include/libvspec-1.0'
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libvspec-1.0.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory `/home/marcin/aktivitis/radiokit/vspec/src'
make[1]: Leaving directory `/home/marcin/aktivitis/radiokit/vspec/src'
make[1]: Entering directory `/home/marcin/aktivitis/radiokit/vspec'
make[2]: Entering directory `/home/marcin/aktivitis/radiokit/vspec'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/marcin/aktivitis/radiokit/vspec'
make[1]: Leaving directory `/home/marcin/aktivitis/radiokit/vspec'

谢谢,

的Marcin

1 个答案:

答案 0 :(得分:0)

对于Android,这是该平台的预期libtool输出。请参阅this libtool patch上的评论。版本化的库will not be added到Android。