[vlc-devel] Python bindings (vlcinternal build problem?)

Etienne Robillard etienne.robillard at extenway.com
Fri Jan 18 16:12:29 CET 2008


Hi Olivier,

Thanks very much for the quick fix/response. I've tried the revision 24389 and 
both modules (vlc and vlcinternal) compiles fine.  =) 

The only thing I really have to do is modifiy the 
include/vlc/mediacontrol_structures.h file, in order to change uint32_t to 
u_int32_t. It seems that gcc would complain about some syntax errors with 
uint32_t but it would compile ok with u_int32_t. Notice that this only seems 
to affect the vlc extension and not the vlcinternal module!

# cd bindings/python
# python setup.py build
running build
running build_ext
building 'vlc' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -g -fPIC -I../.. -I./../../include -I. -I/usr/win32/include -I/usr/include/python2.4 -c ./vlc_module.c -o 
build/temp.linux-i686-2.4/./vlc_module.o -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DLOCALEDIR="/usr/share/locale" -DDATA_PATH="/usr/share/vlc" -DPLUGIN_PATH="/usr/lib/vlc" -DMODULE_NAME=vlc -DMODULE_NAME_IS_vlc -O2 -ffast-math -funroll-loops -mtune=pentium2 -fomit-frame-pointer
In file included from ./vlcglue.h:33,
                 from ./vlc_module.c:24:
./../../include/vlc/mediacontrol_structures.h:87: error: syntax error 
before 'uint32_t'
./../../include/vlc/mediacontrol_structures.h:87: warning: no semicolon at end 
of struct or union
./../../include/vlc/mediacontrol_structures.h:91: error: syntax error 
before '}' token
./../../include/vlc/mediacontrol_structures.h:91: warning: data definition has 
no type or storage class
In file included from ./vlcglue.h:34,
                 from ./vlc_module.c:24:
./../../include/vlc/mediacontrol.h:63: error: syntax error before '*' token
./../../include/vlc/mediacontrol.h:248: error: syntax error before '*' token
./../../include/vlc/mediacontrol.h:251: warning: data definition has no type 
or storage class
./../../include/vlc/mediacontrol.h:260: error: syntax error before '*' token
./../../include/vlc/mediacontrol.h:262: warning: data definition has no type 
or storage class
In file included from ./vlc_module.c:175:
./vlc_mediacontrol.c: In function 'MediaControl_snapshot':
./vlc_mediacontrol.c:374: error: 'p_retval' undeclared (first use in this 
function)
./vlc_mediacontrol.c:374: error: (Each undeclared identifier is reported only 
once
./vlc_mediacontrol.c:374: error: for each function it appears in.)
In file included from ./vlc_module.c:177:
./vlc_instance.c: In function 'vlcInstance_new':
./vlc_instance.c:102: warning: passing argument 2 of 'libvlc_new' from 
incompatible pointer type
./vlc_instance.c: In function 'vlcInstance_playlist_add':
./vlc_instance.c:285: warning: passing argument 5 
of 'libvlc_playlist_add_extended' from incompatible pointer type
./vlc_instance.c: At top level:
./vlc_instance.c:809: warning: initialization from incompatible pointer type
./vlc_instance.c:823: warning: initialization from incompatible pointer type
error: command 'gcc' failed with exit status 1

# gcc -v
Using built-in specs.
Target: i586-mandriva-linux-gnu
Configured 
with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-languages=c,c++,ada,f95,objc,java --host=i586-mandriva-linux-gnu --with-system-zlib --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo --disable-libjava-multilib
Thread model: posix
gcc version 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)

# head config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by vlc configure 0.9.0-svn, which was
generated by GNU Autoconf 2.59.  Invocation command line was

$ ./configure --prefix=/usr --enable-python-bindings --disable-mad --enable-xosd --disable-wxwidgets --disable-skins2

Here's the "patch" again for include/vlc/mediacontrol_structures.h: 
--- mediacontrol_structures.h.orig      2008-01-18 02:47:27.000000000 -0600
+++ mediacontrol_structures.h   2008-01-18 02:47:36.000000000 -0600
@@ -84,7 +84,7 @@
 typedef struct {
     int  width;
     int  height;
-    uint32_t type;
+    u_int32_t type;
     int64_t date;
     int  size;
     char *data;

Cheers!
Etienne

On 18 January 2008 09:22:05 Olivier Aubert wrote:
> > --- mediacontrol_structures.h   2008-01-17 06:50:26.000000000 -0600
> > +++ mediacontrol_structures.h.mine      2008-01-17 06:50:00.000000000
> > -0600 @@ -84,7 +84,7 @@
> >  typedef struct {
> >      int        width;
> >      int        height;
> > -    int32_t    type;
> > +    u_int32_t  type;
> >      int64_t    date;
> >      int        size;
> >      char       *data;
>
> Strange. In the repository, type is defined as uint32_t (which u_int32_t
> is also a typedef for anyway) since rev. 22709, so I cannot figure where
> your source really comes from.
>
> > Now if I'm trying to execute the setup-internal.py script in
> > bindings/python: [...]
>
> It is just that some internal features of VLC have been even more
> "privatized". It is now fixed in svn. Please be aware that vlc_internal,
> as its name implies, is really doing things it should not do (accessing
> private variables, etc), and should only be used by knowledgeable
> people.
>
> Olivier
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080118/690269be/attachment.sig>


More information about the vlc-devel mailing list