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 failure which prevents [cgal] from also building #15956

Closed
acgetchell opened this issue Jan 30, 2021 · 22 comments
Closed

[gmp] build failure which prevents [cgal] from also building #15956

acgetchell opened this issue Jan 30, 2021 · 22 comments
Assignees
Labels
category:question This issue is a question

Comments

@acgetchell
Copy link

acgetchell commented Jan 30, 2021

Host Environment

  • OS: macOS 11.1
  • Compiler: Apple clang version 12.0.0 (clang-1200.0.32.29)

To Reproduce
Steps to reproduce the behavior:
./vcpkg remove mpir
./vcpkg install cgal

Failure logs

adam@hapkido ~/vcpkg (e4ce66eec) $ git checkout 7f400c4
Previous HEAD position was e4ce66eec [vcpkg] Improve diagnostics around compiler tracking and toolset errors. 'Fixes' #15823. (#15825)
HEAD is now at 7f400c423 [CGAL] switch dep to gmp instead of mpir (#15860)
adam@hapkido ~/vcpkg (7f400c423) $ ./bootstrap-vcpkg.sh 
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/g++-10 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting the C++ compiler in use
-- Detecting the C++ compiler in use - gcc
-- Detecting the C++ standard library
-- Detecting the C++ standard library - libstdc++
-- Detecting how to use the C++ filesystem library
-- Detecting how to use the C++ filesystem library - <filesystem>
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/adam/vcpkg/toolsrc/build.rel
[0/2] Re-checking globbed directories...
[88/88] Linking CXX executable vcpkg
Telemetry
---------
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.

Read more about vcpkg telemetry at docs/about/privacy.md
adam@hapkido ~/vcpkg (7f400c423) $ ./vcpkg update
Using local portfile versions. To update the local portfiles, use `git pull`.
The following packages differ from their port versions:
    boost-modular-build-helper:x64-osx 1.75.0#3 -> 1.75.0#4
    cgal:x64-osx                     5.2 -> 5.2#1
    mpfr:x64-osx                     4.0.2-2 -> 4.1.0

To update these packages and all dependencies, run
    ./vcpkg upgrade

To only remove outdated packages, run
    ./vcpkg remove --outdated
adam@hapkido ~/vcpkg (7f400c423) $ ./vcpkg upgrade --no-dry-run
... elided ...
adam@hapkido ~/vcpkg (7f400c423) $ ./vcpkg remove mpir
The following packages will be removed:
    mpir:x64-osx
Removing package mpir:x64-osx...
Removing package mpir:x64-osx... done
adam@hapkido ~/vcpkg (7f400c423) $ ./vcpkg install cgal
Computing installation plan...
The following packages will be built and installed:
    cgal[core]:x64-osx -> 5.2#1
  * gmp[core]:x64-osx -> 6.2.1#3
  * mpfr[core]:x64-osx -> 4.1.0
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-osx...
Could not locate cached archive: /Users/adam/.cache/vcpkg/archives/78/78480bbeed76f510d87cd1b8b0a72bdd28d136ba.zip
Could not locate cached archive: /Users/adam/.cache/vcpkg/archives/ba/bab64f26b673396a31c362630b8e20352f9fc135.zip
Could not locate cached archive: /Users/adam/.cache/vcpkg/archives/ee/eee0766af050ea86349719d10a4112c3d4100796.zip
Starting package 1/3: gmp:x64-osx
Building package gmp[core]:x64-osx...
-- Downloading https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz -> gmp-6.2.1.tar.xz...
-- Extracting source /Users/adam/vcpkg/downloads/gmp-6.2.1.tar.xz
-- Using source at /Users/adam/vcpkg/buildtrees/gmp/src/gmp-6.2.1-f1768910a5.clean
-- Configuring x64-osx-dbg
-- Configuring x64-osx-rel
CMake Error at scripts/cmake/vcpkg_configure_make.cmake:531 (message):
  gmp requires autoconf from the system package manager (example: "sudo
  apt-get install autoconf")
Call Stack (most recent call first):
  ports/gmp/portfile.cmake:103 (vcpkg_configure_make)
  scripts/ports.cmake:128 (include)


Error: Building package gmp:x64-osx failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `./vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: gmp:x64-osx
  Vcpkg version: 2021-01-13-unknownhash

Additional context
The vcpkg port for cgal switched from mpir to gmp, which caused #15881. Commit 7f400c4 is supposed to resolve this. However, after mpir is uninstalled, gmp won't install, which causes cgal to fail.

@Neumann-A
Copy link
Contributor

Neumann-A commented Jan 30, 2021

according to #15957 gmp builds fine on osx and linux if you have the required system tools installed

@cenit
Copy link
Contributor

cenit commented Jan 30, 2021

I can build gmp fine on my Mac now.
Did you remember to brew install autoconf autoconf-archive ?

@ShinYwings
Copy link

ShinYwings commented Jan 31, 2021

Do you install "yasm-tool"?
I'm not sure it is the same in MacOS, but "gmp" needs yasm-tool in Windows.
Can you check the log in debug? eg) "vcpkg install --debug cgal"

@JackBoosY JackBoosY added the category:question This issue is a question label Feb 1, 2021
@Dejauxvue
Copy link
Contributor

I had the same issue, could fix it by manually installing yasm-tool:x86-windows and vs-yasm:x86-windows as the output stated:

Building package gmp[core]:x64-windows...
-- Downloading https://github.com/ShiftMediaProject/gmp/archive/0018c44e8dfcc3b64b43e0aea4b3f419f0b65fd0.tar.gz -> ShiftMediaProject-gmp-0018c44e8dfcc3b64b43e0aea4b3f419f0b65fd0.tar.gz...
-- Extracting source C:/Users/[...]/Documents/projects/vcpkg/downloads/ShiftMediaProject-gmp-0018c44e8dfcc3b64b43e0aea4b3f419f0b65fd0.tar.gz
-- Applying patch vs.build.patch
-- Applying patch runtime.patch
-- Applying patch adddef.patch
-- Using source at C:/Users/[...]/Documents/projects/vcpkg/buildtrees/gmp/src/19f0b65fd0-9b395bc164.clean
CMake Error at installed/x64-windows/share/yasm-tool-helper/yasm-tool-helper.cmake:16 (message):
  Cross-targetting and x64 ports requiring yasm require the x86-windows
  yasm-tool to be available.  Please install yasm-tool:x86-windows first.
Call Stack (most recent call first):
  ports/gmp/portfile.cmake:19 (yasm_tool_helper)
  scripts/ports.cmake:128 (include)

Is it possible to make x64-gmp dependent on yasm x86 so that vcpkg installs it automatically?

@Neumann-A
Copy link
Contributor

Is it possible to make x64-gmp dependent on yasm x86 so that vcpkg installs it automatically?

no currently not.

@zsxing99
Copy link

zsxing99 commented Feb 2, 2021

Had the same issue on MacOS. I installed the autoreconf but it still didn't work. Here is the error report:

zsxing@Zeshengs-Mac-mini CLionProjects % ./vcpkg/vcpkg install cgal            
Computing installation plan...
The following packages will be built and installed:
    cgal[core]:x64-osx -> 5.2#1
  * gmp[core]:x64-osx -> 6.2.1#3
  * mpfr[core]:x64-osx -> 4.1.0
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-osx...
Could not locate cached archive: /Users/zsxing/.cache/vcpkg/archives/ba/ba4be65f5c925f646c0d0f01b8b68a01bf283023.zip
Could not locate cached archive: /Users/zsxing/.cache/vcpkg/archives/05/055242113be769c52c725e85d57d11da4854234a.zip
Could not locate cached archive: /Users/zsxing/.cache/vcpkg/archives/de/de9285ef584be556e784bade2b426444f84af1f5.zip
Starting package 1/3: gmp:x64-osx
Building package gmp[core]:x64-osx...
-- Using cached /Users/zsxing/CLionProjects/vcpkg/downloads/gmp-6.2.1.tar.xz
-- Cleaning sources at /Users/zsxing/CLionProjects/vcpkg/buildtrees/gmp/src/gmp-6.2.1-f1768910a5.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /Users/zsxing/CLionProjects/vcpkg/downloads/gmp-6.2.1.tar.xz
-- Using source at /Users/zsxing/CLionProjects/vcpkg/buildtrees/gmp/src/gmp-6.2.1-f1768910a5.clean
-- Configuring x64-osx-dbg
-- Configuring x64-osx-rel
-- Generating configure for x64-osx
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:108 (message):
    Command failed: /usr/local/bin/autoreconf -vfi
    Working Directory: /Users/zsxing/CLionProjects/vcpkg/buildtrees/gmp/src/gmp-6.2.1-f1768910a5.clean/
    Error code: 1
    See logs for more information:
      /Users/zsxing/CLionProjects/vcpkg/buildtrees/gmp/autoconf-x64-osx-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:580 (vcpkg_execute_required_process)
  ports/gmp/portfile.cmake:103 (vcpkg_configure_make)
  scripts/ports.cmake:128 (include)


Error: Building package gmp:x64-osx failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `./vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: gmp:x64-osx
  Vcpkg version: 2021-01-13-unknownhash

Additionally, attach any relevant sections from the log files above.

Then, there is an issue with autoreconf

zsxing@Zeshengs-Mac-mini CLionProjects % /usr/local/bin/autoreconf -vfi

autoreconf: 'configure.ac' or 'configure.in' is required

@Neumann-A
Copy link
Contributor

If there is not configure.ac in /Users/zsxing/CLionProjects/vcpkg/buildtrees/gmp/src/gmp-6.2.1-f1768910a5.clean/ something is wrong with your extraction of the package. There clearly is a configure.ac

@zsxing99
Copy link

zsxing99 commented Feb 3, 2021

If there is not configure.ac in /Users/zsxing/CLionProjects/vcpkg/buildtrees/gmp/src/gmp-6.2.1-f1768910a5.clean/ something is wrong with your extraction of the package. There clearly is a configure.ac

Yes, apparently I didn't know how autoconf works so I checked error logs and did some search. Finally, after installing automake and autoconf libtool additionally, I could build gmp

@cdcseacave
Copy link
Contributor

cdcseacave commented Feb 15, 2021

I confirm, on ubuntu apt-get install autoconf is not enough either, but gmp installs after apt-get install automake autoconf libtool

Unfortunately one package later, mpfr fails with a the same error: Command failed: /usr/bin/autoreconf -vfi

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
aclocal: warning: couldn't open directory 'm4': No such file or directory
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
autoreconf: running: /usr/bin/autoconf --force
configure:14309: error: possibly undefined macro: AX_PTHREAD
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

@Neumann-A
Copy link
Contributor

configure:14309: error: possibly undefined macro: AX_PTHREAD

means you need to install autoconf-archive.

@cdcseacave
Copy link
Contributor

thx, that helped, it moved the needle a bit, but still fails; this time I managed to figure it out by myself: after installing texinfo too it works

acgetchell added a commit to acgetchell/CDT-plusplus that referenced this issue Feb 18, 2021
Go ahead and use HEAD of vcpkg, so add all the dependencies required as a result of microsoft/vcpkg#15956.
@acgetchell
Copy link
Author

acgetchell commented Feb 19, 2021

Even with the prerequisites installed, things are still screwy. You may be able to install the package, but cmake cannot find the package that was just installed. If I pin it back to the old version which worked, it does:

adam@hapkido ~/vcpkg (master) $ gst
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
adam@hapkido ~/vcpkg (master) $ ./bootstrap-vcpkg.sh 
Building vcpkg-tool...
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/g++-10 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting the C++ compiler in use
-- Detecting the C++ compiler in use - gcc
-- Detecting the C++ standard library
-- Detecting the C++ standard library - libstdc++
-- Detecting how to use the C++ filesystem library
-- Detecting how to use the C++ filesystem library - <filesystem>
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/adam/vcpkg/buildtrees/_vcpkg/build
[0/2] Re-checking globbed directories...
[88/88] Linking CXX executable vcpkg
Telemetry
---------
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.

Read more about vcpkg telemetry at docs/about/privacy.md
adam@hapkido ~/vcpkg (master) $ ./vcpkg integrate install
Applied user-wide integration for this vcpkg root.

CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/Users/adam/vcpkg/scripts/buildsystems/vcpkg.cmake"
adam@hapkido ~/vcpkg (master) $ ./vcpkg install catch2
Computing installation plan...
The following packages are already installed:
    catch2[core]:x64-osx -> 2.13.1
Package catch2:x64-osx is already installed

Total elapsed time: 15 us

The package catch2:x64-osx provides CMake targets:

    find_package(Catch2 CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Catch2::Catch2)

adam@hapkido ~/vcpkg (master) $ ~/CDT-plusplus/scripts
adam@hapkido ~/CDT-plusplus/scripts (develop) $ ./build.sh 
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- IPO enabled.
-- ccache found and enabled
CMake Error at /Users/adam/vcpkg/scripts/buildsystems/vcpkg.cmake:860 (_find_package):
  Could not find a package configuration file provided by "Catch2" with any
  of the following names:

    Catch2Config.cmake
    catch2-config.cmake

  Add the installation prefix of "Catch2" to CMAKE_PREFIX_PATH or set
  "Catch2_DIR" to a directory containing one of the above files.  If "Catch2"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/adam/CDT-plusplus/build/CMakeFiles/CMakeOutput.log".
See also "/Users/adam/CDT-plusplus/build/CMakeFiles/CMakeError.log".
ninja: error: loading 'build.ninja': No such file or directory
adam@hapkido ~/CDT-plusplus/scripts (develop) $ ~/vcpkg 
adam@hapkido ~/vcpkg (master) $ git reset --hard
HEAD is now at 3ae84754f [vcpkg baseline][ktx/otl] Update download hash (#16289)
adam@hapkido ~/vcpkg (master) $ git checkout e4ce66e
Note: switching to 'e4ce66e'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at e4ce66eec [vcpkg] Improve diagnostics around compiler tracking and toolset errors. 'Fixes' #15823. (#15825)
adam@hapkido ~/vcpkg (e4ce66eec) $ ./bootstrap-vcpkg.sh 
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/g++-10 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting the C++ compiler in use
-- Detecting the C++ compiler in use - gcc
-- Detecting the C++ standard library
-- Detecting the C++ standard library - libstdc++
-- Detecting how to use the C++ filesystem library
-- Detecting how to use the C++ filesystem library - <filesystem>
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/adam/vcpkg/toolsrc/build.rel
[0/2] Re-checking globbed directories...
[88/88] Linking CXX executable vcpkg
Telemetry
---------
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.

Read more about vcpkg telemetry at docs/about/privacy.md
adam@hapkido ~/vcpkg (e4ce66eec) $ ./vcpkg integrate remove
User-wide integration was removed
adam@hapkido ~/vcpkg (e4ce66eec) $ ./vcpkg integrate install
Applied user-wide integration for this vcpkg root.

CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/Users/adam/vcpkg/scripts/buildsystems/vcpkg.cmake"
adam@hapkido ~/vcpkg (e4ce66eec) $ echo $VCPKG_ROOT
/Users/adam/vcpkg
adam@hapkido ~/vcpkg (e4ce66eec) $ ./vcpkg list          
catch2:x64-osx                                     2.13.1           A modern, header-only test framework for unit te...
adam@hapkido ~/vcpkg (e4ce66eec) $ ./vcpkg remove catch2
The following packages will be removed:
    catch2:x64-osx
Removing package catch2:x64-osx...
Removing package catch2:x64-osx... done
adam@hapkido ~/vcpkg (e4ce66eec) $ ./vcpkg install catch2
Computing installation plan...
The following packages will be built and installed:
    catch2[core]:x64-osx -> 2.13.1
Detecting compiler hash for triplet x64-osx...
Using cached binary package: /Users/adam/.cache/vcpkg/archives/e3/e35dff5f4406dfc9f07e3851eddc275997d78d12.zip
Starting package 1/1: catch2:x64-osx
Building package catch2[core]:x64-osx...
Building package catch2[core]:x64-osx... done
Installing package catch2[core]:x64-osx...
Installing package catch2[core]:x64-osx... done
Elapsed time for package catch2:x64-osx: 19.07 ms

Total elapsed time: 1.886 s

The package catch2:x64-osx provides CMake targets:

    find_package(Catch2 CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Catch2::Catch2)

adam@hapkido ~/vcpkg (e4ce66eec) $ ~/CDT-plusplus/scripts 
adam@hapkido ~/CDT-plusplus/scripts (develop) $ ./build.sh 
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- IPO enabled.
-- ccache found and enabled
CMake Error at /Users/adam/vcpkg/scripts/buildsystems/vcpkg.cmake:646 (_find_package):
  Could not find a package configuration file provided by "docopt" with any
  of the following names:

    docoptConfig.cmake
    docopt-config.cmake

  Add the installation prefix of "docopt" to CMAKE_PREFIX_PATH or set
  "docopt_DIR" to a directory containing one of the above files.  If "docopt"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:55 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/adam/CDT-plusplus/build/CMakeFiles/CMakeOutput.log".
See also "/Users/adam/CDT-plusplus/build/CMakeFiles/CMakeError.log".
ninja: error: loading 'build.ninja': No such file or directory

This also happens with GitHub actions:

https://github.com/acgetchell/CDT-plusplus/runs/1932831244?check_suite_focus=true#step:4:18

But again, not when I pin the version:

https://travis-ci.com/github/acgetchell/CDT-plusplus/jobs/484441192#L479

acgetchell added a commit to acgetchell/CDT-plusplus that referenced this issue Feb 19, 2021
Strange things happen with vcpkg(master), such as installed packages not being seen. Pinning to a particular version fixes the problem elsewhere.

microsoft/vcpkg#15956 (comment)
@cenit
Copy link
Contributor

cenit commented Feb 19, 2021

@acgetchell problem should be fixed on master. Sorry for the troubles. #16293

@acgetchell
Copy link
Author

Thanks, I can confirm that vcpkg.cmake was fixed: https://github.com/acgetchell/CDT-plusplus/actions/runs/582487745

Also, installing autoconf, autoconf-archive, automake, libtool (or libtool-bin), texinfo, and yasm resolves the problems with installing gmp on macOS and Linux. However, I also build on Windows, particularly using AppVeyor.

AppVeyor (and many other systems) use chocolatey for their package manager, and I don't see a package for automake, libtool, or texinfo.

Have folks built this on Windows, and if so, how did you get the prerequisites installed?

@cenit
Copy link
Contributor

cenit commented Feb 19, 2021

you should not need any external dependency on windows. Can you point to a failed windows installation ci log?

@cdcseacave
Copy link
Contributor

On windows I needed to use:

vcpkg install --recurse yasm-tool:x86-windows

which not only that should be done automatically, but it is counterintuitieve as I use x64

acgetchell added a commit to acgetchell/CDT-plusplus that referenced this issue Feb 19, 2021
Check that AppVeyor can still build cgal to verify that microsoft/vcpkg#15956 is resolved.
acgetchell added a commit to acgetchell/CDT-plusplus that referenced this issue Feb 19, 2021
The new version of CGAL builds with GMP rather than MPIR, but GMP won't install if MPIR is present.

Hopefully resolves microsoft/vcpkg#15956
acgetchell added a commit to acgetchell/CDT-plusplus that referenced this issue Feb 19, 2021
CGAL requires GMP which on Windows requires yasm-tool:x86-windows, even if you are using x64-windows. And vcpkg does not automatically know of this dependency. Thanks to microsoft/vcpkg#15956 (comment)
@acgetchell
Copy link
Author

Thank you!

I can confirm that vcpkg.cmake again finds installed packages.

I can also confirm that with all of the guidance folks posted here, vcpkg builds CGAL on macOS, Linux, and Windows. To summarize:

macOS/Linux prerequisites:

  • build-essential (Linux only)
  • automake
  • autoconf
  • autoconf-archive
  • libtool (macOS) or libtool-bin (Linux)
  • texinfo
  • yasm
  • ninja (macOS) or ninja-build (Linux)

Windows prerequisites:

  • vcpkg install --recurse yasm-tool:x86-windows

Thanks again to all of the contributors in this thread!

acgetchell added a commit to acgetchell/CDT-plusplus that referenced this issue Feb 20, 2021
Describe updated setup and installation.

The CGAL formula changed from using MPIR to GMP, which requires new prerequisites, which folks kindly resolved in microsoft/vcpkg#15956.

Also, mention Docker image for those wanting to use it.

Finally, credit companies providing commercial-grade services to this project.

Closes microsoft/vcpkg#15956
@lxmedai
Copy link

lxmedai commented Aug 29, 2023

"vcpkg install --recurse yasm-tool:x86-windows" does not help me. I always get the error code 2 when I install gmp:x64-windows in visual studio console.
The call back I get is:
scripts/cmake/vcpkg_configure_make.cmake:838 (vcpkg_execute_required_process)
ports/gmp/portfile.cmake:85 (vcpkg_configure_make)
scripts/ports.cmake:147 (include)

I have also tried installing gmp:x64-windows-static or even x86-windows-static, which give me the same error messages.

By the way, I once tried installation of mpir which worked successfully, but then cgal still would not install. It seems to me that mpir was not recognized as a replacement for gmp and I don't know how to configure it if possible. Currently I have removed mpir from my installation. If I can get help about how to install cgal with mpir, I would be happy, since installing mpir is not a problem for me. Any suggestion about what can I do? Thanks in advance!

@Neumann-A
Copy link
Contributor

gmp no longer requires yasm since it was switched to use clang instead for compiling assembly files. So your issue with a current baseline is probably unrelated to this issue.

@lxmedai
Copy link

lxmedai commented Aug 29, 2023

gmp no longer requires yasm since it was switched to use clang instead for compiling assembly files. So your issue with a current baseline is probably unrelated to this issue.

Any suggestion about what to do?

@Neumann-A
Copy link
Contributor

Any suggestion about what to do?

Open a new issue with the output and error logs?

@lxmedai
Copy link

lxmedai commented Aug 29, 2023

Any suggestion about what to do?

Open a new issue with the output and error logs?

Thanks. I have opened a new issue at : [gmp] build failure that prevents installation of [cgal] in windows #33445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests