The Old "Zlib not found" error

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
smpoole7
Posts: 5
Joined: 01.06.2009
With us: 15 years 5 months

The Old "Zlib not found" error

Post #1by smpoole7 » 07.08.2009, 06:36

I first ran into this when compiling Celestia on Opensuse 11.1, 32-bit. I installed zlib-devel and still got the error. A Web search showed that I needed a "Perl-Compress" library, so I installed that ... and maybe some X11 libraries (I can't remember now), and it finally stopped giving me the error and built successfully.

A quick pause to say, WELL DONE on 1.6, by the way. That thing is such an improvement over previous versions it ought to be stepped up to version 2.0, in my opinion. :)

But once again, I'm running across the "zlib not found" when I run ./configure under CentOS 5.3, 64-bit, and nothing I've tried will work. Zlib-devel (both 32 and 64 bit) is (are) installed. The Perl-compress thingie is installed. I went through Yum and clicked/checked just about every X11 development library that I could find and installed it (most of them had already been installed, though, when I installed KDevelop).

While I'm a developer/programmer (mostly Windows and command-line stuff under 'Nix), I'm NOT an Automake/Autoconf guru. But from my read of the configure.in file, and then of config.log, it appears that the configure script is actually test-compiling a little runt program that makes a call to "deflate()." It's at that point that it fails and bails out. It's late and I'm headed to bed at the moment, so I haven't tried compiling that little program myself just to see what happens. But -- again, keeping in mind that I'm not an Automake/conf expert -- I do have to wonder if maybe something in configure.in couldn't be tweaked to avoid this.

(For that matter, I'd like to ask the GNU people why the ./configure thingy needs to start over from scratch each and every time! If you're missing several dependencies, it can take quite some time to get them all resolved, because you basically get to re-run ./configure from the beginning each time until it klongs out on the missing component. But that's for a different forum, not for this one ... :) )

Topic author
smpoole7
Posts: 5
Joined: 01.06.2009
With us: 15 years 5 months

Re: The Old "Zlib not found" error

Post #2by smpoole7 » 07.08.2009, 13:48

OK, now that I've had a little sleep, a few points that I left out.

As alluded to, I'm building Celestia 1.6 on CentOS (which is similar to Red Hat Enterprise) 5.3, 64 bit. When I first tried configure, it stopped at "Zlib not found." As per some advice I saw at the LinuxQuestions forum when I was building it on OpenSuSE, I made sure perl-Compress-Zlib was installed. That didn't help this time.

A search here mentioned that you need to install the "X11 devel libraries." Which ones? I've installed every one that I could find or that I thought might matter, but configure still stops with, "Zlib not found." The config.log shows the following interesting info, also mentioned above:

Code: Select all

configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "celestia"
| #define PACKAGE_TARNAME "celestia"
| #define PACKAGE_VERSION "1.6.0"
| #define PACKAGE_STRING "celestia 1.6.0"
| #define PACKAGE_BUGREPORT "celestia-developers@lists.sf.net"
| #define PACKAGE "celestia"
| #define VERSION "1.6.0"
| #define ENABLE_NLS 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char deflate ();
| int
| main ()
| {
| return deflate ();
|   ;
|   return 0;
| }
configure:29309: result: no
configure:29319: error: zlib not found.


What I was asking for above was if this particular test could be made more granular -- in other words, if the problem isn't actually a missing zlib-devel, could the configure script be made to show what the problem really is? Again, I'm not a guru on this, so I honestly don't know. But judging from what I've seen online, this is a fairly common problem. You'll run, "./configure --with-kde" (in my case), it'll stop with "Zlib not found" -- even though you've triple-confirmed that zlib *IS* installed.

gar37bic
Posts: 1
Joined: 19.08.2009
With us: 15 years 3 months

Re: The Old "Zlib not found" error

Post #3by gar37bic » 19.08.2009, 18:57

Me too, RHEL 5.3 or 5.4, 64 bit. I'm out of ideas. I may try to disable the test, and see if the thing builds and runs. I tried installing the version in the YUM repository but that failed a different way. RHEL 5 is fairly old these days, so perhaps there's something about that.

edit: I tried setting 'ac_cv_lib_z_deflate=yes' in line 29302 (yes, this is a terrible hack - useful for testing things)

I then got issues with GL:
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking for glNewList in -lGL... no
checking for glNewList in -lMesaGL... no
configure: error: GL library was not found

so I'll have to give up for now. The thing works fine on my Ubuntu laptop - except I can't run OpenGL there (ATI driver issues) :(

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Re: The Old "Zlib not found" error

Post #4by t00fri » 19.08.2009, 21:13

Firstly,

configure error messages can be rather unspecific or worse: misleading!

If zlib is claimed to be missing, it could be easily another header package (*-devel ) the test to which is located near the zlib-devel test. Just read in the configure script what is actually going on, as well as in config.log.

Next: here is what celestia (KDE) links to (OpenSuse 10.3):

> ldd /usr/local/bin/celestia
linux-gate.so.1 => (0xffffe000)
libkio.so.4 => /opt/kde3/lib/libkio.so.4 (0xb7c8e000)
libkdeui.so.4 => /opt/kde3/lib/libkdeui.so.4 (0xb79b3000)
libkdesu.so.4 => /opt/kde3/lib/libkdesu.so.4 (0xb799c000)
libkwalletclient.so.1 => /opt/kde3/lib/libkwalletclient.so.1 (0xb798a000)
libkdecore.so.4 => /opt/kde3/lib/libkdecore.so.4 (0xb7756000)
libDCOP.so.4 => /opt/kde3/lib/libDCOP.so.4 (0xb7721000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb76e6000)
libutil.so.1 => /lib/libutil.so.1 (0xb76e2000)
libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0xb76cb000)
libidn.so.11 => /usr/lib/libidn.so.11 (0xb7699000)
libkdefx.so.4 => /opt/kde3/lib/libkdefx.so.4 (0xb766f000)
libqt-mt.so.3 => /usr/lib/qt3/lib/libqt-mt.so.3 (0xb6f6a000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb6f63000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb6f59000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb6f53000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb6f4f000)
libXft.so.2 => /usr/lib/libXft.so.2 (0xb6f3c000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb6f0f000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb6ea0000)
libexpat.so.1 => /lib/libexpat.so.1 (0xb6e7f000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb6e68000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb6e5f000)
libfam.so.0 => /usr/lib/libfam.so.0 (0xb6e57000)
libacl.so.1 => /lib/libacl.so.1 (0xb6e4e000)
libattr.so.1 => /lib/libattr.so.1 (0xb6e48000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb6e23000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb6e03000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0xb6d89000)
libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb6d72000)
libXt.so.6 => /usr/lib/libXt.so.6 (0xb6d20000)
libSM.so.6 => /usr/lib/libSM.so.6 (0xb6d17000)
libICE.so.6 => /usr/lib/libICE.so.6 (0xb6cfe000)
libXi.so.6 => /usr/lib/libXi.so.6 (0xb6cf5000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb6cf2000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb6cd9000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb6cd4000)
libz.so.1 => /lib/libz.so.1 (0xb6cc1000)
libGL.so.1 => /usr/lib/libGL.so.1 (0xb6c1d000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb6c0e000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb6af3000)
libdl.so.2 => /lib/libdl.so.2 (0xb6aef000)
libtheora.so.0 => /usr/lib/libtheora.so.0 (0xb6aa3000)
libogg.so.0 => /usr/lib/libogg.so.0 (0xb6a9d000)
liblua.so.5.1 => /usr/lib/liblua.so.5.1 (0xb6a75000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6987000)
libm.so.6 => /lib/libm.so.6 (0xb6962000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6956000)
libc.so.6 => /lib/libc.so.6 (0xb6822000)
/lib/ld-linux.so.2 (0xb7fc5000)
libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0xb5ae2000)
libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0xb5ae0000)

Note that you need all respective *-devel packages as well.
I hope you know how to locate the package to which a given library belongs
(rpm -qf...)?

Fridger
Image

Topic author
smpoole7
Posts: 5
Joined: 01.06.2009
With us: 15 years 5 months

SOLVED!

Post #5by smpoole7 » 20.08.2009, 01:43

OK, I finally got it to build under Opensuse 11.1 64-bit. When I installed the X11-devel package/pattern group, the "missing zlib" complaint went away. As a matter of fact, I got that from a hint in another thread from t00fri, I do believe. :)

Note that your flavor of Linux might package this group differently; that's the Opensuse name. I haven't tried it under CentOS yet.

Once I got past the zlib error, everything else was pretty straightforward. I had to install:

- gtkglext-devel
- kde3-devel
- qt-devel

... basically, anything and everything to do with X11/KDE development. This I can't complain about, because it makes sense. But that "missing zlib" thing is totally misleading.

Now for the good news: I have a new dual-core AMD 64-bit system, and Celestia 1.6 runs so fast, it's like a freakin' movie. Seriously, it's like Industrial Light and Magic stuff. When I first fired it up, it was nice and quick, but there was still a little jerkiness (for example, during the opening demo from sun to earth). Then I realized that I had DOSBox open, running an old DOS game, as well as Firefox running some Flash junk!! Once I closed those two, it literally took off and flew.

Hats off and kudos to the development team. I don't know what you did to speed up Celestia 1.6, but whatever it was, it worked. This is even with some fairly processor-intensive addons (such as several depicting all of the stars near Sagittarius A* at the galatic center). WELL DONE. :)


Return to “Development”