# cannot find the library `../zlib/libzlt.la' (or unhandled argument)



## sneak (Mar 15, 2011)

Hi I'm pretty new to FreeBSD so I really don't have any idea what's going on here, but my best guess is I'm missing libs or something in the make script is pointing in a wrong directory. I used search and couldn't find anything relevant to my situation.

When I do the following:


```
make install WITH_XCHARSET=all clean
```

This is what I get:


```
Making all in extra
make  all-recursive
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT comp_err.o 
-MD -MP -MF .deps/comp_err.Tpo -c -o comp_err.o comp_err.c
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT replace.o 
-MD -MP -MF .deps/replace.Tpo -c -o replace.o replace.c
mv -f .deps/comp_err.Tpo .deps/comp_err.Po
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT perror.o 
-MD -MP -MF .deps/perror.Tpo -c -o perror.o perror.c
mv -f .deps/perror.Tpo .deps/perror.Po
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT resolveip.o 
-MD -MP -MF .deps/resolveip.Tpo -c -o resolveip.o resolveip.c
mv -f .deps/replace.Tpo .deps/replace.Po
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT 
my_print_defaults.o -MD -MP -MF .deps/my_print_defaults.Tpo -c -o my_print_defaults.o my_print_defaults.c
mv -f .deps/resolveip.Tpo .deps/resolveip.Po
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT 
resolve_stack_dump.o -MD -MP -MF .deps/resolve_stack_dump.Tpo -c -o resolve_stack_dump.o resolve_stack_dump.c
mv -f .deps/my_print_defaults.Tpo .deps/my_print_defaults.Po
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT 
mysql_waitpid.o -MD -MP -MF .deps/mysql_waitpid.Tpo -c -o mysql_waitpid.o mysql_waitpid.c
mv -f .deps/mysql_waitpid.Tpo .deps/mysql_waitpid.Po
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT 
innochecksum.o -MD -MP -MF .deps/innochecksum.Tpo -c -o innochecksum.o innochecksum.c
mv -f .deps/resolve_stack_dump.Tpo .deps/resolve_stack_dump.Po
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC -MT 
charset2html.o -MD -MP -MF .deps/charset2html.Tpo -c -o charset2html.o charset2html.c
mv -f .deps/innochecksum.Tpo .deps/innochecksum.Po
/bin/sh ../libtool --preserve-dup-deps --tag=CC    --mode=link cc  -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  -fPIC    -o comp_err 
comp_err.o ../mysys/libmysys.a  ../dbug/libdbug.a ../strings/libmystrings.a  ../zlib/libzlt.la -pthread -lcrypt -lm  -pthread
mv -f .deps/charset2html.Tpo .deps/charset2html.Po
libtool: link: cannot find the library `../zlib/libzlt.la' or unhandled argument `../zlib/libzlt.la'
*** Error code 1
1 error
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1
```

Thanks in advance for any assistance available.


----------



## DutchDaemon (Mar 15, 2011)

Would help if you mentioned the port, I guess.


----------



## sneak (Mar 15, 2011)

I think the answer your looking for would be 'mysql50-server' but I'm not so familiar with FreeBSD terminology so I'll give you the full path too.

/usr/ports/databases/mysql50-server/

Hope that helps.


----------



## DutchDaemon (Mar 15, 2011)

I managed to build that port, with that extra setting, just fine. What I can see comparing my output to yours is that you have the *-fPIC* flag where I do not. Clear any compiler flags from /etc/make.conf and try again.

Example:


```
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -fno-strict-aliasing -pipe  [FILE][B]-fPIC[/B][/FILE] -MT replace.o 
-MD -MP -MF .deps/replace.Tpo -c -o replace.o replace.c
```


```
cc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include  -I../sql     -DDBUG_OFF -O2 -pipe -fno-strict-aliasing -MT replace.o 
-MD -MP -MF .deps/replace.Tpo -c -o replace.o replace.c
```


----------

