问题:
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs 644
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/user/lib/instantclient_19_15" x86_64-linux-gnu-gcc -shared -L/usr/local/lib -fstack-protector-strong Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/opt/user/lib/instantclient_19_15/ -Wl,-rpath,/opt/user/lib/instantclient_19_15/ -lclntsh -Wl,--no-as-needed -lclntshcore -lipc1 -lmql1 \
/usr/bin/ld: cannot find -lclntshcore
collect2: error: ld returned 1 exit status
make: *** [Makefile:524: blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
root# ln -s /oracle/base/dbhome_1/lib/libclntshcore.so.12.1 /usr/lib/
root# ls -l /usr/lib/libclntshcore.so.12.1
lrwxrwxrwx 1 root root 47 Sep 19 11:08 /usr/lib/libclntshcore.so.12.1 -> /oracle/base/dbhome_1/lib/libclntshcore.so.12.1
root#
Weird, this lib is an oracle lib..and the installer is looking for it in the wrong location. I’ll link this lib in the general lib location where it always can be found: /usr/lib.
这个库是oracle的一个库 并不是放在/usr/lib下 所以gcc找不到路径
我明白了,是gcc找不到,于是我在/usr/lib下做了软连接
ln -s $ORACLE_HOME libclntshcore.so.19.1 libclntshcore.so
说白了就是保证/usr/lib下目录面有 libclntshcore.so文件


博客讲述了在编译过程中遇到GCC无法找到Oracle库-lclntshcore的问题。作者通过检查LD_RUN_PATH和创建软链接到/usr/lib解决了这个问题,确保编译器能够正确找到所需的库文件。
1373

被折叠的 条评论
为什么被折叠?



