AIX-不安装共享库
我能够在 AIX 上使用神圣的本机编译器“xlc”成功构建共享对象。它确实构建了共享对象库,但不安装共享对象库。
配置命令为: ./configure --prefix=/PATH/to/install --exec-prefix=/PATH/to/install --enable-shared --enable-static=no --enable-module=so --build=powerpc- ibm-aix5.3.0.0 --host=powerpc-ibm-aix5.3.0.0 LDFLAGS="-G -shared"
有任何帮助吗?
I am able to build the shared object successfully using the holy native compiler "xlc" on AIX.It does build the shared object library but does not install the shared object library.
Configure command is:
./configure --prefix=/PATH/to/install --exec-prefix=/PATH/to/install --enable-shared --enable-static=no --enable-module=so --build=powerpc-ibm-aix5.3.0.0 --host=powerpc-ibm-aix5.3.0.0 LDFLAGS="-G -shared"
Any help would be appreciated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
所以您正在尝试编译到共享库位置。
我建议您看看是否可以编译/链接到本地目录。
如果有效,请尝试将新库复制到正确的目录。旧共享库可能已被某个进程打开,因此无法被覆盖。
您收到任何错误消息吗?
So you are trying to compile to the shared library location.
I would suggest seeing if you can compile/link to your local directory.
If that works, try copying the new library to the correct directory. It may be that the oldshared library is open by some process and therefore can't be overwritten.
Are you getting any error messages?
当我必须将 LDFLAGS 专门导出为“-brtl -L/path/to/install”时,我可以成功安装共享库。
I could install the shared library successfully when i had to exclusively export LDFLAGS as "-brtl -L/path/to/install".
在 AIX 下,有两种类型的共享库:AIX 样式和 SysV 兼容库。
AIX 风格的库是可以包含静态库以及多个版本的共享库的 archvies,其名称类似于 libFOO.a
SysV 兼容库的名称类似于 libFoo.so,并且更像您在 Linux 上找到的名称。
Libtool 将构建任一类型。如果您想要 SysV 兼容的库,请将 -Wl,-brtl 添加到 LDFLAGS。
我的猜测是,您看到 /PATH/to/install/lib/libFOO.a 并假设它是一个静态库,而实际上,它是一个 AIX 共享库。
Under AIX, there are two types of shared libraries, AIX style, and SysV compat libs.
AIX style libs are archvies that can contain static libraries as well as multiple versions of shared libraries, and have names like libFOO.a
SysV-compat libs have names like libFoo.so and are more like what you would find on Linux.
Libtool will build either type. If you want SysV-compat libs, add -Wl,-brtl to LDFLAGS.
My guess is that you see /PATH/to/install/lib/libFOO.a and are assuming that it's a static library, when in fact, it's an AIX shared library.