Problems compiling Apache 2.2.6 on FreeBSD using custombuild

rfauske

Verified User
Joined
Aug 8, 2007
Messages
19
Hi,

When I try to compile apache 2.2.6 (./build apache) I get the following error:
Code:
-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:
Code:
$ 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
 
Might try installing one of these 2 ports:

/usr/ports/textproc/expat2
/usr/ports/textproc/linux-expat
 
As you can se the first one is already installed.

Btw 2.2.4 was working but not the new release.
 
Same problem here,

Don't really know what this is, going to debug a little now to see what it is.
 
Already tried that. I even tried these flags, still no result.

./configure --enable-layout=FreeBSD --with-expat=/usr/local --enable-http
 
Thats really weird I dont even have expat installed and it worked fine on my server.
 
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.
 
Not having expat installed is the key.
configure checks wether you have it, if you do:
Code:
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:
Code:
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:
Code:
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.
 
Last edited:
I didnt have issues upgrading apache on custombuild and I have no expat packages installed on the server it is FreeBSD 6.2.
 
That worked great, thanks

(nice if it could be added to the default configure.apache file)
 
The option line should be added to file /usr/local/directadmin/custombuild/configure/ap2/configure.apache.
 
Back
Top