PDA

View Full Version : Problems compiling Apache 2.2.6 on FreeBSD using custombuild



rfauske
09-09-2007, 02:33 PM
Hi,

When I try to compile apache 2.2.6 (./build apache) I get the following error:


-I/usr/local/directadmin/custombuild/httpd-2.2.6/srclib/apr/include -I/usr/local/include -version-info 2:11:2 -o libaprutil-1.la -rpath /etc/httpd/lib buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_sha1.lo crypto/getuuid.lo crypto/uuid.lo dbm/apr_dbm.lo dbm/apr_dbm_berkeleydb.lo dbm/apr_dbm_gdbm.lo dbm/apr_dbm_ndbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_init.lo ldap/apr_ldap_option.lo ldap/apr_ldap_url.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apu_version.lo uri/apr_uri.lo xml/apr_xml.lo strmatch/apr_strmatch.lo xlate/xlate.lo dbd/apr_dbd.lo dbd/apr_dbd_pgsql.lo dbd/apr_dbd_sqlite2.lo dbd/apr_dbd_sqlite3.lo -lcrypt -lpthread -lexpat -liconv /usr/local/directadmin/custombuild/httpd-2.2.6/srclib/apr/libapr-1.la -lcrypt -lpthread
/usr/bin/ld: cannot find -lexpat
*** Error code 1

Stop in /usr/local/directadmin/custombuild/httpd-2.2.6/srclib/apr-util.
*** Error code 1

Stop in /usr/local/directadmin/custombuild/httpd-2.2.6/srclib/apr-util.
*** Error code 1

Stop in /usr/local/directadmin/custombuild/httpd-2.2.6/srclib.



But if I see in the ldconfig -r output I get:

$ ldconfig -r|grep expat
99:-lexpat.6 => /usr/local/lib/libexpat.so.6


I am running FreeBSD 6.2-Release (with patches) and -STABLE and am getting the same error on both servers.

Any suggestions ?

--
Rasmus

chatwizrd
09-09-2007, 07:34 PM
Might try installing one of these 2 ports:

/usr/ports/textproc/expat2
/usr/ports/textproc/linux-expat

rfauske
09-10-2007, 01:05 AM
As you can se the first one is already installed.

Btw 2.2.4 was working but not the new release.

CoolZero
09-10-2007, 03:30 AM
Same problem here,

Don't really know what this is, going to debug a little now to see what it is.

smtalk
09-10-2007, 04:15 AM
Try to use:

--with-expat=/usr/local

CoolZero
09-10-2007, 04:38 AM
Already tried that. I even tried these flags, still no result.

./configure --enable-layout=FreeBSD --with-expat=/usr/local --enable-http

chatwizrd
09-10-2007, 11:30 AM
Thats really weird I dont even have expat installed and it worked fine on my server.

CoolZero
09-11-2007, 12:40 AM
You are also using FreeBSD 6.X ?

Because expat is needed for the flag --enable-dav. Which is in the configure options of custombuild.

Can someone look this up? Because it looks more like a issue with the new apache source code then a problem with expat.

FiscBiker
09-12-2007, 05:55 PM
Not having expat installed is the key.
configure checks wether you have it, if you do:


checking Expat 1.95.x... no
checking old Debian-packaged expat... no
checking old FreeBSD-packaged expat... no
checking Expat 1.0/1.1... no
setting LDFLAGS to "-L/usr/local/lib"
adding "-I/usr/local/include" to CPPFLAGS
checking Expat 1.95.x in /usr/local... yes
setting APRUTIL_INCLUDES to "-I/usr/local/include"
setting APRUTIL_EXPORT_LIBS to "-lexpat"
setting APRUTIL_LIBS to "-lexpat"


But during make, this goes bad.

Since this is a test-server I dared doing the following:


su
pkg_delete -f expat-2.0.0_1
exit
./configure --etcetera
make
su
cd /usr/ports/textproc/expat2
make install distclean
cd ~/sources/httpd-2.2.6
apachectl stop && make install && apachectl start

(If you don't reinstall expat2, make install will fail. (at least with my configure options))

configure then showed:


checking Expat 1.95.x... no
checking old Debian-packaged expat... no
checking old FreeBSD-packaged expat... no
checking Expat 1.0/1.1... no
setting LDFLAGS to "-L/usr/local/lib"
adding "-I/usr/local/include" to CPPFLAGS
checking Expat 1.95.x in /usr/local... no
nulling LDFLAGS
removed "-I/usr/local/include" from CPPFLAGS
configuring package in xml/expat now


Now, I don't know what the effect is of not having expat2 installed during configure and make, so you're all warned not to try this on a production server because I said so, but so far all seems to be working fine.

Chrysalis
09-15-2007, 09:42 AM
I didnt have issues upgrading apache on custombuild and I have no expat packages installed on the server it is FreeBSD 6.2.

shaphiro
09-20-2007, 01:20 AM
Try this:

--with-expat=builtin

rfauske
09-21-2007, 01:35 AM
That worked great, thanks

(nice if it could be added to the default configure.apache file)

CoolZero
09-24-2007, 02:02 AM
Try this:

--with-expat=builtin

That's the trick indeed ;)

miklosq
10-31-2007, 08:52 AM
The option line should be added to file /usr/local/directadmin/custombuild/configure/ap2/configure.apache.