Bug 1620 - [Anolis8.6][anck][x86_64][httpd兼容性] httpd-2.4.17/httpd-2.4.18源码编译报错
Summary: [Anolis8.6][anck][x86_64][httpd兼容性] httpd-2.4.17/httpd-2.4.18源码编译报错
Status: CONFIRMED
Alias: None
Product: Anolis OS 8
Classification: Anolis OS
Component: Others (show other bugs) Others
Version: 8.6
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: 葛立伟
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-05 16:05 UTC by anolislw
Modified: 2022-07-05 16:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anolislw alibaba_cloud_group 2022-07-05 16:05:27 UTC
[问题简述]
在anoliss8.6 anck x86_64环境下,httpd-2.4.17/httpd-2.4.18源码安装,编译过程出错

[报错信息]
exports.c:1659:13: note: previous definition of 'ap_hack_apr_uid_current' was here
const void *ap_hack_apr_uid_current = (const void *)apr_uid_current;
^~~~~~~~~~~~~~~~~~~~~~~
exports.c:2715:13: error: redefinition of 'ap_hack_apr_uid_name_get'
const void *ap_hack_apr_uid_name_get = (const void *)apr_uid_name_get;
^~~~~~~~~~~~~~~~~~~~~~~~
exports.c:1660:13: note: previous definition of 'ap_hack_apr_uid_name_get' was here
const void *ap_hack_apr_uid_name_get = (const void *)apr_uid_name_get;
^~~~~~~~~~~~~~~~~~~~~~~~
exports.c:2716:13: error: redefinition of 'ap_hack_apr_uid_get'
const void *ap_hack_apr_uid_get = (const void *)apr_uid_get;
^~~~~~~~~~~~~~~~~~~
exports.c:1661:13: note: previous definition of 'ap_hack_apr_uid_get' was here
const void *ap_hack_apr_uid_get = (const void *)apr_uid_get;
^~~~~~~~~~~~~~~~~~~
exports.c:2717:13: error: redefinition of 'ap_hack_apr_uid_homepath_get'
const void *ap_hack_apr_uid_homepath_get = (const void *)apr_uid_homepath_get;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
exports.c:1662:13: note: previous definition of 'ap_hack_apr_uid_homepath_get' was here
const void *ap_hack_apr_uid_homepath_get = (const void *)apr_uid_homepath_get;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
exports.c:2722:13: error: redefinition of 'ap_hack_apr_gid_name_get'
const void *ap_hack_apr_gid_name_get = (const void *)apr_gid_name_get;
^~~~~~~~~~~~~~~~~~~~~~~~
exports.c:1667:13: note: previous definition of 'ap_hack_apr_gid_name_get' was here
const void *ap_hack_apr_gid_name_get = (const void *)apr_gid_name_get;
^~~~~~~~~~~~~~~~~~~~~~~~
exports.c:2723:13: error: redefinition of 'ap_hack_apr_gid_get'
const void *ap_hack_apr_gid_get = (const void *)apr_gid_get;
^~~~~~~~~~~~~~~~~~~
exports.c:1668:13: note: previous definition of 'ap_hack_apr_gid_get' was here
const void *ap_hack_apr_gid_get = (const void *)apr_gid_get;
^~~~~~~~~~~~~~~~~~~
exports.c:2741:13: error: redefinition of 'ap_hack_apr_version'
const void *ap_hack_apr_version = (const void *)apr_version;
^~~~~~~~~~~~~~~~~~~
exports.c:1679:13: note: previous definition of 'ap_hack_apr_version' was here
const void *ap_hack_apr_version = (const void *)apr_version;
^~~~~~~~~~~~~~~~~~~
exports.c:2742:13: error: redefinition of 'ap_hack_apr_version_string'
const void *ap_hack_apr_version_string = (const void *)apr_version_string;
^~~~~~~~~~~~~~~~~~~~~~~~~~
exports.c:1680:13: note: previous definition of 'ap_hack_apr_version_string' was here
const void *ap_hack_apr_version_string = (const void *)apr_version_string;
^~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [/root/httpd-2.4.17/build/rules.mk:206: exports.lo] Error 1
make[2]: Leaving directory '/root/httpd-2.4.17/server'
make[1]: *** [/root/httpd-2.4.17/build/rules.mk:75: all-recursive] Error 1
make[1]: Leaving directory '/root/httpd-2.4.17/server'
make: *** [/root/httpd-2.4.17/build/rules.mk:75: all-recursive] Error 1

[复现步骤]
wget http://archive.apache.org/dist/httpd/httpd-2.4.17.tar.gz

systemctl stop firewalld
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0 
yum install -y make gcc gcc-c++ expat-devel

#Apache扩展包:
wget http://archive.apache.org/dist/apr/apr-1.5.0.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.39/pcre-8.39.tar.gz

#解压编译扩展包:
tar xvf  pcre-8.39.tar.gz apr-util-1.5.4.tar.gz pcre-8.39.tar.gz
cd apr-1.5.0/
./configure --prefix=/usr/local/apr
make && make install

cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr
make && make install

cd pcre-8.39/
./configure --prefix=/usr/local/pcre
make && make install

cd httpd-2.4.17/
./configure --prefix=/http2417 \
	--with-apr=/usr/local/apr \
	--with-apr-util=/usr/local/apr-util \
	--enable-so \  
	--enable-rewrite
make  #编译失败
make install