Václav Haisman - 2012-08-12

This is the libtool invocation that is failing during the build:

/bin/bash ../libtool --tag=CXX --mode=link i686-w64-mingw32-g++ -no-suppress -save-temps -fverbose-asm -O2 -flto -flto-partition=none -fuse-linker-plugin -flto-report -Wall -Wextra -pedantic -Wstrict-aliasing -Wstrict-overflow -Woverloaded-virtual -Wold-style-cast -Wc++0x-compat -Wundef -Wshadow -Wformat -Wsuggest-attribute=noreturn -Wno-variadic-macros -fvisibility=hidden -no-undefined -version-info 3:0:0 -release 1.1 -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -o liblog4cplus.la -rpath /usr/local/lib appenderattachableimpl.lo appender.lo asyncappender.lo clogger.lo configurator.lo consoleappender.lo cygwin-win32.lo env.lo factory.lo fileappender.lo fileinfo.lo filter.lo global-init.lo hierarchy.lo hierarchylocker.lo layout.lo log4judpappender.lo lockfile.lo logger.lo loggerimpl.lo loggingevent.lo loggingmacros.lo loglevel.lo loglog.lo logloguser.lo mdc.lo ndc.lo nullappender.lo nteventlogappender.lo objectregistry.lo patternlayout.lo pointer.lo property.lo queue.lo rootlogger.lo sleep.lo snprintf.lo socketappender.lo socketbuffer.lo socket.lo socket-unix.lo socket-win32.lo stringhelper.lo stringhelper-clocale.lo stringhelper-cxxlocale.lo stringhelper-iconv.lo syncprims.lo syslogappender.lo threads.lo timehelper.lo tls.lo version.lo win32consoleappender.lo win32debugappender.lo -lws2_32 -ladvapi32 -lkernel32

Moving the syncprims.lo file argument to be the last .lo file on the command line fixes the problem for me. Why? Is this GCC/Mingw-W64 problem or my Autoconf/Libtool problem?