[hatari-devel] CMake build system

George Nakos ggn at hol.gr
Sun Jan 17 17:59:33 CET 2010


Hello Thomas,

Sunday, January 17, 2010, 4:14:29 PM, you wrote:

>>> Dunno really. Something has to be in my PATH? Ideas?

>> Maybe try to quote the name of the generator like this:

>> cmake -G "MSYS Makefiles"

>> Without the quotes, the shell might pass two string parameters
>> instead of one string, causing cmake not to recognize the generator name.

> Retarded as it sounds, the above worked.

> However,  I'm  now  stuck  trying  to  get it to find some libs. I ran
> cmake-gui as it's a bit easier giving it the paths that way.

> So far it asked me for:

> - sdl (I provided the paths/files needed)
> - zlib (idem)
> - libpng (don't have it installed)
> - readline
> - portaudio

> At  this point I'd like to say that hatari builds fine with my current
> setup  (well,  hmsa stubbornly refuses to build, but that's been going
> on  for  a  couple of years now - something to do with the location of
> zlib?  I  never  investigated further). I suppose I can install libpng
> and satisfy the dependencies.

> But what's the deal with portaudio? I was never required to have it on
> my machine? Maybe it's something that's needing to be left out in this
> build? And I seem to remember some workarounds for readline as well.

Small  update  here:  I  installed  libpng,  and I found that readline
exists  for mingw, so I installed that too. Finally portaudio suggests
that  it  can  be  compiled  for  windows,  so  I  tried  that  and it
successfully built (configure/make/make install).

However CMake failed while parsing the following lines:

check_function_exists(cfmakeraw HAVE_CFMAKERAW)
check_function_exists(setenv HAVE_SETENV)
check_function_exists(select HAVE_SELECT)

The error message CMake gave me was:

Unknown CMake command "check_function_exists".

In the end I commented out the lines (as it was mentioned that they're
optional), and cmake finally produced the makefiles.

After  that  I typed make and the project built. However, while trying
to link the binary in the end, it failed miserably. Most of the errors
seem portaudio related. (while configuring portaudio it mentioned that
there won't be C++ bindings. I suppose this is the problem?)

An excerpt from the console:

CMakeFiles/hatari.dir/file.c.obj:file.c:(.text+0x2b4): undefined reference to `select at 20'
c:/msys/1.0/local/lib/libportaudio.a(pa_win_util.o): In function `PaUtil_GetTime':
C:\msys\1.0\home\Administrator\portaudio/src/os/win/pa_win_util.c:146: undefined reference to `timeGetTime at 0'
c:/msys/1.0/local/lib/libportaudio.a(pa_win_wmme.o): In function `QueryInputWaveFormatEx':
C:\msys\1.0\home\Administrator\portaudio/src/hostapi/wmme/pa_win_wmme.c:528: undefined reference to `waveInOpen at 24'
C:\msys\1.0\home\Administrator\portaudio/src/hostapi/wmme/pa_win_wmme.c:544: undefined reference to `waveInGetErrorTextA at 12'
...
[snip]


P.S.  I  wanted  to  give portaudio a shot to see if it could cure the
awful 1-sec delay the audio has in relation to the video.

-- 
Best regards,
 George                            mailto:ggn at hol.gr




More information about the hatari-devel mailing list