Compilation error on windows 8.1 with MinGW64

Issue #25 new
Steven NA
created an issue

I was trying to install libyaml 0.1.7 on windows 8.1 using MinGW64. The configure step was fine. However, there was an error when building the test. I am using gcc 5.2. Could you give me some hints on what could have gone wrong? Here are the steps I took.

./configure --prefix=D:/install/libyaml

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 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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... no, using cp -pR
checking whether make sets $(MAKE)... (cached) yes
checking build system type... x86_64-pc-mingw64
checking host system type... x86_64-pc-mingw64
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... D:/install/HaskellPlatform/8.0.1/mingw/bin/ld.exe
checking if the linker (D:/install/HaskellPlatform/8.0.1/mingw/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /d/install/HaskellPlatform/8.0.1/mingw/bin/nm -B
checking the name lister (/d/install/HaskellPlatform/8.0.1/mingw/bin/nm -B) interface... BSD nm
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 x86_64-pc-mingw64 file names to x86_64-pc-mingw64 format... func_convert_file_msys_to_w32
checking how to convert x86_64-pc-mingw64 file names to toolchain format... func_convert_file_msys_to_w32
checking for D:/install/HaskellPlatform/8.0.1/mingw/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 ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /d/install/HaskellPlatform/8.0.1/mingw/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
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... 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:/install/HaskellPlatform/8.0.1/mingw/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 doxygen... true
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating yaml-0.1.pc
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating tests/Makefile
config.status: creating win32/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

make

D:/install/MinGW64/bin/make  all-recursive
make[1]: Entering directory 'G:/DEVELOP/yaml/yaml-0.1.7'
Making all in include
make[2]: Entering directory 'G:/DEVELOP/yaml/yaml-0.1.7/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory 'G:/DEVELOP/yaml/yaml-0.1.7/include'
Making all in src
make[2]: Entering directory 'G:/DEVELOP/yaml/yaml-0.1.7/src'
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT api.lo -MD -MP -MF .deps/api.Tpo -c -o api.lo api.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT api.lo -MD -MP -MF .deps/api.Tpo -c api.c  -DDLL_EXPORT -DPIC -o .libs/api.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT api.lo -MD -MP -MF .deps/api.Tpo -c api.c -o api.o >/dev/null 2>&1
mv -f .deps/api.Tpo .deps/api.Plo
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT reader.lo -MD -MP -MF .deps/reader.Tpo -c -o reader.lo reader.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT reader.lo -MD -MP -MF .deps/reader.Tpo -c reader.c  -DDLL_EXPORT -DPIC -o .libs/reader.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT reader.lo -MD -MP -MF .deps/reader.Tpo -c reader.c -o reader.o >/dev/null 2>&1
mv -f .deps/reader.Tpo .deps/reader.Plo
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scanner.lo -MD -MP -MF .deps/scanner.Tpo -c -o scanner.lo scanner.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT scanner.lo -MD -MP -MF .deps/scanner.Tpo -c scanner.c  -DDLL_EXPORT -DPIC -o .libs/scanner.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT scanner.lo -MD -MP -MF .deps/scanner.Tpo -c scanner.c -o scanner.o >/dev/null 2>&1
mv -f .deps/scanner.Tpo .deps/scanner.Plo
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c -o parser.lo parser.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.c  -DDLL_EXPORT -DPIC -o .libs/parser.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.c -o parser.o >/dev/null 2>&1
mv -f .deps/parser.Tpo .deps/parser.Plo
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT loader.lo -MD -MP -MF .deps/loader.Tpo -c -o loader.lo loader.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT loader.lo -MD -MP -MF .deps/loader.Tpo -c loader.c  -DDLL_EXPORT -DPIC -o .libs/loader.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT loader.lo -MD -MP -MF .deps/loader.Tpo -c loader.c -o loader.o >/dev/null 2>&1
mv -f .deps/loader.Tpo .deps/loader.Plo
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT writer.lo -MD -MP -MF .deps/writer.Tpo -c -o writer.lo writer.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT writer.lo -MD -MP -MF .deps/writer.Tpo -c writer.c  -DDLL_EXPORT -DPIC -o .libs/writer.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT writer.lo -MD -MP -MF .deps/writer.Tpo -c writer.c -o writer.o >/dev/null 2>&1
mv -f .deps/writer.Tpo .deps/writer.Plo
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT emitter.lo -MD -MP -MF .deps/emitter.Tpo -c -o emitter.lo emitter.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT emitter.lo -MD -MP -MF .deps/emitter.Tpo -c emitter.c  -DDLL_EXPORT -DPIC -o .libs/emitter.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT emitter.lo -MD -MP -MF .deps/emitter.Tpo -c emitter.c -o emitter.o >/dev/null 2>&1
mv -f .deps/emitter.Tpo .deps/emitter.Plo
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT dumper.lo -MD -MP -MF .deps/dumper.Tpo -c -o dumper.lo dumper.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT dumper.lo -MD -MP -MF .deps/dumper.Tpo -c dumper.c  -DDLL_EXPORT -DPIC -o .libs/dumper.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT dumper.lo -MD -MP -MF .deps/dumper.Tpo -c dumper.c -o dumper.o >/dev/null 2>&1
mv -f .deps/dumper.Tpo .deps/dumper.Plo
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=link gcc  -g -O2 -release 0 -version-info 2:5:0  -o libyaml.la -rpath D:/install/libyaml/0.1.7/lib api.lo reader.lo scanner.lo parser.lo loader.lo writer.lo emitter.lo dumper.lo
libtool: link: warning: undefined symbols not allowed in x86_64-pc-mingw64 shared libraries
libtool: link: ar cru .libs/libyaml.a  api.o reader.o scanner.o parser.o loader.o writer.o emitter.o dumper.o libtool: link: ranlib .libs/libyaml.a
libtool: link: ( cd ".libs" && rm -f "libyaml.la" && cp -pR "../libyaml.la" "libyaml.la" )
make[2]: Leaving directory 'G:/DEVELOP/yaml/yaml-0.1.7/src'
Making all in .
make[2]: Entering directory 'G:/DEVELOP/yaml/yaml-0.1.7'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory 'G:/DEVELOP/yaml/yaml-0.1.7'
Making all in tests
make[2]: Entering directory 'G:/DEVELOP/yaml/yaml-0.1.7/tests'
gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT run-scanner.o -MD -MP -MF .deps/run-scanner.Tpo -c -o run-scanner.o run-scanner.c
mv -f .deps/run-scanner.Tpo .deps/run-scanner.Po
D:/install/Git/2.11.0/usr/bin/sh.exe ../libtool  --tag=CC   --mode=link gcc  -g -O2   -o run-scanner.exe run-scanner.o ../src/libyaml.la
libtool: link: gcc -g -O2 -o .libs/run-scanner.exe run-scanner.o  ../src/.libs/libyaml.a
run-scanner.o: In function `main':
G:\DEVELOP\yaml\yaml-0.1.7\tests/run-scanner.c:16: undefined reference to `__imp_yaml_parser_scan'
G:\DEVELOP\yaml\yaml-0.1.7\tests/run-scanner.c:49: undefined reference to `__imp_yaml_token_delete'
G:\DEVELOP\yaml\yaml-0.1.7\tests/run-scanner.c:36: undefined reference to `__imp_yaml_parser_initialize'
G:\DEVELOP\yaml\yaml-0.1.7\tests/run-scanner.c:38: undefined reference to `__imp_yaml_parser_set_input_file'
G:\DEVELOP\yaml\yaml-0.1.7\tests/run-scanner.c:54: undefined reference to `__imp_yaml_parser_delete'
G:\DEVELOP\yaml\yaml-0.1.7\tests/run-scanner.c:54: undefined reference to `__imp_yaml_parser_delete'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:630: run-scanner.exe] Error 1
make[2]: Leaving directory 'G:/DEVELOP/yaml/yaml-0.1.7/tests'
make[1]: *** [Makefile:445: all-recursive] Error 1
make[1]: Leaving directory 'G:/DEVELOP/yaml/yaml-0.1.7'
make: *** [Makefile:353: all] Error 2

Comments (0)

  1. Log in to comment