Skip to content

Use gvc.def for exported symbols with MinGW build

John Ellson requested to merge gh-10072823/46/tkelman/patch-3 into master

Created by: tkelman

A few of the libtool symbols needed to be removed (deprecated, apparently) otherwise I would get

Cannot export lt_dlcaller_register: symbol not defined
Cannot export lt_dlforeach: symbol not defined
Cannot export lt_dlhandle_next: symbol not defined
Cannot export lt_dlloader_data: symbol not defined
Cannot export lt_dlloader_name: symbol not defined
Cannot export lt_dlmutex_register: symbol not defined
collect2: error: ld returned 1 exit status
make[3]: *** [libgvc.la] Error 1

And I needed to add orthoEdges to the list otherwise I would get

../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o):dotsplines.c:(.text+0x8c5): undefined reference to `orthoEdges'
../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o):dotsplines.c:(.text+0x8db): undefined reference to `orthoEdges'
/usr/bin/x86_64-w64-mingw32-ld: ../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o): bad reloc address 0x0 in section `.data'
collect2: error: ld returned 1 exit status
make[3]: *** [libgvplugin_dot_layout.la] Error 1

For reference, I'm currently configuring as ../configure --host=x86_64-w64-mingw32 CFLAGS="-DPATHPLAN_EXPORTS -D_DLL -DGVC_EXPORTS -DVMALLOC_EXPORTS" --without-gtk in a cross-compile from Ubuntu 14.04 (Cygwin-to-MinGW-cross or MSYS should work similarly) and getting through all of lib, currently hitting

../../../cmd/dot/dot.c: In function ‘main’:
../../../cmd/dot/dot.c:158:28: error: ‘lt_preloaded_symbols’ undeclared (first use in this function)
     Gvc = gvContextPlugins(lt_preloaded_symbols, DEMAND_LOADING);
                            ^
../../../cmd/dot/dot.c:158:28: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [dot-dot.o] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f .deps/dot_builtins-dot_builtins.Tpo .deps/dot_builtins-dot_builtins.Po
mv -f .deps/dot-no_builtins.Tpo .deps/dot-no_builtins.Po
../../../cmd/dot/dot.c: In function ‘main’:
../../../cmd/dot/dot.c:158:28: error: ‘lt_preloaded_symbols’ undeclared (first use in this function)
     Gvc = gvContextPlugins(lt_preloaded_symbols, DEMAND_LOADING);
                            ^
../../../cmd/dot/dot.c:158:28: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [dot_builtins-dot.o] Error 1

Will see if I can resolve that one.

Merge request reports