[vlc-devel] vlc_threads.h debian etch compilation issue

Yohann Martineau yohann.martineau at gmail.com
Mon Jun 23 17:44:40 CEST 2008


I'm using a standard debian etch and latest git version, via http.

I generated configure script with ./bootstrap and makefiles using
./configure. Beforehand, I had installed libraries recommanded here:


I had an issue during compilation:

gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DSYS_LINUX -I../include
-I../include -I/usr/local/include -D_FILE_OFFSET_BITS=64
-D__LIBVLC__ -I../src/misc -O2 -ffast-math -funroll-loops
-mtune=pentium2 -fomit-frame-pointer -I/usr/include/dbus-1.0
-I/usr/lib/dbus-1.0/include -DMODULE_STRING=\"main\"
-DSYSCONFDIR=\"/usr/local/etc\" -DDATA_PATH=\"/usr/local/share/vlc\"
-DLIBDIR=\"/usr/local/lib\" -DPLUGIN_PATH=\"/usr/local/lib/vlc\" -Wall
-Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast
-Wcast-align -Wwrite-strings -Wmissing-prototypes
-Wvolatile-register-var -MT text/libvlccore_la-iso_lang.lo -MD -MP -MF
text/.deps/libvlccore_la-iso_lang.Tpo -c text/iso_lang.c  -fPIC -DPIC
-o text/.libs/libvlccore_la-iso_lang.o
In file included from ../include/vlc_common.h:493,
    from text/iso_lang.c:34:
../include/vlc_threads.h:477: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'vlc_spinlock_t'
../include/vlc_threads.h:482: error: expected ')' before '*' token
../include/vlc_threads.h:490: error: expected ')' before '*' token
../include/vlc_threads.h:498: error: expected ')' before '*' token
../include/vlc_threads.h:506: error: expected ')' before '*' token
make[3]: *** [text/libvlccore_la-iso_lang.lo] Erreur 1
make[3]: quittant le répertoire « /home/yohann/vlc-dev/vlc/src »
make[2]: *** [all] Erreur 2
make[2]: quittant le répertoire « /home/yohann/vlc-dev/vlc/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/yohann/vlc-dev/vlc »
make: *** [all] Erreur 2

I looked at pthread.h file on my system, and it uses types defined in

In this file I found that pthread_spinlock_t was supposed to be a volatile int:

#ifdef __USE_XOPEN2K
/* POSIX spinlock data type.  */
typedef volatile int pthread_spinlock_t;

But only if use_xopen2k is defined. I have no idea of what xopen2k
is... but it doesn't seem to be defined on my system. When I apply the
attached patch, vlc compiles successfully. So, my patch should
definitely not be applied as is... (who said it would, after all :-)
But I think that this issue should be invastigated.

Let me know if I can help.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thread_spinlock.txt
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080623/171a93bd/attachment.txt>

More information about the vlc-devel mailing list