Configuration error

105 views
Skip to first unread message

Giselle Sosa Jones

unread,
Oct 3, 2023, 6:15:01 PM10/3/23
to deal.II User Group
Hello,

I am trying to configure deal II with options:

cmake -DDEAL_II_WITH_PETSC=ON -DCMAKE_INSTALL_PREFIX=/Users/gisellesosajones/Documents/deal_ii_95 -DPETSC_DIR=$PETSC_DIR -DPETSC_ARCH=$PETSC_ARCH -DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_HDF5=OFF


I am getting this error

CMake Error at cmake/setup_finalize.cmake:126 (message):

  


    Configuration error: Cannot compile a test program with the final set of

    compiler and linker flags:

      CXX flags (DEBUG): -openmp-simd -ftemplate-depth=1024 -ffp-exception-behavior=strict -Og -ggdb -Wa,--compress-debug-sections

      LD flags  (DEBUG):  -ggdb

      LIBRARIES (DEBUG): ;


Could it be related to my PETSc installation?

Thank you in advance.

Wolfgang Bangerth

unread,
Oct 3, 2023, 8:12:08 PM10/3/23
to dea...@googlegroups.com
It could be, but it's futile to speculate without seeing the actual error
message. Can you look into CMakeFiles/CMakeError.txt and search for "Cannot
compile a test program with the final set of compiler and linker flags"? Above
or below, you should then probably find what the compiler is complaining about.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Giselle Sosa Jones

unread,
Oct 3, 2023, 9:45:01 PM10/3/23
to dea...@googlegroups.com
I do not have this file in my CMakeFiles directory. I was looking for it in the other directories, but could not find it...

Thank you for your help.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/e32090e0-4df2-2ee4-ff7f-2563a5b52f17%40colostate.edu.

Wolfgang Bangerth

unread,
Oct 4, 2023, 12:39:20 AM10/4/23
to dea...@googlegroups.com
On 10/3/23 19:44, Giselle Sosa Jones wrote:
> **
>
> I do not have this file in my CMakeFiles directory. I was looking for it in
> the other directories, but could not find it...

At least with my version of cmake (version 3.22), errors are written into
CMakeFiles/CMakeError.log in the directory where you called cmake. (In my
previous email, I had a file suffix of .txt, but it is really .log.) If you
have a different cmake version, perhaps the error is elsewhere -- you'll have
to search through files to see where compiler errors are recorded.

I'm afraid there is little anyone can say about the specific reason why it
doesn't work for you without that information :-(

Best
Wolfgang

Florian Schulze

unread,
Oct 4, 2023, 4:41:17 AM10/4/23
to dea...@googlegroups.com
Hello,

I get the same configuration error. I don’t find the CMakeError file either (maybe it is switched off with a flag?), but can give a few more details from the CMake output.

I use a similar deal.II configuration: (cmake -DDEAL_II_CXX_FLAGS=-std=c++17 -DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_HDF5=ON -DDEAL_II_WITH_PETSC=ON -DPETSC_DIR=$PETSC_DIR -DPETSC_ARCH=arch-darwin-c-debug -DDEAL_II_WITH_SLEPC=ON -DSLEPC_DIR=$SLEPC_DIR -DDEAL_II_WITH_P4EST=ON -DP4EST_DIR=$P4EST_DIR)
I get the following output (shortened a bit, if anything is missing let me know!):

[…]

/opt/homebrew/Cellar/cmake/3.27.6/bin/cmake -E cmake_link_script CMakeFiles/CheckCompilerSetupExec.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/c++ -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk [....]
ld: warning: ignoring duplicate libraries: '-ldl', '-lm', '/Users/flo/.local/lib/petsc/arch-darwin-c-debug/lib/libdmumps.a', '/Users/flo/.local/lib/petsc/arch-darwin-c-debug/lib/libmumps_common.a', '/Users/flo/.local/lib/petsc/arch-darwin-c-debug/lib/libpord.a', '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13/libemutls_w.a'
ld: warning: duplicate LC_RPATH are deprecated ('/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13')
ld: warning: duplicate LC_RPATH are deprecated ('/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc')
ld: warning: duplicate LC_RPATH are deprecated ('/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current')
ld: warning: duplicate LC_RPATH are deprecated ('/Users/flo/.local/lib/petsc/arch-darwin-c-debug/lib')
ld: warning: duplicate LC_RPATH are deprecated ('/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13')
ld: warning: duplicate LC_RPATH are deprecated ('/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc')
ld: warning: duplicate LC_RPATH are deprecated ('/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current')
ld: warning: duplicate LC_RPATH are deprecated ('/Users/flo/.local/lib/petsc/arch-darwin-c-debug/lib')
ld: multiple errors: duplicate LC_RPATH '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13' in '/Users/flo/.local/lib/petsc/arch-darwin-c-debug/lib/libscalapack.2.2.1.dylib'; duplicate LC_RPATH '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13' in '/Users/flo/.local/lib/petsc/arch-darwin-c-debug/lib/libscalapack.2.2.1.dylib'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [CMakeFiles/CheckCompilerSetupExec.dir/build.make:167: CheckCompilerSetupExec] Error 1
gmake[2]: Leaving directory '/Users/flo/Documents/PhD/Code/sapphire/dealii-9.5.1/build/check_compiler_setup/DEAL_II_HAVE_USABLE_FLAGS_DEBUG'
gmake[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/CheckCompilerSetupExec.dir/all] Error 2
gmake[1]: Leaving directory '/Users/flo/Documents/PhD/Code/sapphire/dealii-9.5.1/build/check_compiler_setup/DEAL_II_HAVE_USABLE_FLAGS_DEBUG'
gmake: *** [Makefile:94: all] Error 2


CMake Error at cmake/setup_finalize.cmake:126 (message):


Configuration error: Cannot compile a test program with the final set of
compiler and linker flags:
CXX flags (DEBUG): -openmp-simd -ftemplate-depth=1024 -std=c++17 -ffp-exception-behavior=strict -Og -ggdb -Wa,--compress-debug-sections
LD flags (DEBUG): -ggdb
LIBRARIES (DEBUG): ;




Call Stack (most recent call first):
cmake/macros/macro_verbose_include.cmake:19 (include)
CMakeLists.txt:123 (verbose_include)


-- Configuring incomplete, errors occurred!



Some details on my setup: I use MacOS 14.0 (just updated) on a M1 MacBook (arm64-apple-darwin23.0.0). My compiler is the `CommandLineTools` clang compiler (Apple clang version 15.0.0). I installed gcc-13, cmake (and some packages) with home-brew.
PETSc-v3.20.0, SLEPc-v3.20.0 and p4est-v2.8.5 installed in '~/.local/lib‘. I try to compile the deal.II version 9.5.1.

I hope this gives sufficient information, and we are able to identify the problem (probably either with PETSc or the linking of libraries).

Thank you in advance!

Best,
Florian
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
> --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/b63f1dc3-fd50-456d-1ed1-60fbc318adbc%40colostate.edu.

Giselle Sosa Jones

unread,
Oct 4, 2023, 7:04:51 AM10/4/23
to dea...@googlegroups.com
Hello,

It turns out that cmake 3.27 has a different log file called CMakeConfigureLog.yaml. However, I could not find the error message in there.

My output is very similar to Florian (at least the last part where the configuration error is displayed), and I also have a lot of those warnings for duplicate paths.

Thank you,
Giselle

You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/Nbr5p4mGXlU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/C7D05C96-9941-4BE7-A3B2-307042559677%40googlemail.com.

Wolfgang Bangerth

unread,
Oct 5, 2023, 12:15:57 AM10/5/23
to dea...@googlegroups.com
On 10/4/23 05:04, Giselle Sosa Jones wrote:
>
> It turns out that cmake 3.27 has a different log file
> called CMakeConfigureLog.yaml. However, I could not find the error message in
> there.
>
> My output is very similar to Florian (at least the last part where the
> configuration error is displayed), and I also have a lot of those warnings for
> duplicate paths.

It's very difficult to say for sure what is going wrong without seeing what
cmake says. You'll have to send the .yaml output file for others to inspect if
you want us to give you feedback.

That said, I see that you are on a Mac. Did you try using the .dmg files
linked to from the download page of deal.II?
Reply all
Reply to author
Forward
0 new messages