From: Magnus Jacobsson Date: Mon, 13 Sep 2021 15:11:21 +0000 (+0200) Subject: gvc: autotools: work around cygwin linking problem with .def file X-Git-Tag: 2.49.2~32^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f58b8b4a90813c47c0d3f3f0ee20ec35434f117;p=graphviz gvc: autotools: work around cygwin linking problem with .def file This workaround is just a temporary measure until an upcoming commit series towards https://gitlab.com/graphviz/graphviz/-/issues/2058 will remove the .def file. Fixes this error with Cygwin when running 'dot -c' during installation. C:/Users/magja/graphviz/build/bin/dot.exe: error while loading shared libraries: gvc.dll: cannot open shared object file: No such file or directory Before this commit, the following results were obtained: ldd build/bin/dot.exe => ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffca85c0000) KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffca69d0000) KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ffca6170000) cygcgraph-6.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygcgraph-6.dll (0x487030000) cygcdt-5.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygcdt-5.dll (0x552550000) cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000) gvc.dll => not found objdump -s lib/gvc/.libs/libgvc.dll.a | grep -i dll => In archive lib/gvc/.libs/libgvc.dll.a: 0000 6776632e 646c6c00 gvc.dll. After this commit, the following results are obtained: ldd build/bin/dot.exe => ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffca85c0000) KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffca69d0000) KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ffca6170000) cyggvc-6.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cyggvc-6.dll (0x5941e0000) cygcgraph-6.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygcgraph-6.dll (0x487030000) cygcdt-5.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygcdt-5.dll (0x552550000) cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000) cygwin1.dll => /usr/bin/cygwin1.dll (0xe60000) cygpathplan-4.dll => /cygdrive/c/Users/magja/graphviz/build/bin/cygpathplan-4.dll (0x461410000) cygz.dll => /usr/bin/cygz.dll (0x3ff080000) cygexpat-1.dll => /usr/bin/cygexpat-1.dll (0x3fe370000) cygltdl-7.dll => /usr/bin/cygltdl-7.dll (0x3feba0000) objdump -s lib/gvc/.libs/libgvc.dll.a | grep -i dll => In archive lib/gvc/.libs/libgvc.dll.a: 0000 63796767 76632d36 2e646c6c 00000000 cyggvc-6.dll.... --- diff --git a/lib/gvc/Makefile.am b/lib/gvc/Makefile.am index 7d2f2fd7f..71f7baa69 100644 --- a/lib/gvc/Makefile.am +++ b/lib/gvc/Makefile.am @@ -75,8 +75,15 @@ libgvc_la_LIBADD = $(libgvc_C_la_LIBADD) \ libgvc_la_DEPENDENCIES = $(libgvc_C_la_DEPENDENCIES) if WITH_WIN32 +if WITH_CYGWIN +cyggvc-6.def: $(top_srcdir)/lib/gvc/gvc.def + sed '/^LIBRARY/s/gvc/cyggvc-6/' $< > $@ +BUILT_SOURCES = cyggvc-6.def +libgvc_la_LDFLAGS += -export-symbols cyggvc-6.def +else libgvc_la_LDFLAGS += -export-symbols $(top_srcdir)/lib/gvc/gvc.def endif +endif if ENABLE_MAN_PDFS if HAVE_PS2PDF