Tomcat mod_jk rpm-build for CentOS-8 - exit with error.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Tomcat mod_jk rpm-build for CentOS-8 - exit with error.

Klaus Tachtler
Hi,

I'm trying to build a rpm package for CentOS-8 for mod_jk with the  
latest version 1.2.48. While building the rpm package, following error  
occurs:


----- %< -----

...
make[1]: Entering directory  
'/root/rpmbuild/BUILD/tomcat-connectors-1.2.48-src/native/apache-2.0'
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc  
-I/usr/include/httpd -O2 -g -pipe -Wall -Werror=format-security  
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions  
-fstack-protector-strong -grecord-gcc-switches  
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic  
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  
-DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I../common -I ../common -DLINUX  
-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security  
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions  
-fstack-protector-strong -grecord-gcc-switches  
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic  
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  
-pthread -DHAVE_APR  -I/usr/include/apr-1 -I/usr/include/apr-1 -O2 -g  
-pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2  
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong  
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic  
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  
-DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security  
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions  
-fstack-protector-strong -grecord-gcc-switches  
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic  
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  
-I/usr/include/apr-1  -Wl,-z,relro,-z,now -Wl,-z,relro -Wl,-z,now  
-Wl,-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o mod_jk.la -module  
-rpath /usr/lib64/httpd/modules -avoid-version mod_jk.lo  
../common/jk_ajp12_worker.lo ../common/jk_connect.lo  
../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo  
../common/jk_pool.lo ../common/jk_worker.lo  
../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo  
../common/jk_sockbuf.lo ../common/jk_map.lo  
../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo  
../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_shm.lo  
../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo  
../common/jk_status.lo
/usr/bin/ld: unrecognized option  
'-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:83: mod_jk.la] Error 1
make[1]: Leaving directory  
'/root/rpmbuild/BUILD/tomcat-connectors-1.2.48-src/native/apache-2.0'
make: *** [Makefile:470: all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.O4kRZI (%build)

----- >% -----


Any ideas how can I solve that problem?


Thank you in advance!
Klaus.

--

---------------------------------------
e-Mail  : [hidden email]
Homepage: https://www.tachtler.net
DokuWiki: https://dokuwiki.tachtler.net
---------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

attachment0 (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat mod_jk rpm-build for CentOS-8 - exit with error.

Stefan Mayr-2
Hi Klaus,

Am 06.07.2020 um 15:13 schrieb Klaus Tachtler:

> Hi,
>
> I'm trying to build a rpm package for CentOS-8 for mod_jk with the
> latest version 1.2.48. While building the rpm package, following error
> occurs:
>
>
> ----- %< -----
>
> ...
> make[1]: Entering directory
> '/root/rpmbuild/BUILD/tomcat-connectors-1.2.48-src/native/apache-2.0'
> /usr/lib64/apr-1/build/libtool --silent --mode=link gcc
> -I/usr/include/httpd -O2 -g -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
> -fstack-protector-strong -grecord-gcc-switches
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
> -DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I../common -I ../common -DLINUX
> -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
> -fstack-protector-strong -grecord-gcc-switches
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
> -pthread -DHAVE_APR  -I/usr/include/apr-1 -I/usr/include/apr-1 -O2 -g
> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong
> -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
> -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
> -fstack-protector-strong -grecord-gcc-switches
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
> -I/usr/include/apr-1  -Wl,-z,relro,-z,now -Wl,-z,relro -Wl,-z,now
> -Wl,-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o mod_jk.la -module
> -rpath /usr/lib64/httpd/modules -avoid-version mod_jk.lo
> ../common/jk_ajp12_worker.lo ../common/jk_connect.lo
> ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo
> ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo
> ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo
> ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo
> ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_shm.lo
> ../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo
> ../common/jk_status.lo
> /usr/bin/ld: unrecognized option
> '-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
> /usr/bin/ld: use the --help option for usage information
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:83: mod_jk.la] Error 1
> make[1]: Leaving directory
> '/root/rpmbuild/BUILD/tomcat-connectors-1.2.48-src/native/apache-2.0'
> make: *** [Makefile:470: all-recursive] Error 1
> error: Bad exit status from /var/tmp/rpm-tmp.O4kRZI (%build)
>
> ----- >% -----
Does it build without the specfile? I tried to reproduce it in a simple
Dockerfile. This works so far - can you show us your .spec-file?

Sample Dockerfile to build mod_jk on CentOS 8

FROM centos:8
ARG JK_VERSION=1.2.48
ARG
REMOTE_URL=https://downloads.apache.org/tomcat/tomcat-connectors/jk/tomcat-connectors-${JK_VERSION}-src.tar.gz
RUN yum --assumeyes --quiet update && \
    yum --assumeyes --quiet install \
        diffutils \
        file \
        gcc \
        httpd-devel \
        libtool \
        make \
        redhat-rpm-config && \
    yum clean all
RUN cd /usr/src && \
    curl --silent --remote-name ${REMOTE_URL} && \
    tar -xzf tomcat-connectors-${JK_VERSION}-src.tar.gz && \
    cd tomcat-connectors-${JK_VERSION}-src/native && \
    ./configure --with-apxs=/usr/bin/apxs  && \
    make && \
    libtool --finish /usr/lib64/httpd/modules && \
    make install

Regards,

        Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]