Thijser
Thijser

Reputation: 2633

Building AGG in msys2 causes error Invalid configuration `x86_64-pc-msys': system `msys' not recognized

I want to install pypotrace. To this end I'm following this tutorial. However when I get to the line ./autogen.sh; make

I get the error:

(specifically the line):

I extracted both packages in my C:\src folder. Both are easy to build by executing ./configure; make and ./autogen.sh; make respectively, on MSYS prompt.

main::scan_file() called too early to check prototype at /usr/bin/aclocal-1.11 line 644.
configure.in:15: warning: macro `AM_PROG_LIBTOOL' not found in library
configure.in:103: warning: macro `AM_PATH_SDL' not found in library
libtoolize: $pkgltdldir is not a directory: `/mingw/share/libtool'
examples/Makefile.am:19: Libtool library used but `LIBTOOL' is undefined
examples/Makefile.am:19:   The usual way to define `LIBTOOL' is to add `LT_INIT'
examples/Makefile.am:19:   to `configure.in' and run `aclocal' and `autoconf' again.
examples/Makefile.am:19:   If `LT_INIT' is in `configure.in', make sure
examples/Makefile.am:19:   its definition is in aclocal's search path.
examples/Makefile.am:222: variable `trans_curve2_ft_SOURCES' is defined but no program or
examples/Makefile.am:222: library has `trans_curve2_ft' as canonical name (possible typo)
examples/Makefile.am:227: variable `trans_curve1_ft_SOURCES' is defined but no program or
examples/Makefile.am:227: library has `trans_curve1_ft' as canonical name (possible typo)
examples/Makefile.am:224: variable `trans_curve2_ft_LDFLAGS' is defined but no program or
examples/Makefile.am:224: library has `trans_curve2_ft' as canonical name (possible typo)
examples/Makefile.am:229: variable `trans_curve1_ft_LDFLAGS' is defined but no program or
examples/Makefile.am:229: library has `trans_curve1_ft' as canonical name (possible typo)
font_freetype/Makefile.am:5: Libtool library used but `LIBTOOL' is undefined
font_freetype/Makefile.am:5:   The usual way to define `LIBTOOL' is to add `LT_INIT'
font_freetype/Makefile.am:5:   to `configure.in' and run `aclocal' and `autoconf' again.
font_freetype/Makefile.am:5:   If `LT_INIT' is in `configure.in', make sure
font_freetype/Makefile.am:5:   its definition is in aclocal's search path.
font_win32_tt/Makefile.am:7: Libtool library used but `LIBTOOL' is undefined
font_win32_tt/Makefile.am:7:   The usual way to define `LIBTOOL' is to add `LT_INIT'
font_win32_tt/Makefile.am:7:   to `configure.in' and run `aclocal' and `autoconf' again.
font_win32_tt/Makefile.am:7:   If `LT_INIT' is in `configure.in', make sure
font_win32_tt/Makefile.am:7:   its definition is in aclocal's search path.
gpc/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined
gpc/Makefile.am:2:   The usual way to define `LIBTOOL' is to add `LT_INIT'
gpc/Makefile.am:2:   to `configure.in' and run `aclocal' and `autoconf' again.
gpc/Makefile.am:2:   If `LT_INIT' is in `configure.in', make sure
gpc/Makefile.am:2:   its definition is in aclocal's search path.
src/Makefile.am:5: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:5:   The usual way to define `LIBTOOL' is to add `LT_INIT'
src/Makefile.am:5:   to `configure.in' and run `aclocal' and `autoconf' again.
src/Makefile.am:5:   If `LT_INIT' is in `configure.in', make sure
src/Makefile.am:5:   its definition is in aclocal's search path.
src/ctrl/Makefile.am:4: Libtool library used but `LIBTOOL' is undefined
src/ctrl/Makefile.am:4:   The usual way to define `LIBTOOL' is to add `LT_INIT'
src/ctrl/Makefile.am:4:   to `configure.in' and run `aclocal' and `autoconf' again.
src/ctrl/Makefile.am:4:   If `LT_INIT' is in `configure.in', make sure
src/ctrl/Makefile.am:4:   its definition is in aclocal's search path.
src/platform/X11/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined
src/platform/X11/Makefile.am:2:   The usual way to define `LIBTOOL' is to add `LT_INIT'
src/platform/X11/Makefile.am:2:   to `configure.in' and run `aclocal' and `autoconf' again.
src/platform/X11/Makefile.am:2:   If `LT_INIT' is in `configure.in', make sure
src/platform/X11/Makefile.am:2:   its definition is in aclocal's search path.
src/platform/mac/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined
src/platform/mac/Makefile.am:2:   The usual way to define `LIBTOOL' is to add `LT_INIT'
src/platform/mac/Makefile.am:2:   to `configure.in' and run `aclocal' and `autoconf' again.
src/platform/mac/Makefile.am:2:   If `LT_INIT' is in `configure.in', make sure
src/platform/mac/Makefile.am:2:   its definition is in aclocal's search path.
src/platform/sdl/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
src/platform/sdl/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
src/platform/sdl/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
src/platform/sdl/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
src/platform/sdl/Makefile.am:3:   its definition is in aclocal's search path.
src/platform/win32/Makefile.am:4: Libtool library used but `LIBTOOL' is undefined
src/platform/win32/Makefile.am:4:   The usual way to define `LIBTOOL' is to add `LT_INIT'
src/platform/win32/Makefile.am:4:   to `configure.in' and run `aclocal' and `autoconf' again.
src/platform/win32/Makefile.am:4:   If `LT_INIT' is in `configure.in', make sure
src/platform/win32/Makefile.am:4:   its definition is in aclocal's search path.
configure: loading site script /etc/config.site
checking build system type... Invalid configuration `x86_64-pc-msys': system `msys' not recognized
configure: error: /bin/sh ./config.sub x86_64-pc-msys failed
cd src; make
make[1]: Entering directory '/c/src/agg-2.4/src'
Makefile:1: ../Makefile.in.MSYS_NT-10.0-18362: No such file or directory
make[1]: *** No rule to make target '../Makefile.in.MSYS_NT-10.0-18362'.  Stop.
make[1]: Leaving directory '/c/src/agg-2.4/src'
make: *** [Makefile:4: src/libagg.a] Error 2

I have also ran: pacman -S automake autoconf make mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-SDL mingw-w64-x86_64-SDL_ttf

in order to get my build tools.

I looked at this discussion, however gcc -dumpmachinegives me the error

-bash: /usr/bin/gcc: No such file or directory

I also tried installing pypotrace using pip via pip install pypotrace, however this gave the error

Collecting pypotrace
  Using cached https://files.pythonhosted.org/packages/fa/10/cd7ce3148ac390032ad5c6f687ca20f924e4abcaf2f3d9a10dc13cbbe4b2/pypotrace-0.1.4.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\bst\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bst\\AppData\\Local\\Temp\\pip-install-atfefoey\\pypotrace\\setup.py'"'"'; __file__='"'"'C:\\Users\\bst\\AppData\\Local\\Temp\\pip-install-atfefoey\\pypotrace\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\bst\AppData\Local\Temp\pip-install-atfefoey\pypotrace\
    Complete output (15 lines):
    Package libagg was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libagg.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libagg' found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\bst\AppData\Local\Temp\pip-install-atfefoey\pypotrace\setup.py", line 70, in <module>
        cython=CYTHONIZE),
      File "C:\Users\bst\AppData\Local\Temp\pip-install-atfefoey\pypotrace\setup.py", line 45, in create_ext_obj
        pkg_config_output = subprocess.check_output(args)
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 411, in check_output
        **kwargs).stdout
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 512, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['pkg-config', '--libs', '--cflags', 'libagg']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

As it may matter, here is my PATH environment variable I have seen mentioned a few times: PATH environment

Anybody who knows how to get pypotrace to run on windows 10(so either one of the above methods or maybe something else entirely)? Or do you guys think that configuration issues are better posted in a place like superuser?

Upvotes: 3

Views: 872

Answers (1)

Rainb
Rainb

Reputation: 2465

As explained in this answer, it should work on MSYS (not mingw) if you update config.sub, and config.guess, just do

wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess'
wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'

./configure

However maybe you just want to do a mingw build.

Upvotes: 0

Related Questions