RApache with httpd 2.4 on Centos htpd24 scl

240 views
Skip to first unread message

Justin Dearing

unread,
Mar 5, 2015, 9:41:53 PM3/5/15
to rap...@googlegroups.com
I have a machine with centos 6.6 final and the httpd24 software collection library. Basically a yum repo that installs most files to  /opt/rh/httpd24/root/usr/(bin|sbin|lib64|etc) and I can start it with `service httpd24-httpd start`

First of all,  --with-apache2-apxs was completely broken. I found a battle tested macro online. My fix is here https://github.com/zippy1981/rapache/tree/httpd24-scl

I want to run mod_R on this version of apache. I do the following:

scl enable httpd24 bash # prepends /opt/rh/httpd24/root/usr/bin:/opt/rh/httpd24/root/usr/sbin: to $PATH
./configure 

This gives me the following amongst other lines:

checking for --with-apxs... no
checking for apxs... /opt/rh/httpd24/root/usr/bin/apxs
checking for R... /usr/bin/R
checking for apreq2-config... /usr/bin/apreq2-config

Note the scl does not have its own apreq-config

make happens like this:

[jdearing@XXXXXXXX rapache]$ make

Configuring libapreq2

touch .apreq-config

Compiling mod_R

/opt/rh/httpd24/root/usr/bin/apxs -I/usr/include/R -I/usr/include/apreq2 -I/usr/include/apr-1   -c mod_R.c -Wl,-rpath,/usr/lib64/R/lib -Wl,--export-dynamic -fopenmp  -L/usr/lib64/R/lib -lR -lrt -ldl -lm -licuuc -licui18n -L/usr/lib64 -lapreq2
/opt/rh/httpd24/root/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -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 -pthread -I/opt/rh/httpd24/root/usr/include/httpd  -I/opt/rh/httpd24/root/usr/include/apr-1   -I/opt/rh/httpd24/root/usr/include/apr-1 -I/opt/rh/httpd24/root/usr/include -I/usr/include/R -I/usr/include/apreq2 -I/usr/include/apr-1  -c -o mod_R.lo mod_R.c && touch mod_R.slo
mod_R.c: In function ‘ReadRequestBody’:
mod_R.c:792: warning: pointer targets in passing argument 2 of ‘apr_brigade_flatten’ differ in signedness
/opt/rh/httpd24/root/usr/include/apr-1/apr_buckets.h:749: note: expected ‘char *’ but argument is of type ‘unsigned char *’
mod_R.c:764: warning: unused variable ‘data’
mod_R.c: In function ‘RApache_setCookie’:
mod_R.c:1802: warning: unused variable ‘cookies’
mod_R.c: In function ‘RApache_getServer’:
mod_R.c:2125: warning: implicit declaration of function ‘ap_get_server_port’
mod_R.c: In function ‘dirname’:
mod_R.c:1100: warning: ‘j’ may be used uninitialized in this function
mod_R.c: In function ‘RApache_receiveBin’:
mod_R.c:2406: warning: ‘buf’ may be used uninitialized in this function
mod_R.c: In function ‘RApache_setCookie’:
mod_R.c:1824: warning: ‘tmpExpires’ may be used uninitialized in this function
/opt/rh/httpd24/root/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99 -Wl,-z,relro,-z,now   -o mod_R.la  -rpath /opt/rh/httpd24/root/usr/lib64/httpd/modules -module -avoid-version    mod_R.lo -Wl,-rpath,/usr/lib64/R/lib -Wl,--export-dynamic -fopenmp -L/usr/lib64/R/lib -lR -lrt -ldl -lm -licuuc -licui18n -L/usr/lib64 -lapreq2
R_DEFAULT_PACKAGES=NULL /usr/bin/R --vanilla --no-readline --slave -f tools/config_http.R --args /opt/rh/httpd24/root/usr/bin/apxs /opt/rh/httpd24/root/usr/sbin/httpd
[jdearing@CA1LRWEBDEV03 rapache]$


make install is where things get interesting:


Compiling mod_R

/opt/rh/httpd24/root/usr/bin/apxs -I/usr/include/R -I/usr/include/apreq2 -I/usr/include/apr-1   -c mod_R.c -Wl,-rpath,/usr/lib64/R/lib -Wl,--export-dynamic -fopenmp  -L/usr/lib64/R/lib -lR -lrt -ldl -lm -licuuc -licui18n -L/usr/lib64 -lapreq2
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security -fno-strict-aliasing  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1  -I/usr/include/R -I/usr/include/apreq2 -I/usr/include/apr-1  -c -o mod_R.lo mod_R.c && touch mod_R.slo
mod_R.c: In function ‘ReadRequestBody’:
mod_R.c:792: warning: pointer targets in passing argument 2 of ‘apr_brigade_flatten’ differ in signedness
/usr/include/apr-1/apr_buckets.h:747: note: expected ‘char *’ but argument is of type ‘unsigned char *’
mod_R.c:764: warning: unused variable ‘data’
mod_R.c: In function ‘RApache_setCookie’:
mod_R.c:1802: warning: unused variable ‘cookies’
mod_R.c: In function ‘RApache_getServer’:
mod_R.c:2125: warning: implicit declaration of function ‘ap_get_server_port’
mod_R.c: In function ‘dirname’:
mod_R.c:1100: warning: ‘j’ may be used uninitialized in this function
mod_R.c: In function ‘RApache_receiveBin’:
mod_R.c:2406: warning: ‘buf’ may be used uninitialized in this function
mod_R.c: In function ‘RApache_setCookie’:
mod_R.c:1824: warning: ‘tmpExpires’ may be used uninitialized in this function
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc   -Wl,-z,relro -o mod_R.la  -rpath /usr/lib64/httpd/modules -module -avoid-version    mod_R.lo -Wl,-rpath,/usr/lib64/R/lib -Wl,--export-dynamic -fopenmp -L/usr/lib64/R/lib -lR -lrt -ldl -lm -licuuc -licui18n -L/usr/lib64 -lapreq2
/opt/rh/httpd24/root/usr/bin/apxs -i -n R mod_R.la
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' mod_R.la /usr/lib64/httpd/modules
/usr/lib64/apr-1/build/libtool --mode=install cp mod_R.la /usr/lib64/httpd/modules/
libtool: install: cp .libs/mod_R.so /usr/lib64/httpd/modules/mod_R.so
libtool: install: cp .libs/mod_R.lai /usr/lib64/httpd/modules/mod_R.la
libtool: install: cp .libs/mod_R.a /usr/lib64/httpd/modules/mod_R.a
libtool: install: chmod 644 /usr/lib64/httpd/modules/mod_R.a
libtool: install: ranlib /usr/lib64/httpd/modules/mod_R.a
libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /usr/lib64/httpd/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib64/httpd/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/lib64/httpd/modules/mod_R.so


I need the above highlighted libtool to be changed to  /opt/rh/httpd24/root/usr/lib64/apr-1/build/libtool. How do I do that?

Thanks,

Justin

Justin Dearing

unread,
Mar 9, 2015, 9:41:18 AM3/9/15
to rap...@googlegroups.com
I solved it. It was stupid.

When I do "sudo make install" sudo removes the items "scl enable httpd bash" prepends to my path. So the answer is "sudo scl enable httpd make install".
Reply all
Reply to author
Forward
0 new messages