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

CmakeLists.Txt file is missing #19

Open
marc-shen opened this issue Jun 18, 2024 · 2 comments
Open

CmakeLists.Txt file is missing #19

marc-shen opened this issue Jun 18, 2024 · 2 comments

Comments

@marc-shen
Copy link

In version 2.8, although the cmake compilation scheme has been updated, the CMakeLists.txt file appears in the .gitignore listing. There's no way we can use cmake to do the compilation properly.

# preconfigure the code using
cmake -B build -D user=<USERFILE> -D dim=3 ...

This step requires the CMakeLists.txt file to be executed.

Error message:

% cmake -B build -D user=user_2d_rec.F90 -D dim=2
CMake Error: The source directory "/Users/username/program/GitHub/tristan-mp-v2" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
@haykh
Copy link
Collaborator

haykh commented Jun 19, 2024

My bad, i forgot to add it to .gitignore. now should be available.

@marc-shen
Copy link
Author

I have met some new problems.

COMPILE_FLAGS -mavx2

The compile flag -mavx2 is used on x86.

The Mac m1 is arm64, so that I have to remve the -mavx2 in CMakeLists.txt.

Undefined symbols for architecture arm64

% cmake --build build -j

ld: warning: -commons use_dylibs is no longer supported, using error treatment instead
Undefined symbols for architecture arm64:
  "___m_finalize_MOD_finalizeall", referenced from:
      _main in tristan.F90.o
  "___m_initialize_MOD_initializeall", referenced from:
      _main in tristan.F90.o
  "___m_mainloop_MOD_mainloop", referenced from:
      _main in tristan.F90.o
ld: symbol(s) not found for architecture arm64
collect2: error: ld returned 1 exit status
make[2]: *** [src/tristan-v2.xc] Error 1
make[1]: *** [src/CMakeFiles/tristan-v2.xc.dir/all] Error 2
make: *** [all] Error 2

I'm not sure how to solve this problem. Perhaps the files produced by the compilation are not recognized properly, or the compilation order is wrong.

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

No branches or pull requests

2 participants