can't make/run apache2

Posted on 2004-04-14
Medium Priority
Last Modified: 2013-12-27

I'm having problem with either (1)"make'ing apache2, or (2) running "${PATH}/bin/apachectl start.
on a Sun U10/Solaris 9

(1) compiled and installed openssl:
root@hostname : ~  > gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

root@hostname : /httpd-2.0.49  > ./configure --enable-mods-shared=most --
with-ssl=/usr/local/openssl --enable-ssl

root@hostname : /httpd-2.0.49  > make

Got messages like:
exports.c:2454: error: redefinition of `ap_hack_apr_version_string'
exports.c:1059: error: `ap_hack_apr_version_string' previously defined here
*** Error code 1
make: Fatal error: Command failed for target `exports.lo'
Current working directory /mnt/users/cwang/httpd-2.0.49/server
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /mnt/users/cwang/httpd-2.0.49/server
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

(2) installed binary version of apache2 with:
pkg-get -i apache-2.0.49
${path}/bin/apachectl start
gave the following messages:
ld.so.1: /usr/local/apache2/bin/httpd: fatal: libssl.so.0.9.7: open failed: No s
uch file or directory

In both cases, I had my LD_LIBRARY_PATH set as
root@hostname : ~  > echo $LD_LIBRARY_PATH
/etc/lib /usr/ccs/lib /usr/4lib /usr/local/openssl-0.9.6g/lib

Any idea?


Question by:jmoyerne
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +4
LVL 40

Accepted Solution

jlevie earned 60 total points
ID: 10826191
OpenSSL 0.9.6g is awfully old. Why aren't you using 0.9.7d (the current version) since you are building it your self?
LVL 48

Expert Comment

ID: 10828085
You need to install openssl 0.9.7

Author Comment

ID: 10834743
Thanks but no cigar. Sorry.

I did install openssl 0.9.7, tried to "make" apache-2.0.49, and got the same error:
exports.c:2454: error: redefinition of `ap_hack_apr_version_string'
exports.c:1059: error: `ap_hack_apr_version_string' previously defined here
*** Error code 1
make: Fatal error: Command failed for target `exports.lo'
Current working directory /mnt/httpd-2.0.49/server
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

What I did:

1. compiled and installed openssl-0.9.7d
/openssl-0.9.7d  > ./config -fPIC shared --prefix=/usr/local/o
penssl-0.9.7d --openssldir=/usr/local/openssl-0.9.7d
/openssl-0.9.7d  > make
/openssl-0.9.7d  > make test
/openssl-0.9.7d  > make install

2. compiled apache-2.0.49
/httpd-2.0.49  > ./configure --enable-mods-shared=most --
with-ssl=/usr/local/openssl --enable-ssl
httpd-2.0.49  > which make
/httpd-2.0.49  > make

Can you help?

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 48

Expert Comment

ID: 10839179
Is /usr/local/openssl linked to /usr/local/openssl-0.9.7.d?

Wouldn't it be easier just to install the package from http://sunfreeware.com/

They have apache 2.0.49 with ssl support for Solaris 9.
LVL 51

Assisted Solution

ahoffmann earned 60 total points
ID: 10852349
> exports.c:2454: error: redefinition of `ap_hack_apr_version_string'
> exports.c:1059: error: `ap_hack_apr_version_string' previously defined here

something went wrong with your ./configure
most likely there is a special define missing
Sorry, can't test myself, so please check exports.c
  see the lines 2456 and 1059 where ap_hack_apr_version_string is defined, there must be some kind of preprocessor directive right before (some #ifdef or #if defined)
Please post these lines.

Author Comment

ID: 10872295
Thank you so much for the comment. Here are where I started to have the error and the last lines of the errors:
sort -u $tmp > export_files; \
rm -f $tmp
nawk -f /users/cwang/httpd-2.0.49/build/make_exports.awk `cat export_files` > exports.c
/usr/iplanet/server5/msg-oracle/store/partition/primary/users/cwang/httpd-2.0.49/srclib/apr/libtool --silent --mode=compile gcc  -g -O2 -pthreads    -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DAP_HAVE_DESIGNATED_INITIALIZER   -I/usr/iplanet/server5/msg-oracle/store/partition/primary/users/cwang/httpd-2.0.49/srclib/apr/include -I/users/cwang/httpd-2.0.49/srclib/apr/include -I/usr/iplanet/server5/msg-oracle/store/partition/primary/users/cwang/httpd-2.0.49/srclib/apr-util/include -I/users/cwang/httpd-2.0.49/srclib/apr-util/include -I/users/cwang/httpd-2.0.49/srclib/apr-util/xml/expat/lib -I. -I/users/cwang/httpd-2.0.49/os/unix -I/users/cwang/httpd-2.0.49/server/mpm/prefork -I/users/cwang/httpd-2.0.49/modules/http -I/users/cwang/httpd-2.0.49/modules/filters -I/users/cwang/httpd-2.0.49/modules/proxy -I/users/cwang/httpd-2.0.49/include -I/users/cwang/httpd-2.0.49/modules/generators -I/usr/local/openssl/include/openssl -I/usr/local/openssl/include -I/users/cwang/httpd-2.0.49/modules/dav/main -prefer-non-pic -static -c exports.c && touch exports.lo
exports.c:1572: error: redefinition of `ap_hack_apr_base64_encode_len'
exports.c:1555: error: `ap_hack_apr_get_groupid' previously defined here
exports.c:2453: error: redefinition of `ap_hack_apr_version'
exports.c:1566: error: `ap_hack_apr_version' previously defined here
exports.c:2454: error: redefinition of `ap_hack_apr_version_string'
exports.c:1567: error: `ap_hack_apr_version_string' previously defined here
*** Error code 1
make: Fatal error: Command failed for target `exports.lo'
Current working directory /usr/iplanet/server5/msg-oracle/store/partition/primary/users/cwang/httpd-2.0.49/server
*** Error code 1
Current working directory /usr/iplanet/server5/msg-oracle/store/partition/primary/users/cwang/httpd-2.0.49/server
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

(End of error message)
Lines in exports.c:

  1572  const void *ap_hack_apr_base64_encode_len = (const void *)apr_base64_enc

  2441  const void *ap_hack_apr_gid_get = (const void *)apr_gid_get;
  2442  const void *ap_hack_apr_get_groupid = (const void *)apr_get_groupid;
  2443  #if defined(WIN32)
  2444  const void *ap_hack_apr_gid_compare = (const void *)apr_gid_compare;
  2445  const void *ap_hack_apr_compare_groups = (const void *)apr_compare_group

1551  const void *ap_hack_apr_gid_name_get = (const void *)apr_gid_name_get;
  1552  const void *ap_hack_apr_group_name_get = (const void *)apr_group_name_ge
  1553  const void *ap_hack_apr_get_groupname = (const void *)apr_get_groupname;
  1554  const void *ap_hack_apr_gid_get = (const void *)apr_gid_get;
  1555  const void *ap_hack_apr_get_groupid = (const void *)apr_get_groupid;
  1556  #if defined(WIN32)
  1557  const void *ap_hack_apr_gid_compare = (const void *)apr_gid_compare;
  1558  const void *ap_hack_apr_compare_groups = (const void *)apr_compare_group
LVL 48

Expert Comment

ID: 10874548

Wouldn't it be much quicker and easier to install the Apache Solaris package?

Assisted Solution

dmwaff earned 60 total points
ID: 11061543

 ** I have success with versions **
/usr/local/bin/gcc (version gcc-2.95.2)
/usr/local/ssl        (openssl-0.9.7d )
/usr/ccs/bin/make (generic solaris)

# Apache configure line
./configure \
--prefix=/usr/local/apache \
--enable-so \
--enable-rewrite \
--prefix=/usr/local/apache2 \
--enable-ssl \

I have found that some open source software, such as jakarta Tomcat and ANT require different gcc versions, m4, autoconf, jakarta connectors and make.  I have the most success with gcc 2.95.  I find configuring with gcc 3.x versions fickled.  I use 2.95 has the default, then install and try gcc 3.3.2 followed by gcc 3.4.0.  I also try make 3.8 sometimes...

- David
LVL 48

Expert Comment

ID: 11063620

You could have saved so much time and effort by installing the Solaris packages.

Assisted Solution

iexxe earned 60 total points
ID: 11088795
Suggesting everyone simply resort to the Solaris packages, isn't a useful comment.  At least it doesn't really contribute to answering this persons question.

There are valid reasons to compile Apache (and other packages) from source.  I assume the person asking the question (like myself) has valid reasons for compiling apache.

I have the same problem:  My compile time errors are as such:
/tmpdir/httpd-2.0.49/srclib/apr/libtool --silent --mode=compile gcc  -g -O2 -pthreads    -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DAP_HAVE_DESIGNATED_INITIALIZER -I/usr/local/ssl/include/ -I/usr/local/BerkeleyDB.4.2/include -I/usr/local/mysql/include -DOPENSSL_NO_KRB5  -I/tempdir/httpd-2.0.49/srclib/apr/include -I/tempdir/httpd-2.0.49/srclib/apr/include -I/tempdir/httpd-2.0.49/srclib/apr-util/include -I/tempdir/httpd-2.0.49/srclib/apr-util/include -I/tempdir/httpd-2.0.49/srclib/apr-util/xml/expat/lib -I. -I/tempdir/httpd-2.0.49/os/unix -I/tempdir/httpd-2.0.49/server/mpm/prefork -I/tempdir/httpd-2.0.49/modules/http -I/tempdir/httpd-2.0.49/modules/filters -I/tempdir/httpd-2.0.49/modules/proxy
-I/tempdir/httpd-2.0.49/include -I/tempdir/httpd-2.0.49/modules/generators -I/tempdir/httpd-2.0.49/modules/dav/main -prefer-non-pic -static -c exports.c && touch exports.lo
exports.c:1572: redefinition of `ap_hack_apr_base64_encode_len'
exports.c:685: `ap_hack_apr_base64_encode_len' previously defined here
exports.c:1573: redefinition of `ap_hack_apr_base64_encode'
exports.c:686: `ap_hack_apr_base64_encode' previously defined here
exports.c:1574: redefinition of `ap_hack_apr_base64_encode_binary'
exports.c:687: `ap_hack_apr_base64_encode_binary' previously defined here
exports.c:1575: redefinition of `ap_hack_apr_base64_decode_len'
exports.c:688: `ap_hack_apr_base64_decode_len' previously defined here
exports.c:1576: redefinition of `ap_hack_apr_base64_decode'
exports.c:689: `ap_hack_apr_base64_decode' previously defined here
exports.c:1577: redefinition of `ap_hack_apr_base64_decode_binary'
exports.c:690: `ap_hack_apr_base64_decode_binary' previously defined here
exports.c:1582: redefinition of `ap_hack_apr_brigade_create'
exports.c:695: `ap_hack_apr_brigade_create' previously defined here
exports.c:1583: redefinition of `ap_hack_apr_brigade_destroy'

<------SNIP ------>

I also have SSL installed using the following compile options:
./compile --prefix=/usr/local/openssl-0.9.7d --openssldir=/usr/local/openssl-0.9.7d

I have the following environment vars which influence compile:
CPPFLAGS = -I/usr/local/openssl-0.9.7d/include/ -I/usr/local/BerkeleyDB.4.2/include -I/usr/local/sasl2/include -DOPENSSL_NO_KRB5
LDFLAGS = -L/usr/local/openssl-0.9.7d/lib -L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/sasl2/lib

If anyone has any helpful observations (other than suggesting I go with binaries) it would be greatly appreciated.

LVL 48

Assisted Solution

Tintin earned 60 total points
ID: 11094189
In the vast majority of cases I've seen, people try to compile software as they are not aware that there are binary packages available, and when they find out there is, they are more than happy to use the binary version.

Of course there are occasions when you want/need to compile the source yourself.

Expert Comment

ID: 11411722
I found what my problem was:

The errors appearing in my case were common when Solaris 8/9 users use Sun's make rather than GNU's make. If you have GNU's make installed ensure it is in your path before /usr/ccs/bin.  If you don't you can obtain it from http://ftp.gnu.org/pub/gnu/make/ or use a precompiled package from http://www.sunfreeware.com/ or http://www.blastwave.org.


Expert Comment

ID: 11832588
I had the same problem, and the make (and gcc) version wasn't the problem.

The "real" problem: there was a symbolic link in the path to the directory containing the Apache source directory.   This is a known bug in the build system.



I unpacked the sources into a directory that didn't have a symlink, built, and it worked fine.

Note: if you're using automounting, you may be in a symlinked directory and not know it:

  % pwd
  % ls -l `pwd`
  lrwxrwxrwx  1 root root 21 Aug 15 14:44 /data/software -> /export/data/software/


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month15 days, 15 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question