# port "gnutls" fail when I tried to compile it



## marashliev (Feb 14, 2010)

Hello,
I'm newbie in FreeBSD world, sorry if my question is stupid .

So I tried to compile GNUtls whit 
	
	



```
make install
```
 in /usr/ports/security/gnutls .
It trow an error 

```
/usr/bin/ld: /usr/local/lib/libz.a(deflate.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
*** Error code 1
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I./includes -I../includes -I/usr/local/include -fPIC -I./includes/ -O2 -pipe -fno-strict-aliasing 
-MT libgnutlsxx_la-gnutlsxx.lo -MD -MP -MF .deps/libgnutlsxx_la-gnutlsxx.Tpo -c gnutlsxx.cpp -o libgnutlsxx_la-gnutlsxx.o >/dev/null 2>&1
mv -f .deps/libgnutlsxx_la-gnutlsxx.Tpo .deps/libgnutlsxx_la-gnutlsxx.Plo
1 error
*** Error code 1
```
I tried to "fetch" source and compile out from the port, but with same result . 

Any ideas ?
Thanks for You time .


----------



## marashliev (Feb 15, 2010)

*Resolved*

I resolved the issue , I rebuilt the /usr/local/lib/libz.a (zlib) by adding the following line in zlib Makefile

```
CFLAGS += -fPIC
```


----------

