From: Dan Nelson Date: August 19 2004 6:51pm Subject: Re: Compilation error List-Archive: http://lists.mysql.com/mysql/171217 Message-Id: <20040819185122.GF74594@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Aug 19), Casey Allen Shobe said: > Same problem when trying to compile 4.0 instead of 4.1: > > gcc -O3 -DDBUG_OFF -O3 -mcpu=i686 -felide-constructors -fno-rtti > mini_client_errors.o stacktrace.o repl_failsafe.o sql_olap.o -static ^^^ Note the -static flag here > ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a > ../strings/libmystrings.a -ldl -lpthread -lz -lcrypt -lnsl -lm -lpthread > /bin/ld: cannot find -lz > collect2: ld returned 1 exit status > > Yes, I have zlib. > > > > $ find /lib -user zlib | xargs ls -l > > lrwxrwxrwx 1 zlib zlib 13 Mar 29 2003 /lib/libz.so -> libz.so.1.1.4 > > lrwxrwxrwx 1 zlib zlib 13 Mar 29 2003 /lib/libz.so.1 -> libz.so.1.1.4 > > -rwxr-xr-x 1 zlib zlib 63020 Mar 23 2003 /lib/libz.so.1.1.4 But you don't have a static libz (libz.a). You've only got a dynamic one. Redhat usually puts the static libraries in a separate "-dev" rpm. -- Dan Nelson dnelson@stripped