79702278

Date: 2025-07-15 15:14:19
Score: 0.5
Natty:
Report link

OK, I found the cause of the error: when I modified the Makefile for generating libapr, I added the -fPIC parameter to the command for generating the target file instead of the command for generating the library. In fact,we can use the ./configure to specify the parameter. Therefore, the correct replacement command should be as follows:

su -
# create the installation directory
mkdir /usr/local/apr

# get the tarball
cd /usr/local/src
wget https://github.com/apache/apr/archive/refs/tags/1.7.0.tar.gz
tar -zcvf 1.7.0.tar.gz

# install
cd 1.7.0.tar.gz
./buildconf
./configure --prefix=/usr/local/apr CFLAGS="-fPIC" CXXFLAGS="-fPIC"
make && make install

# replace
cp /usr/local/apr/lib/libapr-1* /home/meyok/Project/oceanbase/deps/3rd/usr/local/oceanbase/deps/devel/lib
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: MeYokYang