Error trying to configure with mingw

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
theonlylawislove
Posts: 34
Joined: Thu, 2014-07-17, 09:07

Error trying to configure with mingw

#1 Post by theonlylawislove »

Code: Select all

./configure --host=x86_64-w64-mingw32
Running configure for module config.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-w64-mingw32
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-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... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -E
checking for c++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking how to run the C++ preprocessor... c++ -E
checking for ranlib... ranlib
checking for ar... ar
checking for libtool... no
checking for strip... strip
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for long file names... yes
checking for inline... inline
checking for working const... yes
checking whether char is unsigned... no
checking whether right shift is unsigned... configure: error: in `/home/pknopf/git/dcmtk/config':
configure: error: cannot run test program while cross compiling
See `config.log' for more details
How do I remove the tests, since I can't use them when cross compiling?

J. Riesmeier
DCMTK Developer
Posts: 2496
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Error trying to configure with mingw

#2 Post by J. Riesmeier »

I'm no expert in cross-compiling the DCMTK but as far as I know you should also specified the --build system with your "./configure" call. See https://www.gnu.org/software/autoconf/m ... ation.html

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Error trying to configure with mingw

#3 Post by Jan Schlamelcher »

Just use CMake, I did some scripts (mostly for myself so I don't have to start a Windows VM all the time) to support cross compiling via MinGW, it automatically uses Wine for the tests. I made it available as this commit, but you should use at least this one for a stable experience (or at best simply use the latest snapshot). A known issue is that running the tests via Wine takes quite some time, since CMake attaches itself to the wineserver process and not the executable that is run (the wineserver process is an optimization of wine that is meant to increase the speed of loading Windows executables since the server keeps running for some seconds after the last executable was closed), therefore waiting for some seconds between launching each Wine process. This doesn't really matter for the configuration process, since there are only two executables run during that, but the unit tests are quite slow, you should disable the Wine server shutdown delay if you want to run them, I made the wineserver executable a shellscript on my system for that purpose:

Code: Select all

mv wineserver wineserver.bin

Code: Select all

#!/bin/sh
wineserver.bin -n 0 "$@"

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 1 guest