Debian 放弃了对 .la 文件的支持;我现在该如何构建?
背景
我最近遇到了 fuppes UPnP 媒体服务器,它看起来很棒。我将其安装在我的家庭服务器上,并开始使用它将视频流传输到我的 Xbox。它的效果真的非常好,我对此很满意。然后我升级了我的服务器发行版,fuppes 停止工作;我现在知道这是因为各种库已经贬值,最具体的是 debian 已经开始从大多数包中删除 .la libtool 文件。
问题/问题
所以我的问题是,既然我没有 libtool 的 .la 文件,我该如何构建 fuppes?更具体地说,这是我的确切错误消息:
/bin/sed: can't read /usr/lib/libogg.la: No such file or directory
libtool: link: `/usr/lib/libogg.la' is not a valid libtool archive
我不再有 /usr/lib/libogg.la 文件。这从终端证明了这一点:
# dpkg -L libogg-dev | grep "a$"
/usr/lib/libogg.a
#
我只需要真正指向正确的方向。我已经阅读了 libtool-automake 文档,但我仍然缺少告诉我如何编译的信息,因为我不再有 libogg.la 了。简而言之,在没有 .la 文件的情况下如何编译?
注意:这一切都在 Ubuntu Karmic Koala 上
Background
I recently came across the fuppes UPnP media server and it seemed great. I installed it on my home server and started using it to stream video to my XBox. It worked really really well and I was happy with it. Then I upgraded my servers distribution and fuppes stopped working; I now know that it's because various libraries have depreciated, most specifically debian has started dropping the .la libtool files from the majority of their packages.
The Problem / Question
So my question is, how do I build fuppes now that I don't have those .la files for libtool? More specifically, this is my exact error message:
/bin/sed: can't read /usr/lib/libogg.la: No such file or directory
libtool: link: `/usr/lib/libogg.la' is not a valid libtool archive
I don't have a /usr/lib/libogg.la file anymore. This proves it from the terminal:
# dpkg -L libogg-dev | grep "a$"
/usr/lib/libogg.a
#
I just need to be pointed in the right direction really. I've read the libtool-automake docs but I'm still missing that piece of information that tells me how to compile now that I don't have libogg.la anymore. So in short, how do I compile in the absence of .la files?
N.B. This is all on Ubuntu Karmic Koala
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信 Debian 已经放弃了 .la 文件,因为当您同时构建 32 位和 64 位时,它可能会导致问题。如果 libtool 找到 .la 文件,它有一个讨厌的习惯,即在链接命令中放入库的完整路径,这有时是错误的库(32 位而不是 64 位,反之亦然)。在 Solaris 上,我遇到了 libtool 想要链接 /usr/lib/libintl.so 而不是 /usr/lib/64/libintl.so 的问题,所有这些都是因为它找到了 /usr/lib/libintl.la
你应该能够通过在相应的 Makefile.am 中的 mumble_LIBADD 行上指定 -logg(将 'mumble' 替换为您正在构建的包的名称),可以在没有 .la 文件的情况下进行链接。如果由于某种原因链接器找不到该库,您可以通过添加如下内容来指定它的路径:
mumble_LDFLAGS = -R/usr/lib -L/usr/lib
但在这个例子中,我必须相信/usr/lib 位于库的默认搜索路径中。
对于 sed 的特定错误消息,我不知道为什么 fuppes 使用 sed 来查找 /usr/lib/libogg.la,但这可能希望通过 libtool 上游的适当更改来修复(例如在 autoconf 或 automake 中)。我怀疑“配置”中的某处有一个开关可以帮助解决此问题(例如 --with-ogg 或其他)。运行“configure --help”并在那里查找一些提示。
I believe that Debian has been dropping the .la files because it can cause problems when you're building for both 32-bit and 64-bit. If libtool finds a .la file, it has a nasty habit of putting the full path to the library in the link command, and this is sometimes the wrong library (32-bit instead of 64-bit or vice-versa). On Solaris, I had a problem of libtool wanting to link /usr/lib/libintl.so instead of /usr/lib/64/libintl.so, all because it found /usr/lib/libintl.la
You should be able to link without the .la file by specifying -logg on the mumble_LIBADD line (replace 'mumble' with the name of the package you're building) within the appropriate Makefile.am. If for some reason the linker can't find the library, you can specify a path to it by adding something like this:
mumble_LDFLAGS = -R/usr/lib -L/usr/lib
But in this example, I have to believe that /usr/lib is in the default search path for libraries.
To your particular error message with sed, I don't know why fuppes uses sed to find /usr/lib/libogg.la, but this may hopefully be fixed by an appropriate change upstream from libtool (like in autoconf or automake). I suspect that there's a switch somewhere in 'configure' that helps with this issue (like --with-ogg or something). Run 'configure --help' and look for some hints there.
您不应该需要 .la 文件。您没有粘贴命令输出的重要部分 - 哪一步尝试链接到 libogg.la 文件。我的猜测是 libtool,我的猜测是升级后您将在源目录或 vcs checkout 中运行 make,而无需重新运行 autogen.sh 或进行相应配置。
简而言之,您没有提供足够的信息来进一步帮助您(您是如何获得 fuppes 的?您是如何构建它的?升级后您如何尝试构建它?)。很可能您忘记重新生成构建文件,或者某些其他链接器步骤正在拉入 .la 文件并且需要重新生成(例如,pkg-config 文件)。
You shouldn't be needing the .la files. You didn't paste the important parts of the command output - what step is trying to link to the libogg.la file. My guess is libtool, and my guess is that after upgrading you're running make in your source dir or vcs checkout, without rerunning autogen.sh or configure as appropriate.
In short, you don't give enough info to help you further (How did you get fuppes ? How did you build it ? How did you try to build it after upgrading ?). Most likely either you forgot to regenerate build files, or some other linker step is pulling in a .la file and needs to be regenerated (for example, a pkg-config file).