gpt4 book ai didi

Tomcat tcnative 在 solaris 上构建

转载 作者:行者123 更新时间:2023-11-28 23:28:14 25 4
gpt4 key购买 nike

我正在尝试在我的 solaris 机器上安装 tomcat tc-native

uname -a
SunOS ovtasun4 5.10 Generic_147440-01 sun4u sparc SUNW,Sun-Fire-V240
# which cc
/opt/solarisstudio12.4/bin/cc

我是这样配置的,

./configure --with-apr=/usr/local/apr/bin/apr-1-config --with-java-home=$JAVA_HOME --with-ssl=/usr/local/ssl --prefix=$CATALINA_HOME 

但是 make 命令在构建时给出了这个错误

dladdr                              0x85c       /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `libtcnative-1.la'
Current working directory /tomcat/apache-tomcat-8.0.29/bin/tomcat-native-1.1.33-src/jni/native
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive | sed s/-recursive//`; \
list='src os/unix os/win32 '; \
for i in $list; do \
if test -f "$i/Makefile"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z "libtcnative-1.la"; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'

最佳答案

您要构建 64 位吗?如果是这样,您必须使用 -kPIC/-kpic 进行编译或适当的 -xcode=picX选项,作为 Solaris 共享对象 pretty much require position-independent code , 还有 32 位的情况下你必须做同样的事情:

The code within a dynamic executable is typically position-dependent, and is tied to a fixed address in memory. Shared objects, on the other hand, can be loaded at different addresses in different processes. Position-independent code is not tied to a specific address. This independence allows the code to execute efficiently at a different address in each process that uses the code. Position-independent code is recommended for the creation of shared objects.

The compiler can generate position-independent code under the -K pic option.

If a shared object is built from position-dependent code, the text segment can require modification at runtime. This modification allows relocatable references to be assigned to the location that the object has been loaded. The relocation of the text segment requires the segment to be remapped as writable. This modification requires a swap space reservation, and results in a private copy of the text segment for the process. The text segment is no longer sharable between multiple processes. Position-dependent code typically requires more runtime relocations than the corresponding position-independent code. Overall, the overhead of processing text relocations can cause serious performance degradation.

关于Tomcat tcnative 在 solaris 上构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34179655/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com