From: Danny B. <dan...@sc...> - 2007-03-28 20:05:31
|
I forgot to mention that I also copied the config.sub file from one of the cegcc source directories into the xvid directory structure. Without it, configure will complain about now knowing about arm-wince-cegcc . Danny On Wed, 2007-03-28 at 21:32 +0200, Danny Backx wrote: > Hi, >=20 > I've taken the 1.1.2 release off the xvid site. >=20 > On Wed, 2007-03-28 at 12:15 +0800, Hudson Hsueh wrote: > > I want to cross-compile Xvid codec(http://www.xvid.org/)(from svn) > > with cegcc(compiled from svn) for my WM 5.0 device, > > I tried for several days and now I was stuck on some problem. > >=20 > > Following is My configure command, > >=20 > > ./configure CC=3D/opt/cegcc/bin/arm-wince-cegcc-gcc --host=3Darm >=20 > I don't think that'll do what you want. Try this : > % setenv CC arm-wince-cegcc-gcc > % ./configure --host=3Di586-gnu-linux --target=3Darm-wince-cegcc >=20 > You'll note that platform.inc then contains the right CC=3D line, I mean > it'll say the compiler is arm-wince-cegcc-gcc. It doesn't mention the > right ranlib though. Similarly the Makefile uses $(AS), so I tried again > but also specified > % setenv RANLIB arm-wince-cegcc-ranlib > % setenv AS arm-wince-cegcc-as >=20 > and then >=20 > % ./configure --host=3Di586-gnu-linux --target=3Darm-wince-cegcc > % make >=20 > Running this compiles some of the sources, then fails with : >=20 > L: libxvidcore.so > Info: resolving _CRT_MT by linking to __imp__CRT_MT (auto-import) > /opt/cegcc/lib/gcc/arm-wince-cegcc/4.1.0/../../../../arm-wince-cegcc/lib/= libcegcc.dll.a(main.o):main.c:(.text+0x28): undefined reference to `WinMain= ' > collect2: ld returned 1 exit status > gmake: *** [libxvidcore.so] Error 1 >=20 > This is the error you were getting too. >=20 > The reason is that the xvid configure script tries to figure out what > your build environment is, and adds some platform specific stuff in e.g. > SPECIFIC_LDFLAGS. Look at line 267 and further in configure.in. >=20 > I've added a couple of lines saying : > cegcc*) > AC_MSG_RESULT([ok]) > STATIC_LIB=3D"libxvidcore.\$(STATIC_EXTENSION)" > SHARED_LIB=3D"libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\ > $(API_MINOR)" > SPECIFIC_LDFLAGS=3D"-shared -lc -lm" > SPECIFIC_CFLAGS=3D"" > ;; >=20 > and then ran > % autoreconf > % ./configure --host=3Di586-gnu-linux --target=3Darm-wince-cegcc > % make >=20 > This ended with : > L: libxvidcore.a > L: libxvidcore.so.4.1 >=20 > --------------------------------------------------------------- > XviD has been successfully built. >=20 > * Binaries are currently located in the '=3Dbuild' directory > * To install them on your system, you can run '# make install' > as root. > --------------------------------------------------------------- >=20 > I assume I've answered the "howto" question, but have I also given you > enough info to understand the problem and the solution ? >=20 > Cheers, >=20 > Danny >=20 > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share y= our > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ Cegcc-devel mailing list = Ceg...@li... https://lists.sourceforge.net/lists/listi= nfo/cegcc-devel --=20 Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info |