Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,198
    • Issues 3,198
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 16
    • Merge Requests 16
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • CMake
  • CMakeCMake
  • Issues
  • #21683

Closed
Open
Opened Jan 08, 2021 by Charles Gueunet@charles.gueunet

`enable_langage(Fortran)` fails when build is in a path containing a symbolic link with Ninja

I am building a project (ParaView) on Linux in a build named build folder which happens to be a symbolic link pointing to a folder named buildD. (build -> buildD)

Recently, I have started using the Ninja build system and since then I have the following problem:

 Check for working Fortran compiler: /usr/bin/f95 - broken
 CMake Error at [...]/Software/install/cmake/share/cmake-3.19/Modules/CMakeTestFortranCompiler.cmake:51 (message):
   The Fortran compiler

     "/usr/bin/f95"

   is not able to compile a simple test program.

   It fails with the following output:

     Change Dir: [...]/Software/sources/paraview/master/build/CMakeFiles/CMakeTmp

     Run Build Command(s):/usr/bin/ninja cmTC_6340f && [1/4] Building Fortran preprocessed CMakeFiles/cmTC_6340f.dir/testFortranCompiler.f-pp.f
     [2/4] Generating Fortran dyndep file CMakeFiles/cmTC_6340f.dir/Fortran.dd
     ninja: build stopped: CMakeFiles/cmTC_6340f.dir/Fortran.dd:2: no build statement exists for '[...]/Software/sources/paraview/master/buildD/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_6340f.dir/testFortranCompiler.f.o'

We see that the first occurence of CMakeTmp is in build and the second one in buildD. Only one of them resolved the symbolic link.

The problem disappear if I comment the line enable_langage(Fortran OPTIONAL)

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#21683