Page 1 of 1

Error cross-compile 0.8.6c for win on debian unstable.

Posted: 31 Oct 2007 00:53
by robertparson
Hello,

I tried to cross-compile VLC 0.8.6c for windows on my debian(unstable) but I
had a problem :

./bootstrap ok
./configure... ok
make failed

error :


"if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I. -I../..
-I/usr/win32/include -I/usr/win32/include/ebml -D_OFF_T_ -D_off_t=long
-DSYS_MINGW32 -I../../include `top_builddir="../.." ../../vlc-config
--cflags plugin cdda` -Wsign-compare -Wall -mms-bitfields -pipe -MT
libcdda_plugin_a-cdrom.o -MD -MP -MF ".deps/libcdda_plugin_a-cdrom.Tpo" -c
-o libcdda_plugin_a-cdrom.o `test -f 'vcd/cdrom.c' || echo './'`vcd/cdrom.c;
\
then mv -f ".deps/libcdda_plugin_a-cdrom.Tpo"
".deps/libcdda_plugin_a-cdrom.Po"; else rm -f ".deps/libcdda_plugin_a-
cdrom.Tpo"; exit 1; fi
vcd/cdrom.c: In function 'win32_vcd_open':
vcd/cdrom.c:1166: error: lvalue required as left operand of assignment
vcd/cdrom.c:1168: error: lvalue required as left operand of assignment
make[4]: *** [libcdda_plugin_a-cdrom.o] Erreur 1"


after search on google with my error, i can't find a solution....... If anyone knows... Thanks

Best Regards

Re: Error cross-compile 0.8.6c for win on debian unstable.

Posted: 31 Oct 2007 12:57
by funman
are you using mingw 4.x ?

if yes, then look at commits 22408, 22409, 22410, 22411 and maybe others, which brought fixes (on the trunk version) for compiling with gcc 4.x

http://trac.videolan.org/vlc/changeset/22408 for example

Re: Error cross-compile 0.8.6c for win on debian unstable.

Posted: 31 Oct 2007 18:02
by robertparson
Thanks for your reply ;)

I used :
- mingw32 4.2.1.dfsg-1
- gcc 4.2.2-3

So I modified cdrom.c file dans modules/access/vcd/cdrom.c following changeset :
http://trac.videolan.org/vlc/changeset/22408

Then I must add --disable-dts in my configure

Then I modified dmo.h file dans modules/codec/dmo/dmo.h following changeset :
http://trac.videolan.org/vlc/changeset/22409

Then new error :twisted:

"if i586-mingw32msvc-g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/win32/include -I/usr/win32/include/ebml -D_OFF_T_ -D_off_t=long -DSYS_MINGW32 -I../../../include `top_builddir="../../.." ../../../vlc-config --cxxflags plugin skins2` -Wsign-compare -Wall -mms-bitfields -pipe -MT libskins2_plugin_a-async_queue.o -MD -MP -MF ".deps/libskins2_plugin_a-async_queue.Tpo" -c -o libskins2_plugin_a-async_queue.o `test -f 'commands/async_queue.cpp' || echo './'`commands/async_queue.cpp; \
then mv -f ".deps/libskins2_plugin_a-async_queue.Tpo" ".deps/libskins2_plugin_a-async_queue.Po"; else rm -f ".deps/libskins2_plugin_a-async_queue.Tpo"; exit 1; fi
In file included from ../../../include/vlc_common.h:73,
from ../../../include/vlc/vlc.h:153,
from commands/../src/skin_common.hpp:28,
from commands/cmd_generic.hpp:28,
from commands/async_queue.hpp:28,
from commands/async_queue.cpp:25:
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/sys/types.h:41: error: types multiples dans une déclaration
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/sys/types.h:41: error: déclaration ne déclarant rien du tout
In file included from ../../../include/vlc/intf.h:39,
from commands/../src/skin_common.hpp:29,
from commands/cmd_generic.hpp:28,
from commands/async_queue.hpp:28,
from commands/async_queue.cpp:25:
../../../include/vlc_input.h: In function 'void vlc_input_item_Clean(input_item_t*)':
../../../include/vlc_input.h:165: attention : deprecated conversion from string constant to 'char*'
commands/async_queue.cpp: In destructor 'virtual AsyncQueue::~AsyncQueue()':
commands/async_queue.cpp:48: attention : deprecated conversion from string constant to 'char*'
make[6]: *** [libskins2_plugin_a-async_queue.o] Erreur 1"

Re: Error cross-compile 0.8.6c for win on debian unstable.

Posted: 02 Nov 2007 00:08
by funman
it is unlikely we will put effort to make 0.8.6 compile with gcc 4.x , but your patch will be welcome if you can make any

Re: Error cross-compile 0.8.6c for win on debian unstable.

Posted: 03 Nov 2007 13:41
by robertparson
thanks...

but anyone has already passed the cross-compile with 0.8.6c ?

if I use gcc 3.x it's possible, better ? :roll:

Re: Error cross-compile 0.8.6c for win on debian unstable.

Posted: 03 Nov 2007 16:38
by funman
gcc 3.x should work out of the box

Re: Error cross-compile 0.8.6c for win on debian unstable.

Posted: 03 Nov 2007 19:27
by Jean-Baptiste Kempf
thanks...

but anyone has already passed the cross-compile with 0.8.6c ?

if I use gcc 3.x it's possible, better ? :roll:
I do it all the time, without any problem, using debian, and mingw gcc 3.4.5