The Old "Zlib not found" error

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Posts: 5
Joined: 01.06.2009
With us: 11 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 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 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
Posts: 5
Joined: 01.06.2009
With us: 11 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 "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.

Posts: 1
Joined: 19.08.2009
With us: 11 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) :(

Posts: 8772
Joined: 29.03.2002
Age: 18
With us: 18 years 7 months
Location: Hamburg, Germany

Re: The Old "Zlib not found" error

Post #4by t00fri » 19.08.2009, 21:13


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 => (0xffffe000) => /opt/kde3/lib/ (0xb7c8e000) => /opt/kde3/lib/ (0xb79b3000) => /opt/kde3/lib/ (0xb799c000) => /opt/kde3/lib/ (0xb798a000) => /opt/kde3/lib/ (0xb7756000) => /opt/kde3/lib/ (0xb7721000) => /lib/ (0xb76e6000) => /lib/ (0xb76e2000) => /usr/lib/ (0xb76cb000) => /usr/lib/ (0xb7699000) => /opt/kde3/lib/ (0xb766f000) => /usr/lib/qt3/lib/ (0xb6f6a000) => /usr/lib/ (0xb6f63000) => /usr/lib/ (0xb6f59000) => /usr/lib/ (0xb6f53000) => /usr/lib/ (0xb6f4f000) => /usr/lib/ (0xb6f3c000) => /usr/lib/ (0xb6f0f000) => /usr/lib/ (0xb6ea0000) => /lib/ (0xb6e7f000) => /lib/ (0xb6e68000) => /usr/lib/ (0xb6e5f000) => /usr/lib/ (0xb6e57000) => /lib/ (0xb6e4e000) => /lib/ (0xb6e48000) => /usr/lib/ (0xb6e23000) => /usr/lib/ (0xb6e03000) => /usr/lib/ (0xb6d89000) => /usr/lib/ (0xb6d72000) => /usr/lib/ (0xb6d20000) => /usr/lib/ (0xb6d17000) => /usr/lib/ (0xb6cfe000) => /usr/lib/ (0xb6cf5000) => /usr/lib/ (0xb6cf2000) => /usr/lib/ (0xb6cd9000) => /usr/lib/ (0xb6cd4000) => /lib/ (0xb6cc1000) => /usr/lib/ (0xb6c1d000) => /usr/lib/ (0xb6c0e000) => /usr/lib/ (0xb6af3000) => /lib/ (0xb6aef000) => /usr/lib/ (0xb6aa3000) => /usr/lib/ (0xb6a9d000) => /usr/lib/ (0xb6a75000) => /usr/lib/ (0xb6987000) => /lib/ (0xb6962000) => /lib/ (0xb6956000) => /lib/ (0xb6822000)
/lib/ (0xb7fc5000) => /usr/lib/ (0xb5ae2000) => /usr/lib/tls/ (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...)?


Topic author
Posts: 5
Joined: 01.06.2009
With us: 11 years 5 months


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”

Who is online