User:Zippy1981/Projects/Compiling lame with watcom
From Open Watcom
I am trying to compile lame in Open Watcom. This is a log of my progress. It will eventually turn into documentation in integrating watcom with MSYS and using the watcom nmake clone.
Contents |
Why Lame
Lame is an actively maintained open source project with a large windows user base. It has build scripts for the MinGW and Visual Studio tool chains. I also recently built a lame rpm from the source tarball on linux recently.
nmake vs owcc
There are two options for building lame on windows. nmake, the microsft make tool, and MSYS. Watcom has a way of emulating both of these methods.
On the microsoft side of things, watcom has wrappers for the microsoft build chain. nmake.exe parses Microsoft's make files. Cl.exe parses the Microsft CL.exe command lines arguments and executes the appropiate members of the watcom toolchain.
On the POSIX side of things is owcc. This is a wrapper that takes the posix standard cc arguments and executes wcc with equivilant arguments. You can fit it into the GNU toochain by executing CC=owcc ./configure.
Both procedures are buggy and require some work. Notes on dealing with both are below.
nmake
Build errors
The error I get is :
Error(F38): (libmp3lame\bitstream.obj) does not exist and cannot be made from ex isting files Error(E02): Make execution terminated
Makefile.MSVC
The contents of /Makefile.MSVC
Using Microsft's nmake
I attempted to use Microsoft nmake in a cmd envirorment setup with the Watcom toolchain. The results were more promising, and cleary indicating watcoms cl.exe needs more work. Results are here
owcc
First of all setup the MSYS envirorment without gcc. Run a MSYS terminal. If watcom is in your path you shouldbe able to run owcc. This is a wrapper that takes POSIX cc arguments and turns them into wcc commnads.
./configure
The syntax I use is as follows:
CC=owcc LD=lib CL=cl ./configure
libtool
configure will generate a libtool script. This will need to be edited by hand at the moment.
Change the line:
fix_srcfile_path="`cygpath -w "$srcfile"`"
to read:
#fix_srcfile_path="`cygpath -w "$srcfile"`" fix_srcfile_path=""
make
Make will fail because libtool won't be able to find the winsock library as shown below.
/bin/sh ../libtool --tag=CC --mode=link owcc -o libmp3lame.la -rpath /usr/local/lib -version-info 0:0 -no-undefined VbrTag.lo bitstream.lo encoder.lo fft.lo gain_analysis.lo id3tag.lo lame.lo newmdct.lo presets.lo psymodel.lo quantize.lo quantize_pvt.lo reservoir.lo set_get.lo tables.lo takehiro.lo util.lo vbrquantize.lo version.lo mpglib_interface.lo ../mpglib/libmpgdecoder.la -lwsock32 *** Warning: linker path does not have real file for library -lwsock32. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libwsock32 but no candidates were found. (...for file magic test) *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. *** Since this library must not contain undefined symbols, *** because either the platform does not support them or *** it was explicitly requested with -no-undefined, *** libtool will only create a static version of it. rm -fr .libs/libmp3lame.lax mkdir .libs/libmp3lame.lax rm -fr .libs/libmp3lame.lax/libmpgdecoder.lib mkdir .libs/libmp3lame.lax/libmpgdecoder.lib (cd .libs/libmp3lame.lax/libmpgdecoder.lib && false x /c/src/lame-3.97/libmp3lame/../mpglib/.libs/libmpgdecoder.lib) make[3]: *** [libmp3lame.la] Error 1 make[3]: Leaving directory `/c/src/lame-3.97/libmp3lame' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/c/src/lame-3.97/libmp3lame' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/c/src/lame-3.97' make: *** [all] Error 2 EddingtonAndAssoc@130-LIBERTY /c/src/lame-3.97 $

