[Jack-Devel] cross-compilation from linux to windows using the mingw-w64 toolchain
Hi.
I am attempting to build jack-1.9.8 for windows using the mingw-w64 toolchain on a linux (Ubuntu) desktop.
Does anyone have information as to how to configure waf for this to work?
So far, I have tried the following script.
#!/bin/bash
export DEST_PLATFORM=win32;
export CC=i686-w64-mingw32-gcc;
export CFLAGS=-I/home/martin/Build/include;
export CPP=i686-w64-mingw32-gcc;
export CXX=i686-w64-mingw32-g++;
export AR=i686-w64-mingw32-ar;
export NM=i686-w64-mingw32-nm;
export RANLIB=i686-w64-mingw32-ranlib;
export STRIP=i686-w64-mingw32-strip;
waf configure
However, this fails because waf tries to compile linux-specific code.
I get the following error:
../linux/JackLinuxTime.c:30:22: fatal error: sys/mman.h: No such file or directory
Also, I get the following errors from shm.c:
../common/shm.c:109:1: warning: (near initialization for ‘registry_info.size’ [enabled by default]
../common/shm.c: In function ‘jack_access_registry’:
../common/shm.c:718:2: warning: implicit declaration of function ‘shm_open’ [-Wimplicit-function-declaration]
../common/shm.c:718:39: error: ‘O_RDWR’ undeclared (first use in this function)
../common/shm.c:718:39: note: each undeclared identifier is reported only once for each function it appears in
../common/shm.c:724:3: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
../common/shm.c:728:2: warning: implicit declaration of function ‘mmap’ [-Wimplicit-function-declaration]
../common/shm.c:729:10: error: ‘PROT_READ’ undeclared (first use in this function)
../common/shm.c:729:20: error: ‘PROT_WRITE’ undeclared (first use in this function)
../common/shm.c:730:10: error: ‘MAP_SHARED’ undeclared (first use in this function)
../common/shm.c:730:37: error: ‘MAP_FAILED’ undeclared (first use in this function)
../common/shm.c: In function ‘jack_create_registry’:
../common/shm.c:761:39: error: ‘O_RDWR’ undeclared (first use in this function)
../common/shm.c:761:46: error: ‘O_CREAT’ undeclared (first use in this function)
../common/shm.c:769:5: warning: implicit declaration of function ‘fchmod’ [-Wimplicit-function-declaration]
../common/shm.c:769:24: error: ‘S_IRUSR’ undeclared (first use in this function)
../common/shm.c:769:34: error: ‘S_IWUSR’ undeclared (first use in this function)
../common/shm.c:769:44: error: ‘S_IRGRP’ undeclared (first use in this function)
../common/shm.c:769:54: error: ‘S_IWGRP’ undeclared (first use in this function)
../common/shm.c:769:64: error: ‘S_IROTH’ undeclared (first use in this function)
../common/shm.c:769:74: error: ‘S_IWOTH’ undeclared (first use in this function)
../common/shm.c:776:2: warning: implicit declaration of function ‘ftruncate’ [-Wimplicit-function-declaration]
../common/shm.c:785:10: error: ‘PROT_READ’ undeclared (first use in this function)
../common/shm.c:785:20: error: ‘PROT_WRITE’ undeclared (first use in this function)
../common/shm.c:786:10: error: ‘MAP_SHARED’ undeclared (first use in this function)
../common/shm.c:786:37: error: ‘MAP_FAILED’ undeclared (first use in this functio0n)
../common/shm.c: In function ‘jack_remove_shm’:
../common/shm.c:809:2: warning: implicit declaration of function ‘shm_unlink’ [-Wimplicit-function-declaration]
../common/shm.c: In function ‘jack_release_shm’:
../common/shm.c:816:29: error: ‘MAP_FAILED’ undeclared (first use in this function)
../common/shm.c:817:3: warning: implicit declaration of function ‘munmap’ [-Wimplicit-function-declaration]
../common/shm.c: In function ‘jack_release_lib_shm’:
../common/shm.c:825:29: error: ‘MAP_FAILED’ undeclared (first use in this function)
../common/shm.c: In function ‘jack_shmalloc’:
../common/shm.c:864:32: error: ‘O_RDWR’ undeclared (first use in this function)
../common/shm.c:864:39: error: ‘O_CREAT’ undeclared (first use in this function)
../common/shm.c:883:24: error: ‘MAP_FAILED’ undeclared (first use in this function)
../common/shm.c: In function ‘jack_attach_shm’:
../common/shm.c:898:5: error: ‘O_RDWR’ undeclared (first use in this function)
../common/shm.c:904:54: error: ‘PROT_READ’ undeclared (first use in this function)
../common/shm.c:904:64: error: ‘PROT_WRITE’ undeclared (first use in this function)
../common/shm.c:905:10: error: ‘MAP_SHARED’ undeclared (first use in this function)
../common/shm.c:905:37: error: ‘MAP_FAILED’ undeclared (first use in this function)
../common/shm.c: In function ‘jack_attach_shm_read’:
../common/shm.c:924:5: error: ‘O_RDONLY’ undeclared (first use in this function)
../common/shm.c:930:54: error: ‘PROT_READ’ undeclared (first use in this function)
../common/shm.c:931:10: error: ‘MAP_SHARED’ undeclared (first use in this function)
../common/shm.c:931:37: error: ‘MAP_FAILED’ undeclared (first use in this function)
I guess these are due to missing or platform-dependent include files.
Any assistance appreciated.
Regards, Martin Kohn
1326999446.23382_0.ltw:2,a <13826157.fi5ATup6Oo at pc002>