Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gmp] Build error - 'fat' does not build on Windows x64 #27957

Closed
fkonvick opened this issue Nov 22, 2022 · 22 comments · Fixed by #30177
Closed

[gmp] Build error - 'fat' does not build on Windows x64 #27957

fkonvick opened this issue Nov 22, 2022 · 22 comments · Fixed by #30177
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@fkonvick
Copy link

This might be a bug in GMP itself, I cannot tell. The reason for building gmp[fat] for me is that the plain build crashes with 'illegal instruction' on older CPUs without certain instruction sets.

Package: gmp[core,fat]:x64-windows -> 6.2.1#14

Host Environment

  • Host: x64-windows
  • Compiler: MSVC 19.29.30147.0
  • vcpkg-tool version: 2022-11-10-5fdee72bc1fceca198fb1ab7589837206a8b81ba
    vcpkg-scripts version: 34d2cf7 2022-11-21 (16 hours ago)

To Reproduce

vcpkg install gmp[fat]

Failure logs

-- Using cached gmp-6.2.1.tar.xz.
-- Using cached gmp-arm64-asm-fix-5f32dbc41afc.patch.
-- Cleaning sources at C:/BUILD/vcpkg/buildtrees/gmp/src/v6.2.1-0c723d4b6f.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/BUILD/vcpkg/downloads/gmp-6.2.1.tar.xz
-- Applying patch asmflags.patch
-- Applying patch cross-tools.patch
-- Applying patch subdirs.patch
-- Applying patch msvc_symbol.patch
-- Applying patch arm64-coff.patch
-- Applying patch C:/BUILD/vcpkg/downloads/gmp-arm64-asm-fix-5f32dbc41afc.patch
-- Using source at C:/BUILD/vcpkg/buildtrees/gmp/src/v6.2.1-0c723d4b6f.clean
-- Found external ninja('1.10.2').
-- Getting CMake variables for x64-windows
-- Getting CMake variables for x64-windows
-- Using cached msys-gzip-1.11-1-x86_64.pkg.tar.zst.
-- Using cached msys-bash-5.1.008-1-x86_64.pkg.tar.zst.
-- Using cached msys-autoconf-2.71-3-any.pkg.tar.zst.
-- Using cached msys-diffutils-3.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-binutils-2.37-5-x86_64.pkg.tar.zst.
-- Using cached msys-libtool-2.4.6-9-x86_64.pkg.tar.xz.
-- Using cached msys-file-5.41-2-x86_64.pkg.tar.zst.
-- Using cached msys-zlib-1.2.11-1-x86_64.pkg.tar.xz.
-- Using cached msys-libbz2-1.0.8-3-x86_64.pkg.tar.zst.
-- Using cached msys-coreutils-8.32-2-x86_64.pkg.tar.zst.
-- Using cached msys-grep-3.0-2-x86_64.pkg.tar.xz.
-- Using cached msys-sed-4.8-2-x86_64.pkg.tar.zst.
-- Using cached msys-libpcre-8.45-1-x86_64.pkg.tar.zst.
-- Using cached msys-m4-1.4.19-2-x86_64.pkg.tar.zst.
-- Using cached msys-automake-wrapper-11-4-any.pkg.tar.zst.
-- Using cached msys-gawk-5.1.0-2-x86_64.pkg.tar.zst.
-- Using cached msys-mpfr-4.1.0-1-x86_64.pkg.tar.zst.
-- Using cached msys-gmp-6.2.1-1-x86_64.pkg.tar.zst.
-- Using cached msys-libreadline-8.1.001-1-x86_64.pkg.tar.zst.
-- Using cached msys-ncurses-6.2-2-x86_64.pkg.tar.zst.
-- Using cached msys-automake1.16-1.16.3-3-any.pkg.tar.zst.
-- Using cached msys-perl-5.32.1-2-x86_64.pkg.tar.zst.
-- Using cached msys-libcrypt-2.1-3-x86_64.pkg.tar.zst.
-- Using cached msys-pkg-config-0.29.2-4-x86_64.pkg.tar.zst.
-- Using cached msys-make-4.3-3-x86_64.pkg.tar.zst.
-- Using cached msys-findutils-4.8.0-1-x86_64.pkg.tar.zst.
-- Using cached msys-libintl-0.21-1-x86_64.pkg.tar.zst.
-- Using cached msys-libiconv-1.16-2-x86_64.pkg.tar.zst.
-- Using cached msys-gcc-libs-11.2.0-3-x86_64.pkg.tar.zst.
-- Using cached msys-msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst.
-- Using cached msys-which-2.21-4-x86_64.pkg.tar.zst.
-- Using msys root at C:/BUILD/vcpkg/downloads/tools/msys2/583ad6e4115a307a
-- Generating configure for x64-windows
-- Finished generating configure for x64-windows
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst.
-- Using msys root at C:/BUILD/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Configuring x64-windows-dbg
-- Configuring x64-windows-rel
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:131 (message):
    Command failed: C:/BUILD/vcpkg/downloads/tools/msys2/583ad6e4115a307a/usr/bin/make.exe -j 25 --trace -f Makefile all
    Working Directory: C:/BUILD/vcpkg/buildtrees/gmp/x64-windows-dbg/
    See logs for more information:
      C:\BUILD\vcpkg\buildtrees\gmp\build-x64-windows-dbg-out.log
      C:\BUILD\vcpkg\buildtrees\gmp\build-x64-windows-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_make.cmake:149 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_make.cmake:2 (vcpkg_build_make)
  ports/gmp/portfile.cmake:92 (vcpkg_install_make)
  scripts/ports.cmake:147 (include)



C:\BUILD\vcpkg\buildtrees\gmp\build-x64-windows-dbg-out.log
Makefile:1470: update target 'gen-fac.exe' due to: ./../src/v6.2.1-0c723d4b6f.clean/gen-fac.c ./../src/v6.2.1-0c723d4b6f.clean/bootstrap.c
compile cl.exe -DWIN32 -D_WINDOWS -D_DEBUG -nologo -W3 -utf-8 -MP -MDd -Z7 -Ob0 -Od -Xcompiler -RTC1 `test -f 'gen-fac.c' || echo './../src/v6.2.1-0c723d4b6f.clean/'`gen-fac.c -o gen-fac.exe
Makefile:1479: update target 'gen-fib.exe' due to: ./../src/v6.2.1-0c723d4b6f.clean/gen-fib.c ./../src/v6.2.1-0c723d4b6f.clean/bootstrap.c
compile cl.exe -DWIN32 -D_WINDOWS -D_DEBUG -nologo -W3 -utf-8 -MP -MDd -Z7 -Ob0 -Od -Xcompiler -RTC1 `test -f 'gen-fib.c' || echo './../src/v6.2.1-0c723d4b6f.clean/'`gen-fib.c -o gen-fib.exe
Makefile:1488: update target 'gen-bases.exe' due to: ./../src/v6.2.1-0c723d4b6f.clean/gen-bases.c ./../src/v6.2.1-0c723d4b6f.clean/bootstrap.c
compile cl.exe -DWIN32 -D_WINDOWS -D_DEBUG -nologo -W3 -utf-8 -MP -MDd -Z7 -Ob0 -Od -Xcompiler -RTC1 `test -f 'gen-bases.c' || echo './../src/v6.2.1-0c723d4b6f.clean/'`gen-bases.c -o gen-bases.exe 
Makefile:1494: update target 'gen-trialdivtab.exe' due to: ./../src/v6.2.1-0c723d4b6f.clean/gen-trialdivtab.c ./../src/v6.2.1-0c723d4b6f.clean/bootstrap.c
compile cl.exe -DWIN32 -D_WINDOWS -D_DEBUG -nologo -W3 -utf-8 -MP -MDd -Z7 -Ob0 -Od -Xcompiler -RTC1 `test -f 'gen-trialdivtab.c' || echo './../src/v6.2.1-0c723d4b6f.clean/'`gen-trialdivtab.c -o gen-trialdivtab.exe 
Makefile:1500: update target 'gen-jacobitab.exe' due to: ./../src/v6.2.1-0c723d4b6f.clean/gen-jacobitab.c
compile cl.exe -DWIN32 -D_WINDOWS -D_DEBUG -nologo -W3 -utf-8 -MP -MDd -Z7 -Ob0 -Od -Xcompiler -RTC1 `test -f 'gen-jacobitab.c' || echo './../src/v6.2.1-0c723d4b6f.clean/'`gen-jacobitab.c -o gen-jacobitab.exe
Makefile:1506: update target 'gen-psqr.exe' due to: ./../src/v6.2.1-0c723d4b6f.clean/gen-psqr.c ./../src/v6.2.1-0c723d4b6f.clean/bootstrap.c
compile cl.exe -DWIN32 -D_WINDOWS -D_DEBUG -nologo -W3 -utf-8 -MP -MDd -Z7 -Ob0 -Od -Xcompiler -RTC1 `test -f 'gen-psqr.c' || echo './../src/v6.2.1-0c723d4b6f.clean/'`gen-psqr.c -o gen-psqr.exe 
gen-fac.c
Makefile:829: update target 'config.h' due to: stamp-h1
test -f config.h || rm -f stamp-h1
gen-fib.c
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\mini-gmp/mini-gmp.c(717): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\mini-gmp/mini-gmp.c(758): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\mini-gmp/mini-gmp.c(976): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\mini-gmp/mini-gmp.c(1012): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\mini-gmp/mini-gmp.c(1068): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\mini-gmp/mini-gmp.c(1215): warning C4244: 'initializing': conversion from 'const mp_limb_t' to 'unsigned char', possible loss of data
...
Skipped 375 lines
...

C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\gmp-impl.h(4686): error C2071: 'preinv_mod_1': illegal storage classlibtool: compile:  .././../src/v6.2.1-0c723d4b6f.clean/mpn/m4-ccas --m4=m4 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_mod_34lsub1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc x86_64_mod_34lsub1.asm  -DDLL_EXPORT -DPIC -o .libs/x86_64_mod_34lsub1.obj

C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\gmp-impl.h(4687): error C2071: 'redc_1': illegal storage class
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\gmp-impl.h(4688): error C2071: 'redc_2': illegal storage class
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\gmp-impl.h(4689): error C2071: 'rshift': illegal storage class
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\gmp-impl.h(4690): error C2071: 'sqr_basecase': illegal storage class
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\gmp-impl.h(4691): error C2071: 'sub_n': illegal storage class
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\gmp-impl.h(4692): error C2071: 'sublsh1_n': illegal storage class
C:\BUILD\vcpkg\buildtrees\gmp\src\v6.2.1-0c723d4b6f.clean\gmp-impl.h(4693): error C2071: 'submul_1': illegal storage class
libtool: compile:  .././../src/v6.2.1-0c723d4b6f.clean/mpn/m4-ccas --m4=m4 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_sub_n -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc x86_64_sub_n.asm  -DDLL_EXPORT -DPIC -o .libs/x86_64_sub_n.obj
libtool: compile:  .././../src/v6.2.1-0c723d4b6f.clean/mpn/m4-ccas --m4=m4 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_rshift -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc x86_64_rshift.asm  -DDLL_EXPORT -DPIC -o .libs/x86_64_rshift.obj
libtool: compile:  .././../src/v6.2.1-0c723d4b6f.clean/mpn/m4-ccas --m4=m4 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_submul_1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc x86_64_submul_1.asm  -DDLL_EXPORT -DPIC -o .libs/x86_64_submul_1.obj
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_addmul_1 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_addmul_1.asm >tmp-x86_64_addmul_1.s
libtool: compile:  .././../src/v6.2.1-0c723d4b6f.clean/mpn/m4-ccas --m4=m4 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_addlsh1_n -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc x86_64_addlsh1_n.asm  -DDLL_EXPORT -DPIC -o .libs/x86_64_addlsh1_n.obj
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_bdiv_dbm1c -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_bdiv_dbm1c.asm >tmp-x86_64_bdiv_dbm1c.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_com -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_com.asm >tmp-x86_64_com.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_add_n -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_add_n.asm >tmp-x86_64_add_n.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_cnd_sub_n -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_cnd_sub_n.asm >tmp-x86_64_cnd_sub_n.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_copyi -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_copyi.asm >tmp-x86_64_copyi.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_dive_1 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_dive_1.asm >tmp-x86_64_dive_1.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_divrem_1 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_divrem_1.asm >tmp-x86_64_divrem_1.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_lshift -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_lshift.asm >tmp-x86_64_lshift.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_lshiftc -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_lshiftc.asm >tmp-x86_64_lshiftc.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_cnd_add_n -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_cnd_add_n.asm >tmp-x86_64_cnd_add_n.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_mod_1_2 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_mod_1_2.asm >tmp-x86_64_mod_1_2.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_gcd_11 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_gcd_11.asm >tmp-x86_64_gcd_11.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_copyd -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_copyd.asm >tmp-x86_64_copyd.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_mod_1_1 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_mod_1_1.asm >tmp-x86_64_mod_1_1.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_mode1o -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_mode1o.asm >tmp-x86_64_mode1o.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_mul_1 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_mul_1.asm >tmp-x86_64_mul_1.s
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_com -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_com.s -DDLL_EXPORT -DPIC -o .libs/x86_64_com.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_addmul_1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_addmul_1.s -DDLL_EXPORT -DPIC -o .libs/x86_64_addmul_1.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_bdiv_dbm1c -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_bdiv_dbm1c.s -DDLL_EXPORT -DPIC -o .libs/x86_64_bdiv_dbm1c.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_cnd_sub_n -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_cnd_sub_n.s -DDLL_EXPORT -DPIC -o .libs/x86_64_cnd_sub_n.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_add_n -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_add_n.s -DDLL_EXPORT -DPIC -o .libs/x86_64_add_n.obj
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_mod_34lsub1 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_mod_34lsub1.asm >tmp-x86_64_mod_34lsub1.s
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_copyi -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_copyi.s -DDLL_EXPORT -DPIC -o .libs/x86_64_copyi.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_dive_1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_dive_1.s -DDLL_EXPORT -DPIC -o .libs/x86_64_dive_1.obj
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_mod_1_4 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_mod_1_4.asm >tmp-x86_64_mod_1_4.s
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_divrem_1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_divrem_1.s -DDLL_EXPORT -DPIC -o .libs/x86_64_divrem_1.obj
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_rshift -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_rshift.asm >tmp-x86_64_rshift.s
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_lshift -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_lshift.s -DDLL_EXPORT -DPIC -o .libs/x86_64_lshift.obj
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_sub_n -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_sub_n.asm >tmp-x86_64_sub_n.s
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_lshiftc -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_lshiftc.s -DDLL_EXPORT -DPIC -o .libs/x86_64_lshiftc.obj
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_addlsh1_n -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_addlsh1_n.asm >tmp-x86_64_addlsh1_n.s
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_x86_64_submul_1 -DWIN32 -D_WINDOWS -D_DEBUG -DDLL_EXPORT -DPIC x86_64_submul_1.asm >tmp-x86_64_submul_1.s
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_copyd -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_copyd.s -DDLL_EXPORT -DPIC -o .libs/x86_64_copyd.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_cnd_add_n -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_cnd_add_n.s -DDLL_EXPORT -DPIC -o .libs/x86_64_cnd_add_n.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_mod_1_2 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_mod_1_2.s -DDLL_EXPORT -DPIC -o .libs/x86_64_mod_1_2.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_gcd_11 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_gcd_11.s -DDLL_EXPORT -DPIC -o .libs/x86_64_gcd_11.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_mod_1_1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_mod_1_1.s -DDLL_EXPORT -DPIC -o .libs/x86_64_mod_1_1.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_mode1o -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_mode1o.s -DDLL_EXPORT -DPIC -o .libs/x86_64_mode1o.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_mul_1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_mul_1.s -DDLL_EXPORT -DPIC -o .libs/x86_64_mul_1.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_mod_34lsub1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_mod_34lsub1.s -DDLL_EXPORT -DPIC -o .libs/x86_64_mod_34lsub1.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_mod_1_4 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_mod_1_4.s -DDLL_EXPORT -DPIC -o .libs/x86_64_mod_1_4.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_sub_n -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_sub_n.s -DDLL_EXPORT -DPIC -o .libs/x86_64_sub_n.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_rshift -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_rshift.s -DDLL_EXPORT -DPIC -o .libs/x86_64_rshift.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_addlsh1_n -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_addlsh1_n.s -DDLL_EXPORT -DPIC -o .libs/x86_64_addlsh1_n.obj
 clang.exe -DHAVE_CONFIG_H -I. -I.././../src/v6.2.1-0c723d4b6f.clean/mpn -I.. -D__GMP_WITHIN_GMP -I.././../src/v6.2.1-0c723d4b6f.clean -DOPERATION_x86_64_submul_1 -DWIN32 -D_WINDOWS -D_DEBUG -c --target=x86_64-pc-windows-msvc tmp-x86_64_submul_1.s -DDLL_EXPORT -DPIC -o .libs/x86_64_submul_1.obj
make[2]: Leaving directory '/c/BUILD/vcpkg/buildtrees/gmp/x64-windows-dbg/mpn'
make[1]: Leaving directory '/c/BUILD/vcpkg/buildtrees/gmp/x64-windows-dbg'
C:\BUILD\vcpkg\buildtrees\gmp\build-x64-windows-dbg-err.log
cl : Command line warning D9002 : ignoring unknown option '-Xcompiler'
cl : Command line warning D9002 : ignoring unknown option '-Xcompiler'
cl : Command line warning D9002 : ignoring unknown option '-Xcompiler'
cl : Command line warning D9002 : ignoring unknown option '-Xcompiler'
cl : Command line warning D9002 : ignoring unknown option '-Xcompiler'
cl : Command line warning D9002 : ignoring unknown option '-Xcompiler'
make[2]: *** [Makefile:494: fib_table.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:494: mp_bases.lo] Error 1
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_cnd_sub_n' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_com' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_addmul_1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_add_n' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_bdiv_dbm1c' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_copyi' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_dive_1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_divrem_1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_lshift' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_lshiftc' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_cnd_add_n' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_copyd' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_mod_1_2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_gcd_11' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_mod_1_1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_mul_1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_mode1o' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_mod_34lsub1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_mod_1_4' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: clangwarning: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
: clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_sub_n' [-Wunused-command-line-argument]
clangclang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
: warning: clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_rshift' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_submul_1' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D HAVE_CONFIG_H' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D __GMP_WITHIN_GMP' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D OPERATION_x86_64_addlsh1_n' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D WIN32' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _WINDOWS' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D _DEBUG' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D DLL_EXPORT' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
make[1]: *** [Makefile:1000: all-recursive] Error 1
make: *** [Makefile:790: all] Error 2
@fkonvick fkonvick added the category:port-bug The issue is with a library, which is something the port should already support label Nov 22, 2022
@LilyWangLL
Copy link
Contributor

This feature gmp[fat] added by PR #27787. cc @dg0yt Could you help take a look this issue? Thanks in advance.

@fkonvick
Copy link
Author

I spent some time reviewing various threads, notably

The key thing is that the current default build of gmp by vcpkg is only guaranteed to run on the machine it was built on, on others it might crash with 'illegal instruction'. This is certainly bad for making universal packages. The 'fat' build would be the solution, but it's not compiling with vcpkg. Some of the above links suggest it could be possible in general, the last one (by the GMP authors) is pessimistic. So I'm not sure. But I assume that other packages ship some generic version, either "unoptimized" (with no special CPU instructions) or a 'fat' version (which chooses the code dynamically based on the actual CPU).

My ultimate goal is packaging MPFR; this library can be link either GMP or MPIR, but vcpkg only recognizes the GMP option. I wonder whether there is a way of configuring MPFR to use MPIR with vcpkg. Now, MPIR is more Windows-friendly, but it could still have issues generating a 'fat' build.

In both cases, GMP or MPIR, it might be a solution to switch the build to the "generic" unoptimized code path, which is slower than "fat" but works on any CPU.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 23, 2022

I already started looking into this issue.

gmp[core,fat]:x64-windows -> 6.2.1#14

This version has two significant changes for this issue:

  • Addition of feature fat.
    I tested this feature on linux host (x64 native and x64 mingw). With some minor changes to the port, it also builds with on mingw on windows.
    However, I have no idea if this works with non-mingw toolchains on windows. (And I cannot test this locally.) We might build with this feature and run make check as part of a draft PR to get more insight.
  • Switch from yasm to clang for assembly with msvc toolchains on windows.
    I just integrated what was prepared in separate PRs already. Certainly another change which could need more tuning.

I would propose to start without using fat on windows.

  • Did 6.2.1#13 work as expected?
  • Can we be sure that correct code is generated for modern CPUs? (make check should answer that.)
  • Can we tune the build to control the minimum support CPU?
  • Do we want to offer an opt-out feature to control assembler? Assembler is already disabled for some targets, and it might be a solution for users targeting old cpus.

@fkonvick
Copy link
Author

@dg0yt thanks!
Not sure how I can help; if I understand correctly, 6.2.1#13 does not have fat. As far as I can tell the 6.2.1#14 build is correct, but just on the same CPU where it was built.
GMP's configure offers --disable-assembly, which is probably a safe choice, but performance will be impacted. I'm not sure by how much.

I tried installing MSYS and used mingw-x64 to build GMP fat, and this works, but obviously it does not help as this cannot be linked to non-mingw code, as you pointed out.

I wasn't aware that vcpkg builds GMP using the MSVC toolchain (it makes sense, though) - but I cannot tell what does it take to fix things. Based on this wbhart/mpir#236 I would assume that it's no easy thing.

In all, I think that having the --disable-assembly option would be nice and looks achievable to me. It's not fat, but at least the binaries are supposed to be generic enough.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 23, 2022

  • make check passes for gmp[fat]:x64-mingw-static on windows host (after minor portfile changes).

  • AFAIU feature fat shall get "supports": "!windows, mingw".

  • https://gmplib.org/manual/Notes-for-Package-Builds:
    I read this while preparing [gmp] Cleanup, fix cross-builds, switch windows from yasm to clang #27787.

    GMP should present no great difficulties for packaging in a binary distribution.

    Sure!

    When building a package for a CPU family, care should be taken to use ‘--host’ (or ‘--build’) to choose the least common denominator among the CPUs which might use the package.

    Unlike for most other packages, it seems mandatory that we don't rely on config.guess but actively provide what we want to be the target (in vcpkg terminology) even for native builds.

@fkonvick
Copy link
Author

fkonvick commented Nov 23, 2022

For the record - I dug deeper into the crash that motivated building gmp[fat] in the first place. I tried building mpir (instead of gmp) in 'generic mode' and mpfr 4.1.1 by hand, and I was still getting errors. So the illegal instruction was caused by MPFR using the mulx instruction, which has been introduced here BrianGladman/mpfr@1203463

So like GMP, also the MPFR package could use an option for a 'safe' build. My comment in the above link shows how I worked around this bug. I'm not sure how to add flags to vcpkg; all this is quite low-level this-or-that way stuff (do you prefer portability or speed...), and I'm not sure how all this fits in the vcpkg ecosystem.

@fkonvick
Copy link
Author

@dg0yt based on the discussions with the MPFR dev team, my conclusions/comments are this:

  • the current way that vcpkg builds GMP, MPIR and MPFR results in optimized builds that may fail to run on other hosts and as such are not fit for redistribution
  • the correct way of building generic binaries differs for each library:
    • MPFR: the right way is using the "cross-compilation" mode which results in skipping any optimizations; using Visual Studio x64 command prompt + Cygwin, the incantation that worked for me was configure --build=x86_64-pc-cygwin --host=amd64-pc-cygwin ...
    • MPIR: this library offers several VS .sln projects, the one to use (which also does NOT depend on yasm) is 'gc', in my case 'lib_mpir_gc' (results in a static library)
    • GMP: as we discussed here, the right way is the 'fat' build, which is not available for Windows. So what would probably work best is forcing a cross-compile, much like as with MPFR, my guess is that the very same thing as I used with MPFR would work ( configure --build=x86_64-pc-cygwin --host=amd64-pc-cygwin ...)

I'm not familiar enough with vcpkg so I'm not sure what's possible. Is there a way of providing such builds as separate features? Perhaps it is, since gmp[fat] is not an extension but rather a variant of the build. So perhaps we could also have gmp[generic], mpir[generic], mpfr[generic_gmp] and mpfr[generic_mpir], all available for Windows x64 (I'm not sure how to trigger 'cross-compile' in a generic manner for any platform). Does this sound right?

@dg0yt
Copy link
Contributor

dg0yt commented Nov 25, 2022

Can you re-confirm that the bug is in port gmp, not in mpfr?

What I found is that our port does not create native-to-host-CPU builds, because running autoreconf replaces gmp's sophisticated cpu detection scripts (condig.guess, config.sub).
And when it comes to our msvc/clang builds (-windows- triplets), it gets even more complicated because we need one triplet to make configure create the right makefiles (and I don't think it is cygwin), and we might also need deal with ASMFLAGS (but we already do).

Last not least, I'm not convinced that any choice apart from fat can be modeled as features. You may need to burn your desired CPU model choice into a custom triplet file. (And there already is VCPKG_MAKE_BUILD_TRIPLET.)

I can create a draft PR from my WIP but I'm a little bit short on time for this topic. That's why I want to know if there is something which needs to be fixed immediately in port gmp, given its generic CPU choices.

@fkonvick
Copy link
Author

The bug that I observed was in the MPFR as built by vcpkg, not in GMP.

What I think that needs to be fixed in the gmp port is what you already suggested - mark gmp[fat] as unavailable for Windows.

I haven't checked but based on what you are saying regarding using special config.guess and config.sub - it looks like there is no need then for providing a "generic" build of GMP. That's great. Some may desire the opposite, of course, and get the optimized build, but that's not me :)

Thanks a lot for your support!

@fkonvick
Copy link
Author

For the record, I opened a separate issue for the mpfr port here: #28005

@fkonvick
Copy link
Author

@sfhacker Sure!
Here are the binaries; this needs to have the MSVCRT 2019 (or newer) redistributable installed in order to run.
gecode-6.3.0-test.zip
Here's the crash dump. It's showing Exception code: 0xc000001d in GecodeFloat-6-3-0-r-x64.dll (which statically links MPFR).
archimedean-spiral.exe.260.zip

The system is a plain vanilla Windows Server 2008 R2 with SP1. Here's CoreInfo64 output: coreinfo64.txt. Notably, BMI1 & BMI2 are missing. I believe that this is because "Hypervisor is present", as according to the specs this CPU model does support BMI.

I think the minimal repro could be as simple as calling sin or sqrt. The way to check a particular build is to examine config.log: if it performs the mulx instruction availability check and defines HAVE_MULX_U64=1, then the produced code will contain mulx.

I can provide instructions for building the binaries above. Gecode's sources are available from GitHub, and the first step is running the x64 VS command prompt and vcpkg install mpfr:x64-windows-static-md.

@fkonvick
Copy link
Author

We do not use Visual Studio at all nor do many other people! We should not force/impose using a specific toolchain/dependencies to end users and/or developers.

image

I am in the process of building gecode 6.3.0 from source and I will test it on Windows 2008 R2 server and report back here.

Sure, but distributing a pre-compiled library package requires that we choose a specific toolchain (unless we provide many variants). All preceding versions of Gecode distributed a similar .msi package suitable for use with MSVC (the key dependency is the CRT). The key reason I believe is to make this easily available for beginners.

Of course, anyone may build from source whenever the pre-compiled binary does not work for any reason - license restrictions of the optional dependencies (GMP + MPFR, Qt), incompatible compiler, etc. Hopefully we could also provide a vcpkg port at some point.

The error that you copied here indicates the lack of the MSVCRT, which I mentioned earlier. I could send you the required DLLs for copying into the executables directory (for the 'local deployment' of the CRT). Alternatively, download from Microsoft from here and install system-wide.

Should you have issues compiling Gecode please let me know. Again, the failed app is the archimedan-spiral.exe, and there is one more - golden-spiral.exe, but the nature of the crash will be similar.

@fkonvick
Copy link
Author

fkonvick commented Nov 27, 2022

Just built gecode 6.3.0 from source on Windows 10 x64 (GMP 6.2.1 & MPFR 4.1.1) . Copied a few files onto Windows 2008 R2 Server (fresh install; no MSVC runtime; no Visual Studio; no MS Office; no SQL Server; etc). No crashes at all.

Yes, but note that this is only expected to crash when you build your binaries on a computer with BMI2 support and then run the resulting binary on another machine which does not support the BMI2.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 27, 2022

@fkonvick To make it clear, sfhacker is not talking about helping with vcpkg.

@fkonvick
Copy link
Author

@LilyWangLL I'm not sure it's clear what needs to be done, so I'll recap: we should mark gmp[fat] as unavailable on Windows because it does not build (and it's not possible to work around this). This seems very straightforward, and it is also the original reason why I opened this issue.

@LilyWangLL
Copy link
Contributor

I can create a draft PR from my WIP but I'm a little bit short on time for this topic. That's why I want to know if there is something which needs to be fixed immediately in port gmp, given its generic CPU choices.

Hi @dg0yt, did you have created a branch to fix this issue in your repo? Do I need to submit a PR to modify the supports of feature gmp[fat]?

@dg0yt
Copy link
Contributor

dg0yt commented Mar 14, 2023

@LilyWangLL TBH I still don't know if it works or not, due to the mpfr aspect in this discussion. I'm very limited in what I can do for (MSVC) windows triplets.

@LilyWangLL
Copy link
Contributor

@LilyWangLL TBH I still don't know if it works or not, due to the mpfr aspect in this discussion. I'm very limited in what I can do for (MSVC) windows triplets.

Thanks for your reply. About mpfr, issue #28005 has been fixed, are there any more questions about mpfr?
About gmp[fat], I agree fkonvick's commen:

we should mark gmp[fat] as unavailable on Windows because it does not build (and it's not possible to work around this). This seems very straightforward, and it is also the original reason why I opened this issue.

I will submit a PR to change gmp[fat]'s supports as your suggestion: "supports": "!windows, mingw".

@fkonvick
Copy link
Author

@LilyWangLL #28005 is no longer an issue with the most recent MPFR version, so I think that there are no more questions regarding this.
Regarding gmp[fat] I confirm that marking this as unavailable for Windows (at least, as long as it does not build) seems to be the best approach to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@fkonvick @dg0yt @LilyWangLL and others