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

[lapack-reference] build failure - gfortran required? #17293

Closed
SamuelMarks opened this issue Apr 15, 2021 · 3 comments
Closed

[lapack-reference] build failure - gfortran required? #17293

SamuelMarks opened this issue Apr 15, 2021 · 3 comments
Assignees
Labels
category:question This issue is a question

Comments

@SamuelMarks
Copy link
Contributor

Host Environment

  • OS: macOS 11.1 (20C69)
  • Compiler:
    Apple clang version 12.0.0 (clang-1200.0.32.29)
    Target: x86_64-apple-darwin20.2.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

To Reproduce
Steps to reproduce the behavior:
./vcpkg install dlib

Starting package 6/10: lapack-reference:x64-osx

Failure logs

Building package lapack-reference[blas-select,core,noblas]:x64-osx...
-- Downloading https://github.com/Reference-LAPACK/lapack/archive/v3.8.0.tar.gz -> Reference-LAPACK-lapack-v3.8.0.tar.gz...
-- Extracting source /private/tmp/vcpkg/downloads/Reference-LAPACK-lapack-v3.8.0.tar.gz
-- Using source at /private/tmp/vcpkg/buildtrees/lapack-reference/src/v3.8.0-954f10683f.clean
-- The Fortran compiler identification is unknown
CMake Error at scripts/cmake/vcpkg_find_fortran.cmake:127 (message):
  Unable to find a Fortran compiler using 'CMakeDetermineFortranCompiler'.
  Please install one (e.g.  gfortran) and make it available on the PATH!
Call Stack (most recent call first):
  ports/lapack-reference/portfile.cmake:50 (vcpkg_find_fortran)
  scripts/ports.cmake:142 (include)


Error: Building package lapack-reference: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: lapack-reference:x64-osx
  Vcpkg version: 2021-01-13-unknownhash

Additional context
Fortran is required for this. So I could just brew install fortran. But I'm pretty sure this can be built without Fortran at all, see www.netlib.org/lapack/lawnspdf/lawn270.pdf http://www.netlib.org/lapack/

You will learn how you can directly run LAPACKE from VS Studio (just C code, no Fortran!!!). LAPACK now offers Windows users the ability to code in C using Microsoft Visual Studio and link to LAPACK Fortran libraries without the need of a vendor-supplied Fortran compiler add-on.

Unless that's just for LAPACKE?

Any I'm not sure if there's a better way of raising missing system dependency errors in vcpkg… might be friendlier to new users (tell them what to apt install brew install etc.)

@Neumann-A
Copy link
Contributor

Unless that's just for LAPACKE?

it is just LAPACKE.

Lapack needs a CMake visible Fortran compiler installed on the system.

@NancyLi1013
Copy link
Contributor

Hi @SamuelMarks

Thanks for posting this issue.

I think this comment may answer your question #12805 (comment).

CMake Error at scripts/cmake/vcpkg_find_fortran.cmake:127 (message):
  Unable to find a Fortran compiler using 'CMakeDetermineFortranCompiler'.
  Please install one (e.g.  gfortran) and make it available on the PATH!

Currently, the error info is clear that you need to install gfortran on your machine.

So please brew install fortran and rebuild this port.

@SamuelMarks
Copy link
Contributor Author

@Neumann-A Ah okay, yeah was worried about that. Anyway, ended up with a different issue on dlib post-compilation so check that issue to follow the story further 📦

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

3 participants