HOW TO CROSS-COMPILE MPEG4IP FOR ARM ? -------------------------------------- Install my cross-compilation package from http://software.nautilus6.org/zaurus.php if you don't have one (or check that you have all the necessary libraries cross-compiled -- like libSDL -- if you already have one, in that case you may have to change the paths I give). Cross-compile and install xvid 1.0+. Read the instructions, but something like that would do it: export PATH=/usr/local/arm/2.95.3/bin:$PATH && cd build/generic && ./configure --prefix=/usr/local/arm/2.95.3/arm-linux --host=arm-linux && make && make install $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/mpeg4ip co mpeg4ip In lib/rtp/configure.in, comment the line testing /dev/urandom, since it cannot be determined when cross-compiling. Define "PROG_E1 = " in player/src/Makefile.am, since you only want to compile the command-line version, otherwise you have some X libraries problems. Correct key detection in player/src/main.cpp, since the Zaurus has no CTRL key, and that some other keys have other codes. It's not necessary, but then you will maybe need to simply close the terminal connect to your Zaurus by ssh to stop the player. $ export PATH=/usr/local/arm/2.95.3/bin:/usr/local/arm/2.95.3/arm-linux/bin:$PATH $ ./cvs_bootstrap \ --enable-ipv6 \ --disable-server \ --disable-mmx \ --disable-ismacryp \ --disable-aesicm \ --disable-ppc \ --prefix=/usr/local/arm/2.95.3/arm-linux \ --exec_prefix=/usr/local/arm/2.95.3/arm-linux \ --host=arm-linux \ --x-includes=/usr/local/arm/2.95.3/arm-linux/include/X11 \ --x-libraries=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/lib In lib/gnu/Makefile and player/src/codec/mpeg4/Makefile, remove the "-Werror" for example: $ cat lib/gnu/Makefile | sed -e "s/ -Werror//g" > temp && mv temp lib/gnu/Makefile otherwise you have (known) cast warnings like this one: /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/socket.h:264: warning: cast increases required alignment of target type". In more and more files you have some problems with undefined strcasestr, in that case declare at the beginning of those files: #include "lib/gnu/strcasestr.h" for example: $ echo "#include \"lib/gnu/strcasestr.h\"" > tmp && cat file.cpp >> tmp && mv tmp file.cpp Comment line 275 of player/src/video_sdl.cpp with the XMoveWindow, it does not work probably because of the older version of X development files that are available for the Zaurus. $ make Recompile mp4player (on necessary if you want video). This line was adapted from the original Make but I changed the flags to enable this SDL application to run without the "QPaintDevice: Must construct a QApplication before a QPaintDevice" error. I think this line is not correcting the problem, but it is not my priority and I wrote one time a similar line that worked. To understand the problem, look at the compilation line for the SDL example in my cross-compilation package. If you change the order of the terms, there are great chances it will not work anymore. $ arm-linux-g++ \ -DQWS \ -Dmain=SDL_main \ -D_REENTRANT \ -DNOCONTROLS \ -fexceptions \ -Wall \ -Werror \ -Wmissing-prototypes \ -Wno-char-subscripts \ -Woverloaded-virtual \ -Wno-unknown-pragmas \ -Wno-deprecated \ -Wformat=2 \ -DPLAYER_PLUGIN_DIR=\"/usr/local/arm/2.95.3/arm-linux/lib/mp4player_plugin\" \ -g \ -O2 \ -DMPEG4IP \ -o .libs/mp4player main.o \ -Wl,-rpath \ -Wl,/usr/local/arm/2.95.3/arm-linux/lib \ ../../lib/SDLAudio/src/.libs/libmpeg4ipSDL \ -lm ./.libs/libmp4player.a \ /home/fleiber/mpeg4ip/lib/sdp/.libs/libsdp.so \ /home/fleiber/mpeg4ip/player/lib/mp4util/.libs/libmp4util.so \ /home/fleiber/mpeg4ip/player/lib/libhttp/.libs/libhttp.so \ /home/fleiber/mpeg4ip/lib/msg_queue/.libs/libmsg_queue.so \ /home/fleiber/mpeg4ip/lib/mp4av/.libs/libmp4av.so \ /home/fleiber/mpeg4ip/lib/mp4/.libs/libmp4.so \ /home/fleiber/mpeg4ip/lib/mp4v2/.libs/libmp4v2.so \ ./.libs/libmp4syncsdl.a \ ./.libs/libmp4syncbase.a \ ./.libs/libmp4playerutils.a \ ../../lib/ismacryp/.libs/libismacryp.a \ -L/usr/local/arm/2.95.3/arm-linux/lib \ -lSDLmain \ /usr/local/arm/2.95.3/arm-linux/lib/libSDL.so \ -L/opt/Qtopia/sharp/lib \ -L/opt/QtEmbedded/sharp/lib/ \ -lSDL \ -lSDLmain \ -lqpe \ -lqte \ -lpthread \ -ldl \ -Wl,--rpath \ -Wl,/usr/local/arm/2.95.3/arm-linux/lib \ -Wl,--rpath \ -Wl,/usr/local/arm/2.95.3/arm-linux/lib Install application: $ su # export PATH=/usr/local/arm/2.95.3/bin:/usr/local/arm/2.95.3/arm-linux/bin:$PATH # make install This will install : in $prefix/include/ : mp4*, mpeg4*, mpeg4ip*, sdp*, codec_plugin.h, rtp_plugin.h in $prefix/bin/ : mp4dump, mp4extract, mp4info, mp4trackdump, mp4tags, mp4player, yuvdump, mpeg4vol, mpeg2video_parse, h264_parse, mpeg4ip-config in $prefix/lib/ : libmp4, libmp4v2, libmp4av, libmp4util, libmpeg4ipSDL-1.2.0, libh264av, libmsg_queue, libsdp, libhttp in $prefix/lib/mp4player_plugin/ : * where $prefix=/usr/local/arm/2.95.3/arm-linux Copy at least to your Zaurus: mp4player (/usr/bin/), the libraries (/usr/lib/) and the plugins ($prefix/lib/mp4player_plugin, you need to create this directory). Create links for the libraries if necessary (for example, if you copy xvid10_plugin.so.0.0.0, link it to xvid10_plugin.so.0). Now you're all set! It should even be working, but it is not for me (sound problems and some video files do not work). If anybody has any idea how I could solve this sound problem... -- Francois Leiber For support, see http://www.nautilus6.org/ml.php