# /usr/ports/graphics/sdl_image does not build



## kmh (Feb 17, 2013)

Hi,

I have the following problem:


```
[libtool: link: cc -I/usr/local/include -I/usr/local/include/libpng15 -O2 -pipe -fno-strict-aliasing -I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT -o .libs/showimage showimage.o -Wl,-rpath -Wl,/usr/local/lib  -L/usr/local/lib ./.libs/libSDL_image.so /usr/local/lib/libSDL.so /usr/local/lib/libiconv.so -lvgl /usr/local/lib/libaa.so -lncurses -lm -lusbhid -Wl,-rpath -Wl,/usr/local/lib
/usr/local/lib/libSDL.so: undefined reference to `pthread_create'
gmake: *** [showimage] Error 1
*** [do-build] Error code 1

Stop in /usr/ports/graphics/sdl_image.
```

I'm using FreeBSD 9.1 AMD64. Portstree is up to date. I got this error while compiling VLC.

How far I understand the Problem: The linker does expect 'libpthread' but does not find it. My knowledge about the buildscripts is not so good as i know where to fix this error.


----------



## cpm@ (Feb 26, 2013)

It should be listed in 'sdl-config --libs'. Use option -lpthread.

```
[CMD="#"]nm /usr/local/lib/libSDL.so | grep pthread_create[/CMD]
U pthread_create@@FBSD_1.0
```


----------



## kmh (Feb 27, 2013)

There we go, thanks a lot!


----------



## cpm@ (Feb 27, 2013)

Please, read this comment


----------

