尝试安装我构建的软件包时,从 libtool 得到这个非常奇怪的错误。它src/api在源代码树的子目录 ( ) 中运行时发生:
make[5]: Leaving directory '/users/galac/embray/src/slurm/src/api'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ../../libtool --mode=install /usr/bin/install -c libslurm.la '/usr/local/lib'
../../libtool: line 929: cd: ../..: Not a directory
Run Code Online (Sandbox Code Playgroud)
的相关部分libtool如下所示:
914 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
915 # is ksh but when the shell is invoked as "sh" and the current value of
916 # the _XPG environment variable is not equal to 1 (one), the special
917 # …Run Code Online (Sandbox Code Playgroud) 我在 SE 和其他教程上收到了很多关于此的相互矛盾的信息。大多数人似乎认为so版本是语义版本。然后其他人纠正他们,说它必须符合libtools 约定,并继续隐式假设或暗示传递-version-info C:R:A给 libtools 的数字创建名为 的文件libfoo.so.C.R.A。但我在 libtools 手册中没有看到任何地方明确说明文件的命名方式,这与我所看到的行为不匹配。
我正在构建一个第三方包(gdal),在构建过程中,它调用libtool --mode=link -version-info 25:4:5 <many other arguments>,但是构建后留在 .libs 中的 so 文件具有版本 libgdal.20.5.4。
我尝试了同一库的几个其他版本,它们似乎都遵循相同的模式。当您调用 libtools 时,您传入 current:revision:age,它会生成libfoo.so.current-age.age.revision. 这导致 sonamelibfoo.so.current-age始终是库兼容的最小版本,而不是其他帖子建议的最大版本。
我在 RHEL 7 和 Debian 10 上进行了此测试。
这是事情应该如何进行的吗?这个图书馆在做什么奇怪的事情吗?是否有任何地方可以权威地或至少正确地记录这一点?