在 Linux/Ubuntu 10.10 上交叉编译 OpenLDAP for MIPS
我正在尝试使用 mipsel-angstrom-linux 工具链在我的 Ubuntu 10.10 开发机器上交叉编译 openldap-2.4.23,因为它依赖于 ptlib-2.10.1/opal-3.10.1,这是我实际上使用的库想要使用。
我已经设置了一个 build.sh
脚本,其内容如下所示。构建
#!/bin/sh
. /usr/local/angstrom/mipsel/environment-setup
./configure CC=mipsel-angstrom-linux-gcc --host=mipsel-angstrom-linux --disable-bdb --disable-hdb --with-yielding_select=no &&
make depend &&
rm -rf install &&
mkdir install &&
make &&
make install DESTDIR=$PWD/install &&
sudo make install DESTDIR=/usr/local/angstrom/mipsel/mipsel-angstrom-linux
工作正常,但因以下问题而中止:
../../libtool: line 3297: cd: =/usr/lib: No such file or directory
libtool: link: warning: cannot determine absolute directory name of `=/usr/lib'
grep: =/usr/lib/libz.la: No such file or directory
/bin/sed: can't read =/usr/lib/libz.la: No such file or directory
libtool: link: `=/usr/lib/libz.la' is not a valid libtool archive
make[2]: *** [libldap.la] Error 1
make[2]: Leaving directory `/home/markus/Documents/VoIP/openldap-2.4.23/libraries/libldap'
make[1]: *** [all-common] Error 1
make[1]: Leaving directory `/home/markus/Documents/VoIP/openldap-2.4.23/libraries'
make: *** [all-common] Error 1
我在使用其他库时也遇到了麻烦,添加 LIBTOOL=libtool
曾经能够解决问题。我还尝试按照其他一些资源的建议编译我自己的 mipsel-angstrom-linux-libtool 但没有成功。
我在 source/build 目录中执行了 grep libz -r .
但找不到任何内容,我不知道在哪里查找。
我希望有人能给我一个提示,让我解决我的问题。
编辑:使用codesourcery工具链,我得到result.c:961:对lutil_memcmp'的未定义引用
。
I'm trying to cross compile openldap-2.4.23 on my Ubuntu 10.10 development machine using the mipsel-angstrom-linux toolchain because it is a dependecy to ptlib-2.10.1/opal-3.10.1 which are the libraries that I actually want to use.
I have set up a build.sh
script with the content shown below. It
#!/bin/sh
. /usr/local/angstrom/mipsel/environment-setup
./configure CC=mipsel-angstrom-linux-gcc --host=mipsel-angstrom-linux --disable-bdb --disable-hdb --with-yielding_select=no &&
make depend &&
rm -rf install &&
mkdir install &&
make &&
make install DESTDIR=$PWD/install &&
sudo make install DESTDIR=/usr/local/angstrom/mipsel/mipsel-angstrom-linux
The build works but aborts with the following:
../../libtool: line 3297: cd: =/usr/lib: No such file or directory
libtool: link: warning: cannot determine absolute directory name of `=/usr/lib'
grep: =/usr/lib/libz.la: No such file or directory
/bin/sed: can't read =/usr/lib/libz.la: No such file or directory
libtool: link: `=/usr/lib/libz.la' is not a valid libtool archive
make[2]: *** [libldap.la] Error 1
make[2]: Leaving directory `/home/markus/Documents/VoIP/openldap-2.4.23/libraries/libldap'
make[1]: *** [all-common] Error 1
make[1]: Leaving directory `/home/markus/Documents/VoIP/openldap-2.4.23/libraries'
make: *** [all-common] Error 1
I had trouble with other libraries too, adding LIBTOOL=libtool
was once able to solve a problem. I also tried to compile my own mipsel-angstrom-linux-libtool
as suggested by some other resource but that did not work.
I did a grep libz -r .
in the source/build directory but couldn't find anything, I don't know where to look.
I hope someone can give me a hint that allows me to solve my problem.
edit: using the codesourcery toolchain i get result.c:961: undefined reference to lutil_memcmp'
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仅当系统上安装的 libtool 与 openldap 和依赖项附带的 libtool 不同时,使用
LIBTOOL=libtool
才有帮助。但实际上这个问题与 libtool 有关,而不是错误可能表明的 libz。如果您仔细查看错误消息,您会看到一个附加的=
:=/usr/lib
不是目录。这个=
从哪里来?我在 libtool-patches 找到了负责此问题的 libtool 补丁那
描述新功能:
我不知道这背后的原因是什么,但可以找到结果
在系统上的 .la 文件中,也许可以
根据您安装库的位置来运行它来查找它们。
您将看到 dependency_libs 的定义,其中可能包括
其中字符串
=/usr/lib
是附加=
的来源。该怎么办?
找到错误的 .la 文件后找出它们属于哪个软件
并使用
LIBTOOL=/path/to/libtool2.2
重建它们。或者如果这不起作用:
祝你一切顺利,
彼得
using
LIBTOOL=libtool
only helps if the libtool installed on your system is different from the one shipped with openldap and dependencies. But indeed this problem is related to libtool, and not libz as the error might indicate. If you look more closely at the error message you see an additional=
:the
=/usr/lib
is no directory. Where does this=
come from?I found a patch to libtool responsible for this at libtool-patches that
describes the new function:
I don't know what is the reasoning behind this but the result can be found
in the .la files on your system, maybe run this
depending on where you install your libraries to find them.
You will see the definition of dependency_libs that includes probably
among others the string
=/usr/lib
and this is where the additional=
comes from.What to do?
having found the wrong .la files find out to which software they belong
and rebuild them using
LIBTOOL=/path/to/libtool2.2
.or if that doesn't work:
all the best,
Peter