Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with CMake in finding zlib, even if installed

33 views
Skip to first unread message

Mentore Siesto

unread,
Feb 15, 2012, 4:04:49 PM2/15/12
to
Hello all.

I'm trying to port Avidemux 2.5.6 on OS/2, but got stuck in the CMake
part of the process.

CMake complains that I lack zlib installed. So I simply got the latest
zlib and compiled it on OS/2, then installed the library with "make
install" into /usr/local and /usr/local452 (I have got Paul Smedley's
build environment set on U: with much of the latest software).

After launching again CMake, though, it still complains zlib is
missing. Where am I wrong?

Here follows CMake's messages:

-- Source dir is U:/progetti/avidemux_2.5.6

-- Checking GCC support
-- ********************
-- Check if GCC is x86 32-bit - Yes
-- Check if GCC is MMX2 capable - Yes

-- Checking for pkg-config
-- ***********************
-- Found pkg-config

-- Checking for Libxml2
-- ********************
-- Found Libxml2

-- Checking for pthreads
-- *********************
-- Found pthreads

-- Checking for zlib
-- *****************
CMake Error at cmake/admConfigHelper.cmake:16 (MESSAGE):
Could not find zlib
Call Stack (most recent call first):
cmake/admCheckRequiredLibs.cmake:52 (PRINT_LIBRARY_INFO)
CMakeLists.txt:127 (INCLUDE)


-- Configuring incomplete, errors occurred!


I'm sure I'm missing something...

--
Mentore Siesto

Dave Yeo

unread,
Feb 15, 2012, 7:58:25 PM2/15/12
to
Did you compile zlib with configure && make? The OS/2 makefiles are old
and probably need to be updated along with the included DEF.
Did you run make check after compiling but before installing? Watch the
beginlibpath so you use the correct z.dll. After installing (you should
only install into /usr/local) have you got the various /usr/local
directories at the beginning of PATH, BEGINLIBPATH, LIBRARY_PATH,
C_INCLUDE_PATH and CPLUS_INCLUDE_PATH?
Also does cmake leave any logs that you can examine?
Dave

Mentore

unread,
Feb 16, 2012, 3:53:29 AM2/16/12
to
Yes, I used configure / make / make install.

> Did you run make check after compiling but before installing? Watch the
> beginlibpath so you use the correct z.dll. After installing (you should
> only install into /usr/local) have you got the various /usr/local
> directories at the beginning of PATH, BEGINLIBPATH, LIBRARY_PATH,
> C_INCLUDE_PATH and CPLUS_INCLUDE_PATH?

Having gcc 3.3.5 and 4.5.2 together causes me some ambiguity. I have
got an usr/local452 directory, which I believe contains the libraries
built with gcc 4.5.2 and pointed by Paul's build environment using GCC
4.5.2. Fool me, I must check my configuration.

Didn't know, though, that usr/local (or usr/local452, FWIW) must be at
the beginning of the various path environment variables. Will check
ASAP (not tonight, I have other things to do :) ).

> Also does cmake leave any logs that you can examine?

Didn't read any, surely I must search. My concern regards my ignorance
of pkg-config and similar tools... Thanks for now!

Mentore

Paul Smedley

unread,
Feb 16, 2012, 7:48:50 AM2/16/12
to
Hi Mentore

On 16/02/12 07:34, Mentore Siesto wrote:
> Hello all.
>
> I'm trying to port Avidemux 2.5.6 on OS/2, but got stuck in the CMake
> part of the process.
>
> CMake complains that I lack zlib installed. So I simply got the latest
> zlib and compiled it on OS/2, then installed the library with "make
> install" into /usr/local and /usr/local452 (I have got Paul Smedley's
> build environment set on U: with much of the latest software).
>
> After launching again CMake, though, it still complains zlib is
> missing. Where am I wrong?

cmake finds zlib ok here.

\cmake\share\cmake-2.8\Modules\FindZLIB.cmake is what looks for zlib.

What is the anme of your installed *z.a ?

Seems like cmake looks for a lib that matches:
SET(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1)

I have a z.a which is a symlink of libz.a - perhaps if you add libz to
the above it will help?

Cheers,

Paul


Mentore

unread,
Feb 16, 2012, 9:42:18 AM2/16/12
to
On 16 Feb, 13:48, Paul Smedley <paulDES...@DESPAMMsmedley.id.au>
wrote:
Interesting. I will try and find it. Thanks!

Mentore

Dave Yeo

unread,
Feb 16, 2012, 10:56:44 AM2/16/12
to
Mentore wrote:
>> > Did you compile zlib with configure&& make? The OS/2 makefiles are old
>> > and probably need to be updated along with the included DEF.
> Yes, I used configure / make / make install.

Did you run libtoolize to update to an OS/2 fixed libtool? Recent
libtools do everything right then add an extra step that breaks
everything. It's easy to patch but I keep forgetting to make a note of
how. Look at your DLL and import library and DEF and you'll probably
find the DEF has been copied over (or symlinked) the import library or DLL.
Quickest workaround is to just use a static libz. configure
--disable-shared should do it.

>
>> > Did you run make check after compiling but before installing? Watch the
>> > beginlibpath so you use the correct z.dll. After installing (you should
>> > only install into /usr/local) have you got the various /usr/local
>> > directories at the beginning of PATH, BEGINLIBPATH, LIBRARY_PATH,
>> > C_INCLUDE_PATH and CPLUS_INCLUDE_PATH?
> Having gcc 3.3.5 and 4.5.2 together causes me some ambiguity. I have
> got an usr/local452 directory, which I believe contains the libraries
> built with gcc 4.5.2 and pointed by Paul's build environment using GCC
> 4.5.2. Fool me, I must check my configuration.

All the newer GCCs depend on having gcc 3.3.5 installed and the order of
the above variables is important to bring in things correctly. I'd
assume Paul's build environment is set up correctly.

>
> Didn't know, though, that usr/local (or usr/local452, FWIW) must be at
> the beginning of the various path environment variables. Will check
> ASAP (not tonight, I have other things to do:) ).
>
>> > Also does cmake leave any logs that you can examine?
> Didn't read any, surely I must search. My concern regards my ignorance
> of pkg-config and similar tools... Thanks for now!

pkg-config just searches PKG_CONFIG_PATH for its files. eg SET
PKG_CONFIG_PATH=i:/usr/local/lib/pkgconfig;%PKG_CONFIG_PATH% to search
\usr\local first.
Dave

Mentore Siesto

unread,
Feb 16, 2012, 4:03:26 PM2/16/12
to
Il giorno Thu, 16 Feb 2012 12:48:50 UTC, Paul Smedley
<paulD...@DESPAMMsmedley.id.au> ha scritto:
It solved the problem. Now of course CMake didn't complete for other
problems, but it's for lack of required software. Will try to go
further...

--
Mentore Siesto

Paul Smedley

unread,
Feb 17, 2012, 8:50:21 PM2/17/12
to
Hi Mentore
Glad that helped - I fixed findzlub.cmake in my local source, so it will
be included in the next cmake/2 release

Mentore Siesto

unread,
Feb 18, 2012, 5:22:08 AM2/18/12
to
Il giorno Sat, 18 Feb 2012 01:50:21 UTC, Paul Smedley
Great. By the way, happy birthday ;-)

Mentore
0 new messages