You are not logged in.

#1 2013-01-26 02:06:23

lostmahmind
Member
Registered: 2013-01-24
Posts: 5

[Solved] Cannot build suPHP

https://aur.archlinux.org/packages/suphp/

All prerequisites have been installed 3 three times over (via pacman, apache, etc, all from arch repos) , the system and everything is up to date (syy+syu).

At first I had a build error which mentioned not being able to find apr.h and such, which I got past with the following change to the package's make command;
make CFLAGS+=-I/usr/include/apr-1/

That change got me to this build error below which I have not been able to make progress past, if anyone could help me figure out how to get suphp built it'd be greatly appreciated, thanks!

I tried building suPHP directly from it's own source with the same configs as provided in the AUR package even! The output is from that (exactly the same either way).

configure:

./configure --prefix=/usr --with-apr=/usr/bin/apr-1-config --sysconfdir=/etc/suphp --with-apache-user=http --with-setid-mode=owner --with-min-uid=33 --with-min-gid=33

build error:

$ make CFLAGS+=-I/usr/include/apr-1              Making all in src
make[1]: Entering directory `/root/src/suphp-0.7.1/suphp-0.7.1/src'
make  all-recursive
make[2]: Entering directory `/root/src/suphp-0.7.1/suphp-0.7.1/src'
Making all in apache
make[3]: Entering directory `/root/src/suphp-0.7.1/suphp-0.7.1/src/apache'
/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src    -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DSUPHP_PATH_TO_SUPHP=\"/usr/sbin/suphp\"  -I/usr/include/apr-1 -MT mod_suphp.lo -MD -MP -MF .deps/mod_suphp.Tpo -c -o mod_suphp.lo mod_suphp.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I../../src -I/usr/include/httpd -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DSUPHP_PATH_TO_SUPHP=\"/usr/sbin/suphp\" -I/usr/include/apr-1 -MT mod_suphp.lo -MD -MP -MF .deps/mod_suphp.Tpo -c mod_suphp.c  -fPIC -DPIC -o .libs/mod_suphp.o
mod_suphp.c:47:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘suphp_module’
mod_suphp.c:59:5: error: unknown type name ‘table’
mod_suphp.c:66:38: error: unknown type name ‘pool’
mod_suphp.c:84:37: error: unknown type name ‘pool’
mod_suphp.c:125:41: error: unknown type name ‘pool’
mod_suphp.c:145:40: error: unknown type name ‘pool’
mod_suphp.c: In function ‘suphp_handle_cmd_engine’:
mod_suphp.c:191:30: error: ‘suphp_module’ undeclared (first use in this function)
mod_suphp.c:191:30: note: each undeclared identifier is reported only once for each function it appears in
mod_suphp.c: In function ‘suphp_handle_cmd_config’:
mod_suphp.c:207:21: warning: assignment makes pointer from integer without a cast [enabled by default]
mod_suphp.c: In function ‘suphp_handle_cmd_add_handler’:
mod_suphp.c:238:15: error: ‘suphp_module’ undeclared (first use in this function)
mod_suphp.c: In function ‘suphp_handle_cmd_remove_handler’:
mod_suphp.c:253:15: error: ‘suphp_module’ undeclared (first use in this function)
mod_suphp.c: In function ‘suphp_handle_cmd_phppath’:
mod_suphp.c:266:26: error: ‘suphp_module’ undeclared (first use in this function)
mod_suphp.c:268:19: warning: assignment makes pointer from integer without a cast [enabled by default]
mod_suphp.c: At top level:
mod_suphp.c:277:5: warning: initialization from incompatible pointer type [enabled by default]
mod_suphp.c:277:5: warning: (near initialization for ‘suphp_cmds[0].func.no_args’) [enabled by default]
mod_suphp.c:279:5: warning: initialization from incompatible pointer type [enabled by default]
mod_suphp.c:279:5: warning: (near initialization for ‘suphp_cmds[1].func.no_args’) [enabled by default]
mod_suphp.c:285:5: warning: initialization from incompatible pointer type [enabled by default]
mod_suphp.c:285:5: warning: (near initialization for ‘suphp_cmds[2].func.no_args’) [enabled by default]
mod_suphp.c:287:5: warning: initialization from incompatible pointer type [enabled by default]
mod_suphp.c:287:5: warning: (near initialization for ‘suphp_cmds[3].func.no_args’) [enabled by default]
mod_suphp.c:289:5: warning: initialization from incompatible pointer type [enabled by default]
mod_suphp.c:289:5: warning: (near initialization for ‘suphp_cmds[4].func.no_args’) [enabled by default]
mod_suphp.c:296:34: error: unknown type name ‘child_info’
mod_suphp.c:336:27: error: unknown type name ‘child_info’
mod_suphp.c: In function ‘suphp_source_handler’:
mod_suphp.c:424:5: error: unknown type name ‘pool’
mod_suphp.c:426:5: error: unknown type name ‘BUFF’
mod_suphp.c:433:12: error: ‘suphp_module’ undeclared (first use in this function)
mod_suphp.c:438:7: warning: assignment from incompatible pointer type [enabled by default]
mod_suphp.c:445:23: warning: passing argument 4 of ‘ap_log_rerror’ makes integer from pointer without a cast [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘apr_status_t’ but argument is of type ‘struct request_rec *’
mod_suphp.c:445:23: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘const struct request_rec *’ but argument is of type ‘char *’
mod_suphp.c:449:23: warning: passing argument 4 of ‘ap_log_rerror’ makes integer from pointer without a cast [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘apr_status_t’ but argument is of type ‘struct request_rec *’
mod_suphp.c:449:23: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘const struct request_rec *’ but argument is of type ‘char *’
mod_suphp.c:453:23: warning: passing argument 4 of ‘ap_log_rerror’ makes integer from pointer without a cast [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘apr_status_t’ but argument is of type ‘struct request_rec *’
mod_suphp.c:453:23: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘const struct request_rec *’ but argument is of type ‘char *’
mod_suphp.c:459:29: error: ‘suphp_source_child’ undeclared (first use in this function)
mod_suphp.c:459:61: error: ‘kill_after_timeout’ undeclared (first use in this function)
mod_suphp.c:462:23: warning: passing argument 4 of ‘ap_log_rerror’ makes integer from pointer without a cast [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘apr_status_t’ but argument is of type ‘struct request_rec *’
mod_suphp.c:462:23: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘const struct request_rec *’ but argument is of type ‘char *’
mod_suphp.c: In function ‘suphp_handler’:
mod_suphp.c:521:5: error: unknown type name ‘pool’
mod_suphp.c:523:5: error: unknown type name ‘BUFF’
mod_suphp.c:527:13: error: ‘suphp_module’ undeclared (first use in this function)
mod_suphp.c:530:7: warning: assignment from incompatible pointer type [enabled by default]
mod_suphp.c:539:49: warning: comparison between pointer and integer [enabled by default]
mod_suphp.c:540:53: warning: comparison between pointer and integer [enabled by default]
mod_suphp.c:541:17: error: invalid type argument of unary ‘*’ (have ‘int’)
mod_suphp.c:544:16: error: invalid type argument of unary ‘*’ (have ‘int’)
mod_suphp.c:563:23: warning: passing argument 4 of ‘ap_log_rerror’ makes integer from pointer without a cast [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘apr_status_t’ but argument is of type ‘struct request_rec *’
mod_suphp.c:563:23: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘const struct request_rec *’ but argument is of type ‘char *’
mod_suphp.c:567:23: warning: passing argument 4 of ‘ap_log_rerror’ makes integer from pointer without a cast [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘apr_status_t’ but argument is of type ‘struct request_rec *’
mod_suphp.c:567:23: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘const struct request_rec *’ but argument is of type ‘char *’
mod_suphp.c:571:23: warning: passing argument 4 of ‘ap_log_rerror’ makes integer from pointer without a cast [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘apr_status_t’ but argument is of type ‘struct request_rec *’
mod_suphp.c:571:23: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘const struct request_rec *’ but argument is of type ‘char *’
mod_suphp.c:649:14: warning: assignment makes pointer from integer without a cast [enabled by default]
mod_suphp.c:653:13: warning: passing argument 1 of ‘ap_pbase64decode’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:24:0:
/usr/include/httpd/httpd.h:1657:20: note: expected ‘struct apr_pool_t *’ but argument is of type ‘int *’
mod_suphp.c:658:31: warning: assignment makes pointer from integer without a cast [enabled by default]
mod_suphp.c:659:31: warning: assignment makes pointer from integer without a cast [enabled by default]
mod_suphp.c:690:29: error: ‘suphp_child’ undeclared (first use in this function)
mod_suphp.c:690:54: error: ‘kill_after_timeout’ undeclared (first use in this function)
mod_suphp.c:693:23: warning: passing argument 4 of ‘ap_log_rerror’ makes integer from pointer without a cast [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘apr_status_t’ but argument is of type ‘struct request_rec *’
mod_suphp.c:693:23: warning: passing argument 5 of ‘ap_log_rerror’ from incompatible pointer type [enabled by default]
In file included from mod_suphp.c:30:0:
/usr/include/httpd/http_log.h:219:18: note: expected ‘const struct request_rec *’ but argument is of type ‘char *’
mod_suphp.c:742:18: warning: assignment makes pointer from integer without a cast [enabled by default]
mod_suphp.c:755:27: warning: assignment makes pointer from integer without a cast [enabled by default]
mod_suphp.c:768:24: error: ‘REDIRECT’ undeclared (first use in this function)
mod_suphp.c: At top level:
mod_suphp.c:789:1: error: unknown type name ‘handler_rec’
mod_suphp.c:790:5: warning: braces around scalar initializer [enabled by default]
mod_suphp.c:790:5: warning: (near initialization for ‘suphp_handlers[0]’) [enabled by default]
mod_suphp.c:790:5: warning: initialization makes integer from pointer without a cast [enabled by default]
mod_suphp.c:790:5: warning: (near initialization for ‘suphp_handlers[0]’) [enabled by default]
mod_suphp.c:790:5: error: initializer element is not computable at load time
mod_suphp.c:790:5: error: (near initialization for ‘suphp_handlers[0]’)
mod_suphp.c:790:5: warning: excess elements in scalar initializer [enabled by default]
mod_suphp.c:790:5: warning: (near initialization for ‘suphp_handlers[0]’) [enabled by default]
mod_suphp.c:791:5: warning: braces around scalar initializer [enabled by default]
mod_suphp.c:791:5: warning: (near initialization for ‘suphp_handlers[1]’) [enabled by default]
mod_suphp.c:791:5: warning: initialization makes integer from pointer without a cast [enabled by default]
mod_suphp.c:791:5: warning: (near initialization for ‘suphp_handlers[1]’) [enabled by default]
mod_suphp.c:791:5: error: initializer element is not computable at load time
mod_suphp.c:791:5: error: (near initialization for ‘suphp_handlers[1]’)
mod_suphp.c:791:5: warning: excess elements in scalar initializer [enabled by default]
mod_suphp.c:791:5: warning: (near initialization for ‘suphp_handlers[1]’) [enabled by default]
mod_suphp.c:792:5: warning: braces around scalar initializer [enabled by default]
mod_suphp.c:792:5: warning: (near initialization for ‘suphp_handlers[2]’) [enabled by default]
mod_suphp.c:792:5: warning: initialization makes integer from pointer without a cast [enabled by default]
mod_suphp.c:792:5: warning: (near initialization for ‘suphp_handlers[2]’) [enabled by default]
mod_suphp.c:792:5: error: initializer element is not computable at load time
mod_suphp.c:792:5: error: (near initialization for ‘suphp_handlers[2]’)
mod_suphp.c:792:5: warning: excess elements in scalar initializer [enabled by default]
mod_suphp.c:792:5: warning: (near initialization for ‘suphp_handlers[2]’) [enabled by default]
mod_suphp.c:793:5: warning: braces around scalar initializer [enabled by default]
mod_suphp.c:793:5: warning: (near initialization for ‘suphp_handlers[3]’) [enabled by default]
mod_suphp.c:793:5: warning: initialization makes integer from pointer without a cast [enabled by default]
mod_suphp.c:793:5: warning: (near initialization for ‘suphp_handlers[3]’) [enabled by default]
mod_suphp.c:798:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘suphp_module’
make[3]: *** [mod_suphp.lo] Error 1
make[3]: Leaving directory `/root/src/suphp-0.7.1/suphp-0.7.1/src/apache'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/src/suphp-0.7.1/suphp-0.7.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/src/suphp-0.7.1/suphp-0.7.1/src'
make: *** [all-recursive] Error 1

Last edited by lostmahmind (2013-01-26 23:17:59)

Offline

#2 2013-01-26 02:30:35

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 438

Re: [Solved] Cannot build suPHP

This builds fine for me out of the box, even in a clean chroot.

Have you customized your LAMP stack? e.g. built a newer/custom apache

nvm: I see you said your apache is straight from the repos. Then I dunno, I didn't even have to mess with the apr header.

Last edited by tdy (2013-01-26 02:34:59)


dots (or just the awesomewm config)

$ whatis this?
this?: nothing appropriate.

Offline

#3 2013-01-26 02:37:51

lostmahmind
Member
Registered: 2013-01-24
Posts: 5

Re: [Solved] Cannot build suPHP

Actually, this was a while ago, but I just remembered that I modified the the arch apache package to include a patch which removes the server tag and version information, you think that could have ruined the suphp build?

I did notice just now that the suphp/src path contains both an apache and apach2 directory, and the build error I see is trying to build with suphp/src/apache, maybe i have to force it to look at the suphp/src/apache2 directory instead? Is there any way you can tell which of the two source directories was used to build suphp?

I'm not sure if that'll do it. I'd prefer not to restore any apache version information (for security), maybe I could temporarily though just to get suphp to build, it'd just be a painful process to go through, bah.

Last edited by lostmahmind (2013-01-26 02:39:34)

Offline

#4 2013-01-26 22:07:25

lostmahmind
Member
Registered: 2013-01-24
Posts: 5

Re: [Solved] Cannot build suPHP

So suphp apparently builds mod_suphp.c from either src/apache or src/apache2.

This is decided in one of the make files, src/Makefile, there you'll be able to find a var MAYBE_AP=apache, and there's a commented-out line MAYBE_AP=apache2.

I made sure the only uncommented line was MAYBE_AP=apache2 and then was able to build everything with just 'make'. Finally 'make install' dropped mod_suphp.so into the httpd/modules directory.

Yay!

--------------------

Edit: I just finished configuring everything and it works. Also, I just noticed this thread is the second result in Google now for 'AUR suphp'. big_smile

Last edited by lostmahmind (2013-01-27 00:23:21)

Offline

Board footer

Powered by FluxBB