gap-packages / ZeroMQInterface

GAP Bindings to ZeroMQ
https://gap-packages.github.io/ZeroMQInterface
GNU General Public License v2.0
2 stars 5 forks source link

Building under Cygwin fails #23

Closed olexandr-konovalov closed 5 years ago

olexandr-konovalov commented 6 years ago

I've installed ZMQ under Cygwin (with ./configure; make; make install). Perviously package build failed at configure stage - now it continues with checking for ZMQ version >= 2.0.0... yes and then make fails with a warning linker path does not have real file for library -lzmq. and then an error cp: cannot stat ‘.libs/zeromqinterface.dll’: No such file or directory.

==== Checking ZeroMQInterface-0.10
Running './configure' '--with-gaproot=/cygdrive/c/gap-4.9.2' 'CFLAGS=-m32' 'LDFLAGS=-m32' 'LOPTS=-m32' 'CXXFLAGS=-m32' 
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 a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... 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 whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
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 whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking how to convert i686-pc-cygwin file names to i686-pc-cygwin format... func_convert_file_noop
checking how to convert i686-pc-cygwin file names to toolchain format... func_convert_file_noop
checking for /usr/i686-pc-cygwin/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_implib
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for as... as
checking for dlltool... (cached) dlltool
checking for objdump... (cached) objdump
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 (/usr/i686-pc-cygwin/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 a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
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... no
checking for CONFIGNAME... none
checking for GAP root directory... /cygdrive/c/gap-4.9.2
checking for GAP architecture... i686-pc-cygwin-default32
checking for GAP include files... /cygdrive/c/gap-4.9.2/src/compiled.h
checking for GAP config.h... /cygdrive/c/gap-4.9.2/bin/i686-pc-cygwin-default32/config.h
checking for GAP's gmp.h location... not found, GAP was compiled without GMP
checking zmq.h usability... yes
checking zmq.h presence... yes
checking for zmq.h... yes
checking for ZMQ version >= 2.0.0... yes
checking size of void **... 4
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/pkgconfig.h
config.status: executing depfiles commands
config.status: executing libtool commands
Running 'make' 
 cd . && /bin/sh /cygdrive/c/gap-4.9.2/pkg/ZeroMQInterface-0.10/cnf/missing automake-1.15 --foreign Makefile
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /cygdrive/c/gap-4.9.2/pkg/ZeroMQInterface-0.10/cnf/missing autoconf
/bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --with-gaproot=/cygdrive/c/gap-4.9.2 CFLAGS=-m32 LDFLAGS=-m32 LOPTS=-m32 CXXFLAGS=-m32 --no-create --no-recursion
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 a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... 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 whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
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 whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking how to convert i686-pc-cygwin file names to i686-pc-cygwin format... func_convert_file_noop
checking how to convert i686-pc-cygwin file names to toolchain format... func_convert_file_noop
checking for /usr/i686-pc-cygwin/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_implib
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for as... as
checking for dlltool... (cached) dlltool
checking for objdump... (cached) objdump
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 (/usr/i686-pc-cygwin/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 a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
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... no
checking for CONFIGNAME... none
checking for GAP root directory... /cygdrive/c/gap-4.9.2
checking for GAP architecture... i686-pc-cygwin-default32
checking for GAP include files... /cygdrive/c/gap-4.9.2/src/compiled.h
checking for GAP config.h... /cygdrive/c/gap-4.9.2/bin/i686-pc-cygwin-default32/config.h
checking for GAP's gmp.h location... not found, GAP was compiled without GMP
checking zmq.h usability... yes
checking zmq.h presence... yes
checking for zmq.h... yes
checking for ZMQ version >= 2.0.0... yes
checking size of void **... 4
checking that generated files are newer than configure... done
configure: creating ./config.status
 /bin/sh ./config.status
config.status: creating Makefile
config.status: creating src/pkgconfig.h
config.status: src/pkgconfig.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
  CC       src/zeromqinterface_la-zmqgap.lo
  CCLD     zeromqinterface.la

*** Warning: linker path does not have real file for library -lzmq.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libzmq but no candidates were found. (...for file magic test)

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module zeromqinterface.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
/usr/bin/mkdir -p ./bin/i686-pc-cygwin-default32
cp .libs/zeromqinterface.dll /cygdrive/c/gap-4.9.2/pkg/ZeroMQInterface-0.10/bin/i686-pc-cygwin-default32/zeromqinterface.so
cp: cannot stat ‘.libs/zeromqinterface.dll’: No such file or directory
Makefile:880: recipe for target 'all-local' failed
make: *** [all-local] Error 1

Maybe if someone will set up AppVeyor builds for this package, that will be useful...

olexandr-konovalov commented 5 years ago

On a new Cygwin machine, I have installed libzmq, and the package now builds. It was not portable and failed to load on a Cygwin-free machine. Here is what I did to find out missing dlls:

1) start cygwin 2) call cygcheck full/path/to/this/file/zeromqinterface.so 3) find which dlls from cygwin it reports 4) check that we copy them to the appropriate subdirectory of GAP's bin directory.

I have added two missing dlls in https://github.com/gap-system/gap-distribution/commit/664995ac3cc319fca54dbf47255dd0ccf9076d99 and it seems portable now.

I suggest to close it after GAP 4.10.1 release to make one more clean check.

olexandr-konovalov commented 5 years ago

The package is now loadable in GAP 4.10.1 for Windows.