Mark Ding

LTIB 1105 miss zlib under Ubuntu 1104

Discussion created by Mark Ding Employee on Jan 18, 2012

We built the LTIB 1105 under Ubuntu 1104, but it reported missing zlib and glibc-devel packages.

Package Minimum ver Installed info
------- ----------- ---------------
glibc-devel 0 not installed
zlib 0 not installed

Died at ./ltib line 1397.
traceback:
main::host_checks:1397
main:542

Started: Wed Oct 19 18:02:59 2011
Ended: Wed Oct 19 18:03:05 2011
Elapsed: 6 seconds

Build Failed

The reason is zlib path changed in Ubuntu 1104.

Open ./bin/Ltibutils.pm, found zlib point to libz.so.

    zlib         => sub { my @f = (glob('/usr/lib/libz.so*'),                                    glob('/lib/libz.so*'),                                    glob('/lib64/libz.so*')  ); @f > 1 ? 1 : 0 }, 

Locate where libz.so in my Ubuntu 11.04

$ locate libz.so /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1.2.3.4 /usr/lib/vmware-tools/lib32/libz.so.1 /usr/lib/vmware-tools/lib32/libz.so.1/libz.so.1 /usr/lib/vmware-tools/lib64/libz.so.1 /usr/lib/vmware-tools/lib64/libz.so.1/libz.so.1 /usr/lib/x86_64-linux-gnu/libz.so /usr/lib32/libz.so /usr/lib32/libz.so.1 /usr/lib32/libz.so.1.2.3.4 

So we got that libz.so locate at "/lib/x86_64-linux-gnu/libz.so.1", so change the code as below:

-      glob('/lib64/libz.so*')  ); @f > 1 ? 1 : 0 }, +      glob('/lib/x86_64-linux-gnu/libz.so*')  ); @f > 1 ? 1 : 0 }, 

Which same way, we found glibc-devel point to "libm.so". and libm.so locate at '/usr/lib/x86_64-linux-gnu/libm.so'

-'glibc-devel'    => sub { -f '/usr/lib/libm.so' || -f '/usr/lib64/libz.so'}, +'glibc-devel'    => sub { -f '/usr/lib/x86_64-linux-gnu/libm.so' || -f '/usr/lib6/x86_64-linux-gnu/libz.so'}, 

Outcomes