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

Proposition for fixing CMake procedure #923

Merged
merged 6 commits into from
Jan 29, 2025
Merged

Conversation

jvdp1
Copy link
Member

@jvdp1 jvdp1 commented Jan 24, 2025

Here is a proposition for fixing the compilation with cmake 3.31.1 introduced by #913 and mentioned in #922

Fixes #922

@jalvesz @perazz

@jvdp1 jvdp1 requested review from jalvesz and perazz January 24, 2025 17:54
.github/workflows/CI.yml Outdated Show resolved Hide resolved
.github/workflows/CI.yml Outdated Show resolved Hide resolved
src/CMakeLists.txt Outdated Show resolved Hide resolved
src/CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Member

@perazz perazz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @jvdp1. I would wait for @jalvesz's review, as he is the author of that refactor.

@jalvesz
Copy link
Contributor

jalvesz commented Jan 27, 2025

@jvdp1 I installed CMake 3.31.5, and managed to rebuild without problems. I'm wondering if the problem is the generator under your OS Linux Fedora. Do you have Ninja installed? Would you mind double checking by adding -G Ninja to the cmake build?

The PR looks good to me, would just like to know where the issue comes from as indeed I did not see that problem on Windows or Ubuntu.

@perazz
Copy link
Member

perazz commented Jan 28, 2025

On macOS I get (before this PR):

federico@Federicos-MBP stdlib % mkdir build
federico@Federicos-MBP stdlib % cd build 
federico@Federicos-MBP build % cmake ..
-- The Fortran compiler identification is GNU 14.2.0
[...]
-- Build files have been written to: /Users/federico/Documents/GitHub/stdlib/build
federico@Federicos-MBP build % make
[  0%] Generating stdlib_version.f90
[  0%] Generating blas/stdlib_blas.F90
error: Failed to open file '/Users/federico/Documents/GitHub/stdlib/build/src/blas/stdlib_blas.F90' for write [FyppFatalError]
error: [Errno 2] No such file or directory: '/Users/federico/Documents/GitHub/stdlib/build/src/blas/stdlib_blas.F90' [FileNotFoundError]
make[2]: *** [src/blas/stdlib_blas.F90] Error 1
make[1]: *** [src/CMakeFiles/fortran_stdlib.dir/all] Error 2
make: *** [all] Error 2
federico@Federicos-MBP build % cmake --version
cmake version 3.29.2

@jalvesz
Copy link
Contributor

jalvesz commented Jan 28, 2025

Ok, so it seems the generator added some extra layers. I think we can merge this PR, it is much more robust this way! Thank you @jvdp1

@perazz
Copy link
Member

perazz commented Jan 29, 2025

Will merge this as the Intel issue is unrelated to the PR. Thank you @jvdp1 @jalvesz

@perazz perazz merged commit 6ec8cd0 into fortran-lang:master Jan 29, 2025
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake issue since #913
3 participants