Jump to content
Eternal Lands Official Forums
vinoveritas

zlib 1.2.5.1 problems with compiling EL (patch)

Recommended Posts

As i tried to compile the client today i did get into a lot of problems because of what i think API changes in the zlib.

I made that the hearder start looks like

io/ioapi.h (just needed there

 

#ifndef _ZLIBIOAPI64_H

#define _ZLIBIOAPI_H

#ifndef OF

#define OF _Z_OF

#endif

 

And compiling worked fine

Edited by vinoveritas

Share this post


Link to post
Share on other sites

Am using GCC 4.5.3 and a Gentoo 64bit (development arch) linux. and the zlib version 1.2.5.1 .

It is my understanding that this problem has to do with the

I know that many Programms that where using the header of ioAPI.h and unzip.h with the OF function did get into the same problem with this version of zlib. It might be that it is my setup that makes this problems others will not have, either through system not using the zlib version, or developers at gentoo screwed up.

 

Anyway if you get into such problems, these lines will work to have it running fine

Share this post


Link to post
Share on other sites

Actually looking into it a bit more i found this link here

https://bugs.gentoo....g.cgi?id=383179

shows that it might be a Gentoo only bug, that does not involve other distributions.and only gets a failure if you do compile your testing sources yourself So consider this just a notification for those who run into such a problem.

Edited by vinoveritas

Share this post


Link to post
Share on other sites

The bug mentioned in the gentoo thread is fixed. I tried to compile with both 1.2.5.1 as 1.2.7 fail the compiles at the same place vino describes.

The fix that vino mention works for me.

 

It could still be a gentoo bug. Just tought i mentioned it for reference

Share this post


Link to post
Share on other sites

I ran into the same issue here on gentoo using the latest git (made a similar patch before i ran into this thread):

 

# git rev-parse --verify HEAD
252b008c681e59c940ec4c3b62e176dab2004a63

 

I just added the code below into io/ioapi.h to get it to compile

#if PRE_ANSI_C89
#undef OF
#define OF(args) () 
#else 
#undef OF
#define OF(args) args 
#endif

 

# uname -a
Linux gold 3.1.6-gentoo #1 SMP Fri Jan 6 12:32:18 CST 2012 x86_64 AMD Athlon(tm) II X4 640 Processor AuthenticAMD GNU/Linux
# > eix sys-libs/zlib
[i] sys-libs/zlib
Available versions: 1.2.3-r1 1.2.5-r2 ~1.2.5.1 ~1.2.5.1-r1 1.2.5.1-r2 ~1.2.6 ~1.2.7 {minizip static-libs}
Installed versions: 1.2.5.1-r2(09:05:28 06/07/12)(minizip static-libs)
Homepage: http://www.zlib.net/
 Description: Standard (de)compression library

 

Using GCC 4.5.3

Share this post


Link to post
Share on other sites

Thanks for your fix, jns. I'm also on a Gentoo system, and that let me get past that snag in the compile process.

 

If this doesn't harm compilation on other distros or systems, maybe this could be merged into master?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×