generation on Win32 from sources
Brought to you by:
spetm,
thepurlieu
as on Win32 the build environment is non standard like is it on Linux, someone can list the "updated" required steps to successfully build it on both MinGW and/or Cygwin. I think to needed packages, default paths, and so on.
I tried both environment, keeping GTK+ 2.24.10 and Cairo 1.10.2 installed and working (with samples), but generation of gerbv git sources fail.
thank you
1) On Cygwin with:
GTK+ 2.24.20
Cairo 1.12.14
automake 1.14
autogen 5.9.7
autoconf 2.69
git 1.7.9
after autogen.sh, and ./configure --enable-unit-mm
running make I got:
$ make
make all-recursive
...
.libs/pick-and-place.o: In function
pick_and_place_get_float_unit': /cygdrive/d/Ambiente/Documenti/c/gerbv/src/pick-and-place.c:182: undefined reference to
screen'collect2: error: ld returned 1 exit status
Makefile:484: recipe for target
libgerbv.la' failed make[2]: *** [libgerbv.la] Error 1 make[2]: uscita dalla directory "/cygdrive/d/Ambiente/Documenti/c/gerbv/src" Makefile:407: recipe for target
all-recursive' failedmake[1]: [all-recursive] Error 1
make[1]: uscita dalla directory "/cygdrive/d/Ambiente/Documenti/c/gerbv"
Makefile:336: recipe for target `all' failed
make: [all] Error 2
2) On MinGw+Msys with:
GTK+-2.24.10
Cairo-1.10.2
automake 1.11.1
autogen 5.10.1
autoconf 2.68
running autogen I got this error:
$ ./autogen.sh
Checking autopoint version...
0.18.3
Running autopoint...
Checking libtoolize version...
2.4
Running libtoolize...
Checking aclocal version...
1.11.1
Running aclocal...
... done with aclocal.
Checking autoheader version...
2.68
Running autoheader...
... done with autoheader.
Checking automake version...
1.11.1
Running automake...
... done with automake.
Checking autoconf version...
2.68
Running autoconf...
configure.ac:170: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
Then ignoring and running configure:
$ ./configure --enable-unit-mm
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
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 dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
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 whether to enable maintainer-specific portions of Makefiles... no
checking whether NLS is requested... yes
checking for msgfmt... /mingw/bin/msgfmt
checking for gmsgfmt... /mingw/bin/msgfmt
checking for xgettext... /mingw/bin/xgettext
checking for msgmerge... /mingw/bin/msgmerge
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking whether we are using the GNU C Library 2 or newer... no
checking for ranlib... ranlib
checking for simple visibility declarations... yes
checking for inline... inline
checking for size_t... yes
checking for stdint.h... yes
checking for working alloca.h... no
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... no
checking whether integer division by zero raises SIGFPE... yes
checking for inttypes.h... yes
checking for unsigned long long int... yes
checking for inttypes.h... (cached) yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking for ld used by GCC... d:/programmi/mingw/mingw32/bin/ld.exe
checking if the linker (d:/programmi/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking whether imported symbols can be declared weak... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_kill in -lpthread... yes
checking for pthread_rwlock_t... yes
checking for multithread API to use... posix
checking argz.h usability... no
checking argz.h presence... no
checking for argz.h... no
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for getcwd... yes
checking for getegid... no
checking for geteuid... no
checking for getgid... no
checking for getuid... no
checking for mempcpy... no
checking for munmap... no
checking for stpcpy... no
checking for strcasecmp... no
checking for strdup... yes
checking for strtoul... yes
checking for tsearch... yes
checking for argz_count... no
checking for argz_stringify... no
checking for argz_next... no
checking for __fsetlocking... no
checking whether feof_unlocked is declared... no
checking whether fgets_unlocked is declared... no
checking for iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * inbuf, size_t inbytesleft, ch
ar * outbuf, size_t outbytesleft);
checking for NL_LOCALE_NAME macro... no
checking for bison... bison
checking version of bison... 2.4.2, ok
checking for long long int... yes
checking for long double... yes
checking for wchar_t... yes
checking for wint_t... yes
checking for intmax_t... yes
checking whether printf() supports POSIX/XSI format strings... no
checking whether we are using the GNU C Library 2.1 or newer... no
checking for stdint.h... (cached) yes
checking for SIZE_MAX... yes
checking for stdint.h... (cached) yes
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for ptrdiff_t... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for asprintf... no
checking for fwprintf... yes
checking for putenv... yes
checking for setenv... no
checking for setlocale... yes
checking for snprintf... yes
checking for wcslen... yes
checking whether _snprintf is declared... yes
checking whether _snwprintf is declared... yes
checking whether getc_unlocked is declared... no
checking for nl_langinfo and CODESET... no
checking for LC_MESSAGES... no
checking for CFPreferencesCopyAppValue... (cached) no
checking for CFLocaleCopyCurrent... (cached) no
checking whether included gettext is requested... no
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl
checking for po4a-gettextize... no
checking for po4a-translate... no
configure: WARNING: po4a was not found. If you want to change and compile intern
ationalized documentation, please install po4a
checking for nsgmls... no
configure: WARNING: nsgmls was not found. If you want to change and compile inte
rnationalized documentation, please install sp
checking for windows... yes
checking whether build environment is sane... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... d:/programmi/mingw/mingw32/bin/ld.exe
checking if the linker (d:/programmi/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw/bin/nm
checking the name lister (/mingw/bin/nm) interface... BSD nm
checking whether ln -s works... no, using cp -p
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-mingw32 file names to i686-pc-mingw32 format...
func_convert_file_msys_to_w32
checking how to convert i686-pc-mingw32 file names to toolchain format... func_c
onvert_file_msys_to_w32
checking for d:/programmi/mingw/mingw32/bin/ld.exe option to reload object files
... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|
^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_imp
lib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /mingw/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (d:/programmi/mingw/mingw32/bin/ld.exe) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for windres... windres
checking for animate... /d/Programmi/ImageMagick/animate
checking for compare... /d/Programmi/ImageMagick/compare
checking for composite... /d/Programmi/ImageMagick/composite
checking for convert... /d/Programmi/ImageMagick/convert
checking for display... /d/Programmi/ImageMagick/display
checking for montage... /d/Programmi/ImageMagick/montage
checking if all ImageMagick tools needed for the testsuite were found... yes
checking for pkg-config... /bin/pkg-config
checking for sin in -lm... yes
checking for dlopen in -ldl... no
./configure: line 17762: syntax error near unexpected token
CAIRO,' ./configure: line 17762:
PKG_CHECK_MODULES(CAIRO, cairo >= 1.2.0, , AC_MSG_ERROR(['
no Makefile is generated
Last edit: efa 2013-10-11
Note: I also tested the 'win32/build_gerbv' with both Cygwin and MinGw,
but those seems very old as on Cygwin it use the '-mno-cygwin' option no more supported, and on native MinGw fail for an unresolved .dll link that is false.
Here the errors:
On Cygwin 1.7.24 (32 bit):
running: $ win32/build_gerbv
...
gcc: error: unrecognized command line option '-mno-cygwin'
Makefile:586: recipe for target
amacro.lo' failed make[2]: *** [amacro.lo] Error 1 make[2]: uscita dalla directory "/cygdrive/d/Ambiente/Documenti/c/gerbv/src" Makefile:407: recipe for target
all-recursive' failedmake[1]: [all-recursive] Error 1
make[1]: uscita dalla directory "/cygdrive/d/Ambiente/Documenti/c/gerbv"
Makefile:336: recipe for target `all' failed
make: [all] Error 2
On MinGw+Msys 1.0.17 (32 bit):
running: $ win32/build_gerbv
...
checking whether the C compiler works... no
configure: error: in
/d/Ambiente/Documenti/c/gerbv': configure: error: C compiler cannot create executables See
config.log' for more details* ERROR * Configure failed. See log in c.log
Impossibile avviare l'applicazione specificata. libgmp-10.dll non è stato trovato.
Una nuova installazione dell'applicazione potrebbe risolvere il problema.
$ which libgmp-10.dll
/mingw/bin/libgmp-10.dll
any help please, a simple action to do list, or requisite list, thank you
a friend helped me, cross-compiling the git sources (on 20 jan) for Win32.
I attach here the new binary and new dependancies libraries.
The application work very well and include new feature like
https://sourceforge.net/p/gerbv/feature-requests/57/