Mailing List Archive

[Bug 66872] New: mod_perl compilation error: /usr/bin/ld: final link failed: Nonrepresentable section on output
https://bz.apache.org/bugzilla/show_bug.cgi?id=66872

Bug ID: 66872
Summary: mod_perl compilation error: /usr/bin/ld: final link
failed: Nonrepresentable section on output
Product: Apache httpd-2
Version: 2.4.54
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Build
Assignee: bugs@httpd.apache.org
Reporter: forum.user@thinkinghat.co.uk
Target Milestone: ---

I am not able to compile mod_perl on RHEL8. The Perl installation is a local
one, and so is the Apache2 version.

I have been able to compile it historically on Solaris, SLES11, etc. and RHEL7
- but on RHEL8.

What am l doing wrong?

LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: RedHatEnterprise
Description: Red Hat Enterprise Linux release 8.7 (Ootpa)
Release: 8.7
Codename: Ootpa

Compile Steps
~~~~~~~~~~~~~

# Build mod_perl
echo "##################################################"
echo "# Installing mod_perl"
echo "##################################################"
cd $dir_mod_perl
pwd
CFLAGS="-fPIC" LDFLAGS="-fPIC" perl Makefile.PL APACHE_SRC=$dir_apache2/src \
DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
echo "Config Status = $?"
make
echo "Make Status = $?"

Output:
~~~~~~~
. . . .
rm -f mod_perl.so
gcc -shared -O2 -L/usr/local/lib -fstack-protector-strong \
\
mod_perl.lo modperl_interp.lo modperl_tipool.lo modperl_log.lo
modperl_config.lo modperl_cmd.lo modperl_options.lo modperl_callback.lo
modperl_handler.lo modperl_gtop.lo modperl_util.lo modperl_io.lo
modperl_io_apache.lo modperl_filter.lo modperl_bucket.lo modperl_mgv.lo
modperl_pcw.lo modperl_global.lo modperl_env.lo modperl_cgi.lo modperl_perl.lo
modperl_perl_global.lo modperl_perl_pp.lo modperl_sys.lo modperl_module.lo
modperl_svptr_table.lo modperl_const.lo modperl_constants.lo
modperl_apache_compat.lo modperl_error.lo modperl_debug.lo
modperl_common_util.lo modperl_common_log.lo modperl_hooks.lo
modperl_directives.lo modperl_flags.lo modperl_xsinit.lo modperl_exports.lo
-Wl,-E -fstack-protector-strong -L/usr/local/lib
-L/home/app_home/apps/perl5/lib/5.38.0/x86_64-linux-thread-multi/CORE -lperl
-lpthread -ldl -lm -lcrypt -lutil -lc \
-o mod_perl.so
.. . . .

/usr/bin/ld:
/home/apps_home/apps/perl5/lib/5.38.0/x86_64-linux-thread-multi/CORE/libperl.a(DynaLoader.o):
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a
shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:156: mod_perl.so] Error 1
make[1]: Leaving directory
'/home/apps_home/temp/compile-apache2/mod_perl-2.0.12/src/modules/perl'
make: *** [Makefile:451: modperl_lib] Error 2
Make Status = 2

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org