Hardinfo: Hardinfo cannot run CPU Zlib benchmark. Cannot find libz.so.

Bug #178584 reported by moma
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hardinfo (Debian)
Fix Released
Unknown
hardinfo (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: hardinfo

This installation is a 32 bits version of Hardy Heron Test 2.

I start the "hardinfo" utility and try to run the CPU ZLib benchmark on it.

But it fails with an error message: "Cannot load ZLib. /usr/lib/libz.so not found".
See picture: http://www.edbl.no/tmp/hardinfo-error-2.png

I had already installed the "zlib1g" package so something else had to be wrong. The symbolic link to "libz.so" is missing.
$ ls -l /usr/lib/libz.*
lrwxrwxrwx 1 root root 15 2007-12-22 21:24 /usr/lib/libz.so.1 -> libz.so.1.2.3.3
-rw-r--r-- 1 root root 81240 2007-11-15 13:08 /usr/lib/libz.so.1.2.3.3

This error can be fixed by installing the development package "zlib1g-dev" . It creates the missing sym link to libz.so.

Hardinfo should not be dependent on the 2zlib1g-dev development package.
----------

A question:
I was told that the actual program line (in the source) is
libz = g_module_open("/usr/lib/libz.so", G_MODULE_BIND_LAZY);

Why does it use a fixed library path (/usr/lib/)?
Maybe the path is different on other Linux-distributions (eg. /lib/ or /usr/local/lib/)?
----------

Study also this related bugreport: https://bugs.launchpad.net/ubuntu/+source/hardinfo/+bug/178267
----------

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Please add any additional remark you feel is needed in the bug I opened in Debian (see link above).

Changed in hardinfo:
importance: Undecided → Low
status: New → Confirmed
Changed in hardinfo:
status: Unknown → New
Changed in hardinfo:
status: New → Won't Fix
Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

This benchmark will be removed in the next version.

Revision history for this message
Hew (hew) wrote :

Bug is still present in Hardy release.

Revision history for this message
Fevrin (fevrin) wrote :

I can confirm as well that the bug is present in Ubuntu 8.04 (AMD64). As a workaround, I manually created a link called "libz.so.1" in /usr/lib/, which seems to be what zlib1g-dev does. So which "next version" is the benchmark going to be removed from? And any particular reason why?

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

I also like HardInfo. The benchmark to remove is the zlib. HardInfo is and stand still on the repos.

Revision history for this message
Roberto Leinardi (leinardi) wrote :

I solved the problem simply by installing zlib1g-dev:

sudo apt-get install zlib1g-dev

Revision history for this message
Hew (hew) wrote :

Is upstream ever going to release the new version with the fix? Perhaps it's time for Ubuntu to add a patch.

Changed in hardinfo:
status: Confirmed → Triaged
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

>Perhaps it's time for Ubuntu to add a patch.

Yes, it is.

Changed in hardinfo:
status: Triaged → Fix Committed
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

hardinfo (0.4.2.3-4ubuntu1) intrepid; urgency=low

  * Correct libz SONAME to make the CPU Zlib benchmark available (LP: #178583).

 -- Cesare Tirabassi < <email address hidden>> Tue, 30 Sep 2008 11:38:28 +0200

Changed in hardinfo:
status: Fix Committed → Fix Released
Revision history for this message
spcwingo (spcwingo1) wrote :

I solved this problem by manually creating a symlink in /usr/lib/ named libz.so pointing to /usr/lib/libz.so.1.2.3.3. Now CPU ZLib benchmark works perfectly!

Changed in hardinfo (Debian):
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.