LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-21-2011, 06:03 AM   #1
volsung
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Rep: Reputation: Disabled
Unable to find -lz (zlib). Developer package is already installed :?


Hello,

I'm trying to compile NWNX2 in a Debian 5.0.3 (64bits) machine and I'm getting the following error when doing a ./configure:

Code:
volsung@ns363984:~/nwnserver/nwnx/nwnx-easy$ ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for void *... yes
checking size of void *... 8
checking for a sed that does not truncate output... /bin/sed
checking whether the C compiler accepts the -mtune=i386 flag... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for bzero... yes
checking for getspnam... yes
checking for inflateEnd in -lz... no
Unable to find -lz (zlib). Please install a zlib developer's package.
I have both zlib1g and zlib1g-dev installed.

Code:
volsung@ns363984:~/nwnserver/nwnx/nwnx-easy$ whereis zlib
zlib: /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz
I'm not very used to compiling my own binaries, and I've been stuck here for a while already searching for the root of the problem, but I'm lacking the knowledge, I'm afraid.

I have also tried looking directly at the configure file; this is the part where it does all the zlib "things" (I think):

Code:
# zlib, move to db subdir's config
{ echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5
echo $ECHO_N "checking for inflateEnd in -lz... $ECHO_C" >&6; }
if test "${ac_cv_lib_z_inflateEnd+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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 inflateEnd ();
int
main ()
{
return inflateEnd ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext &&
       $as_test_x conftest$ac_exeext; then
  ac_cv_lib_z_inflateEnd=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_z_inflateEnd=no
fi

rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateEnd" >&5
echo "${ECHO_T}$ac_cv_lib_z_inflateEnd" >&6; }
if test $ac_cv_lib_z_inflateEnd = yes; then
  true
else
  echo Unable to find -lz \(zlib\).  Please install a zlib developer\'s package. ; exit 1
fi
Once again, I have no idea of where to look at here, but I guess someone might?

Anyway, thanks for your time.
 
Old 08-21-2011, 08:33 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
Look in the file config.log for the error. When the configure script looks for various libraries, it generally tries to compile simple programs against these libraries. config.log will give you more detail about what the configure script was actually trying to do when it bombed. Post the section of config.log where the error occurs if you need help.
 
Old 08-21-2011, 08:46 AM   #3
volsung
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
From config.log:

Code:
configure:5892: gcc -o conftest -mtune=i386 -pipe -m32 -g -O2 -mtune=i386 -pipe -m32  -m32  conftest.c -lz   >&5
/usr/bin/ld.real: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libz.so when searching for -lz
/usr/bin/ld.real: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libz.a when searching for -lz
/usr/bin/ld.real: skipping incompatible /usr/bin/../lib/libz.so when searching for -lz
/usr/bin/ld.real: skipping incompatible /usr/bin/../lib/libz.a when searching for -lz
/usr/bin/ld.real: skipping incompatible /usr/local/lib/libz.so when searching for -lz
/usr/bin/ld.real: skipping incompatible /usr/local/lib/libz.a when searching for -lz
/usr/bin/ld.real: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld.real: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld.real: cannot find -lz
I've been told nwnx2 apparently doesn't compile in 64bits; found a guide to chroot the whole thing. Will try and see what happens
 
Old 08-21-2011, 10:01 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Yes, the -m32 option means the application will be built in a 32-bit environment. You can try to install the 32-bit version of the required libraries. Here are some other guides:
http://www.unixtutorial.org/2008/03/...ges-on-64-bit/
http://www.debian-administration.org/articles/534
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find the name of an package installed satimis Debian 5 09-19-2010 11:38 PM
how to find a package installed ? jabka Debian 3 09-06-2007 07:59 PM
How to find out if you have a specific package installed? AriciU Slackware 2 07-08-2007 10:58 PM
How to find if package is installed Redbone981sl Ubuntu 4 01-23-2007 06:03 PM
Unable to find -lz (zlib). RPM is installed...???? dolvmin Linux - Software 3 12-03-2005 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration