Solved

can't make/run apache2

Posted on 2004-04-14
14
2,553 Views
Last Modified: 2013-12-27
Hi,

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:
/usr/local/openssl-0.9.6g
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
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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
Then:
${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
Killed

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?

Thanks.

jmoyerne
0
Comment
Question by:jmoyerne
[X]
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
14 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 20 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?
0
 
LVL 48

Expert Comment

by:Tintin
ID: 10828085
You need to install openssl 0.9.7
0
 

Author Comment

by:jmoyerne
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
/usr/ccs/bin/make
/httpd-2.0.49  > make

Can you help?

jmoyerne
0
Technology Partners: 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

by:Tintin
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.
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 20 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.
0
 

Author Comment

by:jmoyerne
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
ode_len;

  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
s;

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
t;
  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
s;
0
 
LVL 48

Expert Comment

by:Tintin
ID: 10874548
Again.

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

Assisted Solution

by:dmwaff
dmwaff earned 20 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)
LD_LIBRARY_PATH=
/usr/lib:/usr/openwin/lib:/usr/local/lib:/usr/local/BerkeleyDB.4.1/lib:/usr/X/lib:/usr/dt/lib:/usr/local/ssl/lib:/opt/hpnp/lib
CC=gcc

# Apache configure line
./configure \
--prefix=/usr/local/apache \
--enable-so \
--enable-rewrite \
--prefix=/usr/local/apache2 \
--enable-ssl \
--with-ssl=/usr/local/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
0
 
LVL 48

Expert Comment

by:Tintin
ID: 11063620
Again.

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

Assisted Solution

by:iexxe
iexxe earned 20 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.

Cheers
iexxe
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 20 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.
0
 

Expert Comment

by:iexxe
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.

Cheerss
iexxe
0
 

Expert Comment

by:wackjobbery
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.

See:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8867
http://marc.theaimsgroup.com/?l=apache-httpd-users&m=108093810120689&w=2

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
  /data/software
 
  % ls -l `pwd`
  lrwxrwxrwx  1 root root 21 Aug 15 14:44 /data/software -> /export/data/software/

-David
0

Featured Post

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!

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

726 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