Cross compilation of ja2 on Ubuntu 14.04

Issue #147 resolved
ooxi created an issue

I wanted to help debugging issue #146 and tried cross compiling ja2 on Ubuntu 14.04 using the compilation instructions. I ran into a couple of difficulties which resulted in the following pull requests

Now everything compiles fine but the linker tells me

/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/bin/ld: cannot find -lpthread

I don't know which package is neccessary to fix this :(

Comments (3)

  1. Gennady Trafimenkov repo owner

    Instructions are not corrent. It should be:

      Ubuntu 12.04 i386:
        $ sudo apt-get install gcc-mingw32
        $ make clean
        $ make USE_MINGW=1 MINGW_PREFIX=i586-mingw32msvc LOCAL_SDL_LIB=_build/lib-SDL-devel-1.2.15-mingw32 WITH_LPTHREAD=0
    
      Ubuntu 12.04 x64:
        $ sudo apt-get install gcc-mingw-w64 g++-mingw-w64
        $ make clean
        $ make USE_MINGW=1 MINGW_PREFIX=i686-w64-mingw32 LOCAL_SDL_LIB=_build/lib-SDL-devel-1.2.15-mingw32 WITH_LPTHREAD=0
    

    For Ubuntu 14.04 x64 instructions are the same as for 12.04 x64. I haven't checked 32bit system, but probably the same as for 12.04 also.

    Thank you for discovering this issue and trying to fix it.

  2. ooxi reporter

    Thank's for the fast reaction, it seams that I was a bit over ambitoned with my pull requests.

    Could we create some integration tests, perhaps using Travis CI, in order to catch such issues? Looking at the issue historie there are quite a lot requests having the same problem :)

  3. Log in to comment