Build gets stuck during configure in Windows


I am currently experiencing issues with building using autotools on windows (with msys2 and having followed the guide here: ).
What happens right now is that the build gets stuck during while running “./configure” on the library it is trying to build (seemingly no logs are produced). It consistently happens at the same checking stage in the configure execution script.

Is there any way I can debug or investigate on the root cause for this?

Here’s what it looks like for a good build (Debug Coverage, AMD64):

checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil

It looks the manifest tool is checked with:

AC_CACHE_CHECK([if $MANIFEST_TOOL *is a manifest tool* ]

Perhaps you can remove the check or set MANIFEST_TOOL to something like false so it fails immediately. For example:

MANIFEST_TOOL=false ./configure ...

That trick usually works when you are missing tools for documentation. For example, you would set MAKEINFO=true to avoid a Make error. Make will call $(MAKEINFO) which returns success without building the docs.

You might also be able to rig something in is just a shell script, so add something like this before the MANIFEST_TOOL check.

if [ x"$MANIFEST_TOOL" = "x" ]; then

By the way… mt is an old command to do something with magnetic tapes on Unix. You might want to check if mt is a Windows command that is expecting input (hanging).

Of topic… You can collapse this:

 - ps -ef
 - if [ "$TRAVIS_OS_NAME" = "windows" ]; then ps -Wla | sort ; fi
 - eval "${MATRIX_EVAL}"
 - if [ "$TRAVIS_OS_NAME" != "windows" ]; then export LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/lib"; fi
 - if [ "$TRAVIS_OS_NAME" != "windows" ]; then export PATH=$PATH:/usr/local/lib; fi
 - if [ "$TRAVIS_OS_NAME" != "windows" ]; then export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib; fi
 - if [ "$TRAVIS_OS_NAME" != "windows" ]; then export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib; fi

Into something like this:

 - ps -ef
 - if [ "$TRAVIS_OS_NAME" = "windows" ]; then ps -Wla | sort ; fi
 - eval "${MATRIX_EVAL}"
 - |
    if [ "$TRAVIS_OS_NAME" != "windows" ]; then
        export LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/lib"
        export PATH=$PATH:/usr/local/lib
        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
        export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib
1 Like

You can use

export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'


bash -x configure

instead of ./configure
to find out where exactly it gets stuck.
(Credit goes to Debugging a script [Bash Hackers Wiki])

(Note that trace output may be out of sync with regular output due to Stderr output is shown after the build log rather than inline)

Thanks @native-api , I’ll give it a try with the debugging.

I have the impression that it gets stuck every time it searches for a tool that is not installed, but this seems to be happening on windows only (not in the other OS) and only on a specific configure.

This will be useful.

It’s possible that it’s stuck displaying some GUI error message – Windows is notorious for that. But without knowing what exact command is stuck, it’s impossible to reproduce.