DeveloperSide.NET Forums

DeveloperSide.NET => Building a Web Server, for Linux => Topic started by: robin on December 07, 2003, 03:19:23 PM



Title: apache2 compiling/make problem..
Post by: robin on December 07, 2003, 03:19:23 PM
Hello everybody,

I'm pretty new to linux. Having said that, i ran into a linux problem i could resolve due to my experinece so i ended up reinstalling linux to resolve the problem...it was too...bad.... did a lot of work to it, toooo....

mandrake 9.2
using the instructions on this site...
i successfully install lzib and openssl...
problem is with apache..compile..
 ./configure --prefix=/wwwroot/apache --enable-mods-shared=most --enable-deflate --enable-ssl --with-z=/ssr/lib --with-ssl=/usr/lib

message i'm getting:
in file included from  /usr/include/zutil.h:17, from mod_deflate.c:79:
/usr/include/zlib.h:68 error: redefinition of 'struct z_stream_s'
/usr/include/zlib.h:705: error: conflictiong type for gzwrie'
/usr/local/include/zlib.h:982:error previous declaration of 'gzwrite'
/usr/include/zlib.h:882: error: redefinition of 'struct internal_state'
make[4]:***[mod_deflate.slo] error 1
make[4] leving directory '/downloads/httpd-2.0.48
make[3] ***[shared-build-recursive] error1
make[3]: leaving directory '/downloads/httpd-2.0.48/modules/filters'
make[2]: ***[shared-build-recursive] error 1
make[2] leaving directory /downloads/httpd-2.0.48/modules
make[1] ***[shared-build-recursive] error 1
make[1] leaving directory '/downloads/httpd-2.0.48'
make ***[all-recursive] error1

I had somewhat the same problem the first time i went throught the install and that provblem is documented here
http://forums.devside.net/viewtopic.php?t=104
tried tthe fix but still getting the same problem...


Title: apache2 compiling/make problem..
Post by: admin on December 07, 2003, 11:47:45 PM
./configure --prefix=/wwwroot/apache2 --enable-mods-shared=most --enable-deflate --enable-ssl --with-z=/usr/lib --with-ssl=/usr/local/ssl


Title: apache2 compiling/make problem..
Post by: Anonymous on December 08, 2003, 01:05:10 AM
Thanks for the help Admin but problem still remains...
I tried doing everthing over again and still getting the same message:

[root@voyager httpd-2.0.48]# ./configure --prefix=/wwwroot/apache --enable-mods-shared=most --enable-deflate --enable-ssl --with-z=/usr/lib --with-ssl=/usr/local/ssl

make :
2.0.48/modules/dav/main -prefer-pic -c mod_deflate.c && touch mod_deflate.slo
In file included from /usr/include/zutil.h:17,
                 from mod_deflate.c:79:
/usr/include/zlib.h:68: error: redefinition of `struct z_stream_s'
/usr/include/zlib.h:705: error: conflicting types for `gzwrite'
/usr/local/include/zlib.h:982: error: previous declaration of `gzwrite'
/usr/include/zlib.h:882: error: redefinition of `struct internal_state'
make[4]: *** [mod_deflate.slo] Error 1
make[4]: Leaving directory `/downloads/httpd-2.0.48/modules/filters'
make[3]: *** [shared-build-recursive] Error 1
make[3]: Leaving directory `/downloads/httpd-2.0.48/modules/filters'
make[2]: *** [shared-build-recursive] Error 1
make[2]: Leaving directory `/downloads/httpd-2.0.48/modules'
make[1]: *** [shared-build-recursive] Error 1
make[1]: Leaving directory `/downloads/httpd-2.0.48'
make: *** [all-recursive] Error 1

/root/.bash_profile


if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
mesg n
PATH=/usr/local/ssl/bin:$PATH <--i added the botton 2 lines
export PATH
----------------------
/etc/ld.so.conf
/usr/X11R6/lib
/usr/lib/qt3/lib
/usr/local/ssl/lib


i cann't seem to find the problem...everything is right
maybe i wasn ment to play wihe linux..hehehehe
do u have any other suggestoins..


Title: HELP....
Post by: Anonymous on December 13, 2003, 02:54:07 AM
cann't seem ot compile apache and its still displaying the same message above...anyone with any ides....


Title: apache2 compiling/make problem..
Post by: Anonymous on December 13, 2003, 03:08:10 AM
what zlib version are you using?


Title: apache2 compiling/make problem..
Post by: Anonymous on December 13, 2003, 02:50:08 PM
the same version indicated on this site....and followed the instructon on this site as well to the teeth....


Title: apache2 compiling/make problem..
Post by: Anonymous on December 13, 2003, 09:38:04 PM
1.2.1 or 1.1.4 ?


Title: apache2 compiling/make problem..
Post by: Anonymous on December 13, 2003, 09:38:35 PM
use the older version, 1.1.4


Title: apache2 compiling/make problem..
Post by: Anonymous on January 05, 2004, 07:28:43 PM
i had the same problem, when I was compiling. It is caused by parallel installation of zlib, meaning you have two versions of zlib installed.

My solution was to overwrite the old files with links to the new ones.


Title: apache2 compiling/make problem..
Post by: Anonymous on January 07, 2004, 06:14:00 PM
I have exactly the same problem how do you overwrite the old files with links to the new ones? (unix newbie here)


Title: apache2 compiling/make problem..
Post by: Anonymous on January 07, 2004, 06:29:07 PM
I installed 1.2.1 as I couldn't find 1.1.4 on the web site for my system. I then found this post and realised I had a RPM install of 1.1.4 already installed so I removed that.

I am still getting the exact same message as the previous poster


In file included from /usr/include/zutil.h:17,
from mod_deflate.c:79:
/usr/include/zlib.h:68: error: redefinition of `struct z_stream_s'
/usr/include/zlib.h:705: error: conflicting types for `gzwrite'
/usr/local/include/zlib.h:982: error: previous declaration of `gzwrite'
/usr/include/zlib.h:882: error: redefinition of `struct internal_state'
make[4]: *** [mod_deflate.slo] Error 1
make[4]: Leaving directory `/downloads/httpd-2.0.48/modules/filters'
make[3]: *** [shared-build-recursive] Error 1
make[3]: Leaving directory `/downloads/httpd-2.0.48/modules/filters'
make[2]: *** [shared-build-recursive] Error 1
make[2]: Leaving directory `/downloads/httpd-2.0.48/modules'
make[1]: *** [shared-build-recursive] Error 1
make[1]: Leaving directory `/downloads/httpd-2.0.48'
make: *** [all-recursive] Error 1


Title: apache2 compiling/make problem..
Post by: admin on January 07, 2004, 08:09:26 PM
The mod_deflate under Apache has not been updated yet to use zlib 1.2.1
You have to use zlib version 1.1.4

http://www.zlib.net/zlib114.zip
http://www.zlib.net/zlib-1.1.4.tar.bz2
http://www.zlib.net/zlib-1.1.4.tar.gz


Title: apache2 compiling/make problem..
Post by: Anonymous on January 08, 2004, 12:28:59 AM
aha! excellent thanks for the reply, you have no idea how much I appreciate it :)


Title: apache2 compiling/make problem..
Post by: Anonymous on January 08, 2004, 11:57:27 AM
Well it now compiles with the correct version of zlib installed, however the files

/usr/local/apache2/modules/mod_deflate.so
and
/usr/local/apache2/modules/mod_ssl.so

do not exist.. when are these created normally and what is their source (I assume it is apache itself).

I have since removed everything and rebuilt it all following the steps exactly in the guide but I have this problem, any advice?


Title: apache2 compiling/make problem..
Post by: Anonymous on January 08, 2004, 12:21:45 PM
ok I've reconfigured by setting the z and ssl paths and now the mods are created, now when trying to start with start or startssl I get the following...

Syntax error on line 51 of /usr/local/apache2/conf/httpd.conf
Cannot load /usr/local/apache2/modules/mod_deflate.so into server: /usr/local/apache2/modules/mod_deflate.so: undefined symbol: deflate

Also I am certain I have compiled z and ssl as shared.

[/usr/local/ssl/openssl-0.9.7c]#
./config --prefix=/usr/local/ssl shared zlib-dynamic

[/usr/lib/zlib-1.1.4]#
./configure
make test
make install

[/usr/lib/zlib-1.1.4]#
./configure -s
make test
make install


I'm sure it is something simple and I know other people have had ths problem too, so hopefully if a solution is presented here it will help all those that encounter the same problem.

Thanks in advance for any replies


Title: apache2 compiling/make problem..
Post by: Anonymous on January 08, 2004, 05:57:44 PM
I had a thought, when running make on the openssl config I get the message

'-m486' is deprecated. Use 'march=i486' or '-mcpu=i486'

This message is printed at least a hundred times but the build seems to work anyway and I can run openssl version which shows the correct version number and date.

Could this be causing the error and how do I change it (a config file somewhere?) so that I don't get the above error?


Title: apache2 compiling/make problem..
Post by: admin on January 08, 2004, 07:29:41 PM
Stop putting the original source directories into the /usr/local/ssl and zlib directories.  Put them into /home/admin/ or something and then build.

You also need to build zlib before you build openssl.

Make sure all your prefixes are right and know what they mean...

Thats one of your problems, the other is something is misconfigured on your end.


Title: apache2 compiling/make problem..
Post by: Anonymous on January 08, 2004, 08:31:57 PM
ok I usually build from /usr/local/src but I moved them there when following the guide for some reason.

I built zlib first

The prefixes are ok from what I can tell, they are exactly how the guide shows they should be

Does the undefined symbol error mean it can't find a file then? As far as I can see they are all where they should be.

Any idea what could be misconfigured? I removed ALL of it and started again twice with this same error.

I would really appreciate the help with this.


Title: apache2 compiling/make problem..
Post by: Anonymous on January 08, 2004, 08:54:30 PM
It could be a Mandrake problem.

http://forums.devside.net/viewtopic.php?t=104&highlight=mandrake


Title: apache2 compiling/make problem..
Post by: Anonymous on January 08, 2004, 11:13:21 PM
Sorry I should have said, it's RH9


Title: Re: apache2 compiling/make problem..
Post by: 12789 on May 11, 2005, 09:44:44 AM
Quote from: "robin"
Hello everybody,

I'm pretty new to linux. Having said that, i ran into a linux problem i could resolve due to my experinece so i ended up reinstalling linux to resolve the problem...it was too...bad.... did a lot of work to it, toooo....

mandrake 9.2
using the instructions on this site...
i successfully install lzib and openssl...
problem is with apache..compile..
 ./configure --prefix=/wwwroot/apache --enable-mods-shared=most --enable-deflate --enable-ssl --with-z=/ssr/lib --with-ssl=/usr/lib

message i'm getting:
in file included from  /usr/include/zutil.h:17, from mod_deflate.c:79:
/usr/include/zlib.h:68 error: redefinition of 'struct z_stream_s'
/usr/include/zlib.h:705: error: conflictiong type for gzwrie'
/usr/local/include/zlib.h:982:error previous declaration of 'gzwrite'
/usr/include/zlib.h:882: error: redefinition of 'struct internal_state'
make[4]:***[mod_deflate.slo] error 1
make[4] leving directory '/downloads/httpd-2.0.48
make[3] ***[shared-build-recursive] error1
make[3]: leaving directory '/downloads/httpd-2.0.48/modules/filters'
make[2]: ***[shared-build-recursive] error 1
make[2] leaving directory /downloads/httpd-2.0.48/modules
make[1] ***[shared-build-recursive] error 1
make[1] leaving directory '/downloads/httpd-2.0.48'
make ***[all-recursive] error1

I had somewhat the same problem the first time i went throught the install and that provblem is documented here
http://forums.devside.net/viewtopic.php?t=104
tried tthe fix but still getting the same problem...


Cause your linux have two version zlib, so you can find /usr/include/zlib.h and /usr/local/include/zlib.h .
I use /usr/local/include/zlib.h overwrite /usr/include/zlib.h, this question is over.


Title: Possible Workaround
Post by: Unclebob on August 07, 2005, 03:27:13 AM
After spending many hours trying to compile  the Linux websuite, especially on an FC4 x86 platform - I finally found a possible workaround to all these "recursive errors". Instead of using the latest version of Openssl-0.9.8, use an older version of Openssl  0.9.7.g during the compiling process. Made all the difference in the world. However, the bad news is that on an FC4_x86_64 platform, Mysql for some mysterious reason spits out configure errors after the PHP "configure" command is invoked. Doesn't matter which version of either PHP, or Mysql is installed, the  results are the same  :(

Unclebob


Title: Re: Possible Workaround
Post by: Jorge on August 21, 2005, 05:24:17 PM
Quote from: "Unclebob"
After spending many hours trying to compile  the Linux websuite, especially on an FC4 x86 platform - I finally found a possible workaround to all these "recursive errors". Instead of using the latest version of Openssl-0.9.8, use an older version of Openssl  0.9.7.g during the compiling process. Made all the difference in the world. However, the bad news is that on an FC4_x86_64 platform, Mysql for some mysterious reason spits out configure errors after the PHP "configure" command is invoked. Doesn't matter which version of either PHP, or Mysql is installed, the  results are the same  :(

Unclebob


Are you using a 64bit version of mysql?

if so try with a 32bit version