jaeandersson / swig

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.
http://www.swig.org
Other
23 stars 19 forks source link

Build on MinGW and CygWin #80

Open giumas opened 7 years ago

giumas commented 7 years ago

I have an issue in building SWIG with MinGW:

$ ./autogen.sh
+ test -d Tools/config
+ aclocal -I Tools/config
+ autoheader
+ automake --add-missing --copy --force-missing
Useless use of /d modifier in transliteration operator at /usr/share/automake-1.8/Automake/Wrap.pm line 60.
+ autoconf
+ cd CCache
+ autoreconf
$ ./configure
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... none
checking dependency style of gcc... none
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking whether gcc and cc understand -c and -o together... yes
checking maximum warning verbosity option... -Wall -W -ansi -pedantic for C++ -Wall -W -ansi -pedantic for C
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for popen... yes
checking whether to enable PCRE support... yes
checking whether to use local PCRE... no
checking for a sed that does not truncate output... /usr/bin/sed
checking for pcre-config... /usr/bin/pcre-config
checking whether to enable ccache-swig... yes

Checking packages required for SWIG developers.
Note : None of the following packages are required for users to compile and install SWIG from the distributed tarball

checking for bison... bison -y

Checking for installed target languages and other information in order to compile and run
the examples and test-suite invoked by 'make check'.
Note : None of the following packages are required for users to compile and install SWIG from the distributed tarball

./configure: line 5795: syntax error near unexpected token `fi'
./configure: line 5795: `fi'
$ automake --version
automake (GNU automake) 1.8.5
$ autoconf --version
autoconf (GNU Autoconf) 2.59
$ sh -n configure && echo OK
configure: line 5795: syntax error near unexpected token `fi'
configure: line 5795: `fi'

It is similar to this: https://github.com/swig/swig/issues/815

Have you experienced something similar on Windows? Which automake & autoconf are you using?

jaeandersson commented 7 years ago

For our project, we cross compile for Windows.

giumas commented 7 years ago

I see. Can you give me more info? Which OS? Which compiler?

jaeandersson commented 7 years ago

I see. Can you give me more info? Which OS? Which compiler?

@jgillis, can you help?

jgillis commented 7 years ago

We dont crosscompile swig itself. We crosscompile our siftware using a native linux compiled mingw

giumas commented 7 years ago

@jgillis does it mean that you only compile the matlab-branch of swig on Linux? @jaeandersson what is the swig version that this branch is based on? and did you modify the configure for it?

jgillis commented 7 years ago

Correct. Perhaps its perfectly simple to do it, but we have no experience with it.

giumas commented 7 years ago

Sadly, it does not seem to be deadly simple.. as I posted at the beginning of this ticket. And I cannot ask for help on the building on the official swig repo since this is an unsupported branch!

jgillis commented 7 years ago

Ah but this has nothing to do with the branch I would think. It's just the swig build system playing tricks. You should rephrase the question, possibly after verifying that you get indeed the same issue with the swig main branch.