[Slackbuilds-users] fluidsynth slackbuild failure
B Watson
yalhcru at gmail.com
Tue Jan 29 17:11:59 UTC 2019
On 1/29/19, Tim Dickson via SlackBuilds-users
<slackbuilds-users at slackbuilds.org> wrote:
> when trying to create fluidsynth package with LADSPA=yes
> and lash, portaudio and jack2 present i get
> the compiling bombing out at
>
> [ 95%] Linking C shared library libfluidsynth.so
> CMakeFiles/libfluidsynth.dir/bindings/fluid_lash.c.o: In function
> `fluid_lash_create_thread':
> /tmp/SBo/fluidsynth-1.1.6/src/bindings/fluid_lash.c:65: undefined
> reference to `pthread_create'
> collect2: error: ld returned 1 exit status
> src/CMakeFiles/libfluidsynth.dir/build.make:1110: recipe for target
> 'src/libfluidsynth.so.1.5.2' failed
> make[2]: *** [src/libfluidsynth.so.1.5.2] Error 1
> CMakeFiles/Makefile2:183: recipe for target
> 'src/CMakeFiles/libfluidsynth.dir/all' failed
> make[1]: *** [src/CMakeFiles/libfluidsynth.dir/all] Error 2
> Makefile:149: recipe for target 'all' failed
> make: *** [all] Error 2
>
> I've had a look at fluid_lash.c and it includes pthread.h and
> /usr/include/pthread.h has a pthread_create function. Any ideas?
fluidsynth isn't my package, but jack and jack2 are...
This isn't a compile problem, it's a link problem. Caused by the fact that:
# jack-audio-connection-kit installed
$ pkg-config --libs jack
-ljack -lpthread
# jack2 installed
$ pkg-config --libs jack
-ljack
fluidsynth is assuming it doesn't have to add -lpthread to its link
flags because it thinks the pkg-config for jack will always have it.
I'm not sure (yet) whether it's better to fix this by patching
jack2 or fluidsynth, but for now, to get this to build, try editing
fluidsynth.SlackBuild, find these 2 lines:
-DCMAKE_EXE_LINKER_FLAGS="-ltermcap" \
-DCMAKE_SHARED_LINKER_FLAGS="-ltermcap" \
...and add -lpthread to them, so they look like:
-DCMAKE_EXE_LINKER_FLAGS="-ltermcap -lpthread" \
-DCMAKE_SHARED_LINKER_FLAGS="-ltermcap -lpthread" \
This is untested, let me know if it doesn't work.
The long-term solution to this will probably be for me to add -lpthred
to jack2's pkg-config. Will have to do some testing, make sure it doesn't
break anything (it shouldn't though).
> (I have assumed that jack2 is equivalent to jack-audio-connection-kit as
> they are mutually exclusive.)
According to the jack devs, you're supposed to be able to assume that
they're equivalent.
More information about the SlackBuilds-users
mailing list