Libpng 1.6.24 to 1.6.25 update fails with error (CentOS6)

113345

Verified User
Hi,

When updating libpng I ran into the following error:

Code:
contrib/tools/pngfix.o: In function `zlib_reset':
/usr/local/directadmin/custombuild/libpng-1.6.25/contrib/tools/pngfix.c:2185: undefined reference to `inflateReset2'
collect2: ld returned 1 exit status
make[1]: *** [pngfix] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/libpng-1.6.25'
make: *** [all] Error 2
After searching the forum I found the following post: http://forum.directadmin.com/showthread.php?t=51313 suggesting to install 'zlib-devel', but that is already installed.

I have recently installed zlib 1.2.8 from source, so that may be the problem.

In another search I came across this post: https://recalll.co/app/?q=matplotlib%20-%20pngfix.c:2151:%20undefined%20reference%20to%20%60inflateReset2%27 which suggested it was caused by installing a newer version of zlib.
Libtool doesn't seem to know about this, so I followed the suggestions is that article.

I changed /usr/local/directadmin/custombuild/build to include 'LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include"' in the configure command for libpng.


Code:
####################################################

doLibPng() {
        quitIfLocked doLibPng

        cd ${CWD}

        getFile libpng-${PNG_VER}.tar.gz libpng_current

        tar xzf libpng-${PNG_VER}.tar.gz --no-same-owner
        cd libpng-${PNG_VER}

        LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure --prefix=/usr/local
That solved the problem.

Is it possible to make this permanent, because it will disappear when 'build' is updated?
 

SeLLeRoNe

Super Moderator
I've notified smtalk (which is the guy that mantain custombuild for us) about this thread.

Best regards
 

Jan_E

Verified User
I am still running into the same problem on Centos 6. Should not this be the default, as this is where Directadmin installs zlib:
Code:
LDFLAGS="-L/usr/local/lib_da/lib" CPPFLAGS="-I/usr/local/lib_da/include" ./configure --prefix=/usr/local
 
Top