suPHP kompilieren: undefined reference to apr_*

Apache, Lighttpd, nginx, Cherokee
lindwyrm
Posts: 10
Joined: 2005-06-08 01:05

suPHP kompilieren: undefined reference to apr_*

Post by lindwyrm »

Huhu Zusammen,

ich bin gerade dabei suPHP von Hand zu komplilieren, da ich wegen virtuelle Verzeichnisuser auf Documentroot die Optionen checkuid und checkgid disabeln muss.

Ich habe Apache2.2.3 sowie PHP5 mit mod-php5 unter Debian etch installiert und mir suPHP-0.6.2 gezogen, die ja in dieser Version nun auch den Apache2.2X supported.

Zusätzlich habe ich apache2-dev und in Abhängigkeit davon wurden auch die folgenden apr-Pakete installiert.

Code: Select all

i A libapr1                                                                - The Apache Portable Runtime Library
i   libapr1-dbg                                                            - The Apache Portable Runtime Library - Development Headers
i A libapr1-dev                                                            - The Apache Portable Runtime Library - Development Headers
i A libaprutil1                                                            - The Apache Portable Runtime Utility Library
i   libaprutil1-dbg                                                        - The Apache Portable Runtime Utility Library - Development Headers
i A libaprutil1-dev                                                        - The Apache Portable Runtime Utility Library - Development Headers
Die Headerfiles sind unter /usr/include/apr-1.0/ und die config-file unter /usr/bin/apr-1-config vorhanden

Meine configure:

Code: Select all

./configure --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/bin/apxs2  --disable-checkuid --disable-checkgid --with-apache-user=www-data --with-logfile=/var/log/apache2/suphp.log
Doch ich bekomme mit make folgende Fehler zurück:

Code: Select all

/usr/bin/make
make[1]: Entering directory `/home/downloads/suphp/suphp-0.6.2'
Making all in src
make[2]: Entering directory `/home/downloads/suphp/suphp-0.6.2/src'
/usr/bin/make  all-recursive
make[3]: Entering directory `/home/downloads/suphp/suphp-0.6.2/src'
Making all in apache2
make[4]: Entering directory `/home/downloads/suphp/suphp-0.6.2/src/apache2'
/bin/sh ../../libtool --tag=CC --mode=link x86_64-linux-gnu-gcc -I/usr/include/apache2 -I/usr/include/apr-1.0 -DSUPHP_PATH_TO_SUPHP="/usr/sbin/suphp" -DSUPHP_USE_USERGROUP -Wall -g -O2  -Wl,-z,defs -o mod_suphp.la  -module -rpath '/usr/lib/apache2/modules' mod_suphp.lo
x86_64-linux-gnu-gcc -shared  .libs/mod_suphp.o   -Wl,-z -Wl,defs -Wl,-soname -Wl,mod_suphp.so.0 -o .libs/mod_suphp.so.0.0.0
.libs/mod_suphp.o: In function `suphp_discard_output':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:492: undefined reference to `apr_bucket_type_eos'
.libs/mod_suphp.o: In function `suphp_handle_cmd_remove_handler':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:308: undefined reference to `apr_table_set'
.libs/mod_suphp.o: In function `suphp_handle_cmd_add_handler':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:296: undefined reference to `apr_table_set'
.libs/mod_suphp.o: In function `suphp_handle_cmd_user_group':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:283: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:284: undefined reference to `apr_pstrdup'
.libs/mod_suphp.o: In function `suphp_handle_cmd_config':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:271: undefined reference to `apr_pstrdup'
.libs/mod_suphp.o: In function `suphp_brigade_read':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:77: undefined reference to `apr_palloc'
.libs/mod_suphp.o: In function `suphp_merge_server_config':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:209: undefined reference to `apr_palloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:220: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:227: undefined reference to `apr_pstrdup'
.libs/mod_suphp.o: In function `suphp_create_server_config':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:195: undefined reference to `apr_palloc'
.libs/mod_suphp.o: In function `suphp_log_script_err':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:59: undefined reference to `ap_log_rerror'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:53: undefined reference to `apr_file_gets'
.libs/mod_suphp.o: In function `suphp_handler':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:548: undefined reference to `core_module'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:552: undefined reference to `apr_table_get'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:552: undefined reference to `apr_table_get'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:566: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:566: undefined reference to `apr_stat'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:582: undefined reference to `ap_log_rerror'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:577: undefined reference to `ap_log_rerror'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:588: undefined reference to `ap_log_rerror'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:612: undefined reference to `apr_palloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:618: undefined reference to `ap_add_common_vars'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:619: undefined reference to `ap_add_cgi_vars'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:621: undefined reference to `apr_table_unset'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:622: undefined reference to `apr_table_unset'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:623: undefined reference to `apr_table_unset'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:626: undefined reference to `apr_table_unset'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:627: undefined reference to `apr_table_unset'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:632: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:632: undefined reference to `apr_table_setn'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:635: undefined reference to `apr_table_setn'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:640: undefined reference to `apr_table_get'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:678: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:678: undefined reference to `apr_table_setn'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:694: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:694: undefined reference to `apr_table_setn'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:699: undefined reference to `ap_create_environment'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_create'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:723: undefined reference to `ap_log_rerror'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:598: undefined reference to `ap_run_get_suexec_identity'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:603: undefined reference to `ap_log_rerror'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:645: undefined reference to `ap_pbase64decode'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:652: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:653: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:661: undefined reference to `apr_table_setn'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:662: undefined reference to `apr_table_setn'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_io_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `ap_make_dirstr_parent'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_dir_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_limit_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_limit_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_limit_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_cmdtype_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_error_check_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:703: undefined reference to `apr_procattr_detach_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:731: undefined reference to `apr_palloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:732: undefined reference to `apr_proc_create'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:735: undefined reference to `ap_log_rerror'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:600: undefined reference to `apr_psprintf'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:601: undefined reference to `apr_psprintf'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:739: undefined reference to `apr_pool_note_subprocess'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:743: undefined reference to `apr_file_pipe_timeout_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:747: undefined reference to `apr_file_pipe_timeout_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:751: undefined reference to `apr_file_pipe_timeout_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:755: undefined reference to `apr_brigade_create'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:759: undefined reference to `ap_get_brigade'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:772: undefined reference to `apr_bucket_type_eos'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:778: undefined reference to `apr_bucket_type_flush'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:785: undefined reference to `apr_file_write_full'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:772: undefined reference to `apr_bucket_type_eos'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:791: undefined reference to `apr_brigade_cleanup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:795: undefined reference to `apr_file_flush'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:796: undefined reference to `apr_file_close'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:801: undefined reference to `apr_file_pipe_timeout_set'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:802: undefined reference to `apr_file_pipe_timeout_set'
.libs/mod_suphp.o: In function `suphp_bucket_create':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:345: undefined reference to `apr_bucket_alloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:348: undefined reference to `apr_palloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:351: undefined reference to `apr_bucket_free'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:358: undefined reference to `apr_pollset_create'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:366: undefined reference to `apr_pollset_add'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:371: undefined reference to `apr_pollset_add'
.libs/mod_suphp.o: In function `suphp_handler':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:810: undefined reference to `apr_bucket_eos_create'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:826: undefined reference to `ap_scan_script_header_err_brigade'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:834: undefined reference to `apr_brigade_destroy'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:791: undefined reference to `apr_brigade_cleanup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:843: undefined reference to `apr_table_get'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:862: undefined reference to `apr_brigade_destroy'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:896: undefined reference to `ap_pass_brigade'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:902: undefined reference to `apr_file_close'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:869: undefined reference to `ap_pass_brigade'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:876: undefined reference to `apr_file_close'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:849: undefined reference to `apr_brigade_destroy'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:851: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:853: undefined reference to `apr_table_unset'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:855: undefined reference to `ap_internal_redirect_handler'
.libs/mod_suphp.o: In function `suphp_bucket_read':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:442: undefined reference to `apr_pollset_poll'
.libs/mod_suphp.o: In function `suphp_read_fd':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:401: undefined reference to `apr_bucket_alloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:403: undefined reference to `apr_file_read'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:412: undefined reference to `apr_bucket_free'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:412: undefined reference to `apr_bucket_heap_make'
.libs/mod_suphp.o: In function `suphp_bucket_dup':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:381: undefined reference to `apr_bucket_alloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:383: undefined reference to `apr_bucket_free'
.libs/mod_suphp.o: In function `suphp_bucket_read':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:464: undefined reference to `apr_pollset_remove'
.libs/mod_suphp.o: In function `suphp_read_fd':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:420: undefined reference to `apr_bucket_free'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:421: undefined reference to `apr_bucket_immortal_make'
.libs/mod_suphp.o: In function `suphp_bucket_read':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:448: undefined reference to `ap_log_rerror'
.libs/mod_suphp.o: In function `suphp_merge_dir_config':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:155: undefined reference to `apr_palloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:162: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:175: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:182: undefined reference to `apr_pstrdup'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:187: undefined reference to `apr_table_overlay'
.libs/mod_suphp.o: In function `suphp_create_dir_config':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:131: undefined reference to `apr_palloc'
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:144: undefined reference to `apr_table_make'
.libs/mod_suphp.o: In function `suphp_register_hooks':
/home/downloads/suphp/suphp-0.6.2/src/apache2/mod_suphp.c:910: undefined reference to `ap_hook_handler'
.libs/mod_suphp.o:(.data.rel.ro+0x10): undefined reference to `apr_bucket_destroy_noop'
.libs/mod_suphp.o:(.data.rel.ro+0x20): undefined reference to `apr_bucket_setaside_notimpl'
.libs/mod_suphp.o:(.data.rel.ro+0x28): undefined reference to `apr_bucket_split_notimpl'
.libs/mod_suphp.o:(.data.rel.ro+0x30): undefined reference to `apr_bucket_copy_notimpl'
collect2: ld returned 1 exit status
make[4]: *** [mod_suphp.la] Error 1
make[4]: Leaving directory `/home/downloads/suphp/suphp-0.6.2/src/apache2'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/downloads/suphp/suphp-0.6.2/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/downloads/suphp/suphp-0.6.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/downloads/suphp/suphp-0.6.2'
make: *** [build-stamp] Error 2
Kann mir hier jemand helfen?
Habt dank
So weit auf bald
Lindi

kase
Posts: 1031
Joined: 2002-10-14 22:56

Re: suPHP kompilieren: undefined reference to apr_*

Post by kase »

Code: Select all

cd ~
mkdir suphp
cd suphp
echo "deb-src http://ftp.de.debian.org/debian/ unstable main" >> /etc/apt/sources.list
echo "APT::Default-Release "testing";" >> /etc/apt/apt.conf.d/70debconf
apt-get update
apt-get -t unstable source libapache2-mod-suphp
cd suphp-0.6.2/
dpkg-checkbuilddeps
# Configure anpassen in debian/rules
vim debian/rules
dpkg-buildpackage
cd ..
# Name kann evtl abweichen :)
dpkg -i libapache2-mod-suphp_6.2-1_i386.deb

lindwyrm
Posts: 10
Joined: 2005-06-08 01:05

Re: suPHP kompilieren: undefined reference to apr_*

Post by lindwyrm »

Hi Kase,

vielen Dank für deinen Hinweis! Diese Steps muss ich mir merken. Es ist praktisch schon vorhandene Pakete modifizieren zu können.

Ich habe es heute einmal ausprobiert doch bekomme ich bei dpkg-checkbuilddeps die Fehlermeldung der ungelösten Abhängigkeiten von apache-dev. Muss ich dieses Paket und damit Apache1.3 installieren? Bzw. kann es zur vorhandenen Installation Apache2.2 konflikte geben?

So weit auf bald
Lindi

kase
Posts: 1031
Joined: 2002-10-14 22:56

Re: suPHP kompilieren: undefined reference to apr_*

Post by kase »

Hallo Lindwyrm,

so wie es aussieht, musst du wohl die Support-Files "apache-common (1.3.20)" und die Dev-Files "apache-dev (1.3.20)" auch installieren, selbst wenn du suphp gegen Apache2.2 "bauen" willst.

Eventuell benötigt suphp noch eine der alten 1.3er libs oder so, eine genaue Erklärung dafür habe ich leider auch nicht.

Einfach aufpassen, dass du nicht das "apache (1.3.20)" Package (den Webserver selbst) installst, dann sollte es keinerlei Probleme geben. ("common" und "dev" sind ja sozusagen nur ein paar Dateien in deinem File-System, mehr nicht)