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

PSOPT 5.0 MacOS Installation - target_compile_features no known features for CXX compiler #34

Open
Urbanair1 opened this issue Oct 2, 2020 · 8 comments

Comments

@Urbanair1
Copy link

Greetings,

I am unable to install PSOPT in MacOS because of the following error. Please recommend!

(base) ARSLA18090409:build urbanair1$ cmake -DBUILD_EXAMPLES=ON -DCXX=g++-10 -DCC=gcc-10 ..
-- AdolC has not been installed on this system and will be automatically added to this project.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/urbanair1/PSOPT/build/adolc-download
[100%] Built target adolc
CMake Error at CMakeLists.txt:30 (target_compile_features):
target_compile_features no known features for CXX compiler

"AppleClang"

version 10.0.1.10010046.

-- Configuring incomplete, errors occurred!
See also "/Users/urbanair1/PSOPT/build/CMakeFiles/CMakeOutput.log".

@schulz0r
Copy link
Collaborator

schulz0r commented Oct 2, 2020

Try cmake -DBUILD_EXAMPLES=ON CXX=g++-10 CC=gcc-10 ..(CXX and CC without -D).

@Urbanair1
Copy link
Author

Urbanair1 commented Oct 3, 2020 via email

@schulz0r
Copy link
Collaborator

schulz0r commented Oct 5, 2020

I think this problem is not related to PSOPT. I guess this Stackoverflow thread is what you are looking for.

@Urbanair1
Copy link
Author

Urbanair1 commented Oct 5, 2020 via email

@Urbanair1
Copy link
Author

I added the following lines in CMakelists.txt per your recommendation and the previous error was completely resolved:

set(CMAKE_C_COMPILER "/usr/local/Cellar/gcc/10.2.0/bin/gcc-10")
set(CMAKE_CXX_COMPILER "/usr/local/Cellar/gcc/10.2.0/bin/g++-10")

Also, I updated the bash_profile file as follows:
export CXX=/usr/local/Cellar/gcc/10.2.0/bin/g++-10
export CC=/usr/local/Cellar/gcc/10.2.0/bin/gcc-10

However, I observed the following new error:

CMake Error at CMakeLists.txt:34 (target_compile_features):
target_compile_features no known features for CXX compiler

"GNU"

version 10.2.0.

-- Configuring incomplete, errors occurred!

Please help me out if you are aware of the solution!

@schulz0r
Copy link
Collaborator

CMake looks if your compiler supports delegate constructors. Seems like this CMake feature is buggy and does not support GCC 10.2. Try deleting the line with the feature check and see if it works.
Normally, this feature should be included in the C++11 standard, but for some reason, I could not configure the project with just C++11 specified. Maybe you have better luck. I will investigate this problem in the coming days.

@Urbanair1
Copy link
Author

The previously mentioned error went off with the following command:
cmake -DBUILD_EXAMPLES=ON

I am using MACOS - 10.14.6, So I think whatever you recommended me regarding bash_profile and CMakeLists.txt update was correct except for the Cmake command, it does NOT need -DCXX=g++-10 -DCC=gcc-10 ..

Now when I ran $ Make command on the terminal, I got the following new errors:
[ 27%] Linking CXX executable alpine
ld: can't map file, errno=22 file '../../adolc-build/lib64' for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [examples/alpine/alpine] Error 1
make[1]: *** [examples/alpine/CMakeFiles/alpine.dir/all] Error 2
make: *** [all] Error 2

@Urbanair1
Copy link
Author

Urbanair1 commented Oct 13, 2020

Also, not sure if the following bug in ColPack (1.0.10) has been reported:

After performing $ cd ColPack

$ ./configure --prefix=/usr/local
-bash: ./configure: No such file or directory

Thanks!

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