Bug 1319837

Summary: apxs generates Makefile with wrong path
Product: Red Hat Software Collections Reporter: Ondřej Pták <optak>
Component: httpdAssignee: Jan Kaluža <jkaluza>
Status: CLOSED ERRATA QA Contact: Ondřej Pták <optak>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: httpd24CC: kanderso
Target Milestone: betaKeywords: Regression
Target Release: 2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: httpd-2.4.18-6.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-31 10:17:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ondřej Pták 2016-03-21 15:54:27 UTC
Description of problem:
Tool apxs from http24-httpd-devel generates Makefile with
top_builddir=/opt/rh/httpd24/root/etc/httpd
This cause make to fail, because:
/opt/rh/httpd24/root/usr/lib64/httpd/build/special.mk:27: /opt/rh/httpd24/root/etc/httpd/build/rules.mk: No such file or directory
With this value building module succeeds:
top_builddir=/opt/rh/httpd24/root/usr/lib64/httpd

The test which builds module worked on rhel-6, so there it's regression,
on rhel-7 systems this has been an issue also in rhscl-1.1.

Version-Release number of selected component (if applicable):
httpd24-httpd-devel-2.4.18-4

How reproducible:
always

Steps to Reproduce:
1, echo '#include "httpd.h"' > test.c
1. apxs -c test.c
2. apxs -g -n kaboom
3. make -C kaboom

Actual results:
make[1]: Entering directory `/mnt/testarea/test/kaboom'
/opt/rh/httpd24/root/usr/lib64/httpd/build/special.mk:27: /opt/rh/httpd24/root/etc/httpd/build/rules.mk: No such file or directory
make[1]: *** No rule to make target `/opt/rh/httpd24/root/etc/httpd/build/rules.mk'.  Stop.
make[1]: Leaving directory `/mnt/testarea/test/kaboom'

Expected results:
make[1]: Entering directory `/mnt/testarea/test/kaboom'
/opt/rh/httpd24/root/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I/opt/rh/httpd24/root/usr/include/httpd -I. -I/opt/rh/httpd24/root/usr/include/apr-1 -I/opt/rh/httpd24/root/usr/include -prefer-pic -c mod_kaboom.c && touch mod_kaboom.slo
/opt/rh/httpd24/root/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99  -pthread  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -L/opt/rh/httpd24/root/usr/lib64  -Wl,-z,relro,-z,now    -o mod_kaboom.la -rpath /opt/rh/httpd24/root/usr/lib64/httpd/modules -module -avoid-version  mod_kaboom.lo
make[1]: Leaving directory `/mnt/testarea/test/kaboom'

Additional info:

Comment 9 errata-xmlrpc 2016-05-31 10:17:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1154