News:

--

Main Menu

compile fails because of no -lpthread ?

Started by rosc, October 21, 2012, 02:46:43 PM

Previous topic - Next topic

rosc


Got past the previously posted error, and now come upon this fella:

make[2]: Entering directory `/sda3/rosc/work/avidemux_2.6.0/buildPluginsCommon'
/usr/bin/cmake -E cmake_progress_report /home/rosc/work/avidemux_2.6.0/buildPluginsCommon/CMakeFiles 85
/usr/local/lib/libxvidcore.a(postprocessing.o): In function `image_postproc':
postprocessing.c:(.text+0xb117): undefined reference to `pthread_create'
postprocessing.c:(.text+0xb154): undefined reference to `pthread_join'
postprocessing.c:(.text+0xb1e7): undefined reference to `pthread_create'
postprocessing.c:(.text+0xb224): undefined reference to `pthread_join'
/usr/local/lib/libxvidcore.a(encoder.o): In function `FrameCodeP':
encoder.c:(.text+0x2520): undefined reference to `pthread_create'
encoder.c:(.text+0x257b): undefined reference to `pthread_join'
encoder.c:(.text+0x2816): undefined reference to `pthread_create'
encoder.c:(.text+0x2863): undefined reference to `pthread_join'
/usr/local/lib/libxvidcore.a(encoder.o): In function `enc_encode':
encoder.c:(.text+0x554f): undefined reference to `pthread_create'
encoder.c:(.text+0x55a5): undefined reference to `pthread_join'
encoder.c:(.text+0x6526): undefined reference to `pthread_create'
encoder.c:(.text+0x658b): undefined reference to `pthread_join'
encoder.c:(.text+0x6828): undefined reference to `pthread_create'
encoder.c:(.text+0x6883): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[2]: *** [ADM_videoEncoder/xvid4/libADM_ve_xvid4.so] Error 1
make[2]: Leaving directory `/sda3/rosc/work/avidemux_2.6.0/buildPluginsCommon'
make[1]: *** [ADM_videoEncoder/xvid4/CMakeFiles/ADM_ve_xvid4.dir/all] Error 2


Usually I'd just edit the makefile to include -lpthread, but the new version avidemux build setup is too complicated so I don't know how to fix this. Any clues appreciated.


mean

2 Solutions :
* You use a shared lib xvid
* you change
TARGET_LINK_LIBRARIES(ADM_ve_xvid4 "${XVID_LIBRARY_DIR}")
to
TARGET_LINK_LIBRARIES(ADM_ve_xvid4 "${XVID_LIBRARY_DIR}" pthread)

in avidemux_plugins/ADM_videoEncoder/xvid4/CMakeLists.txt



rosc

Yay that worked. Compile success! :)

Thank you!!