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

Install issues on MacOS #10

Open
ogencoglu opened this issue Jul 30, 2023 · 6 comments
Open

Install issues on MacOS #10

ogencoglu opened this issue Jul 30, 2023 · 6 comments

Comments

@ogencoglu
Copy link

I'm hitting the

        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1.
      [end of output]

error on Mac (in python virtual env to be specific).

Both cmake --version at command line and import cmake in python works: cmake version 3.27.0

Do you have any tips for adjusting the setup.py for Mac?

@iago-suarez
Copy link
Owner

Hii, thanks for your interest and sorry for late reply, I was on vacation.

I have never tried it on Mac, but it should work in theory. The error seems to be that something is wrong during the compilation of the C++ part. Could you try to compile only the C++ part using cmake. The instructions are the following (tested on ubuntu):

mkdir build && cd build
cmake .. && make
./elsed_main

This will probably throw a new error. Please paste it here.

@ogencoglu
Copy link
Author

Thanks for your reply.

Running cmake .. && make result in:

CMake Error at CMakeLists.txt:25 (add_subdirectory):
  The source directory

    /mydir/ELSED/ELSED-main/pybind11

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:26 (pybind11_add_module):
  Unknown CMake command "pybind11_add_module".

pybind is indeed an empty directory. I am not sure why pybind would be needed for C++ part. Any ideas?

@iago-suarez
Copy link
Owner

iago-suarez commented Aug 27, 2023 via email

@fidel-schaposnik
Copy link

I have a similar issue when trying to install in Amazon's DeepLearning AMI (Ubuntu). The original error when running cmake, i.e.

Unknown CMake command "pybind11_add_module"

is indeed resolved by

git submodule update --init --recursive pybind11

However, after successfully running cmake and trying make I get

undefined reference to `std::condition_variable::wait(std::unique_lock::mutex>&)@GLIBCXX_3.4.30'

Looks like a C++ compiler-version error, any ideas how to fix it?

@cvtower
Copy link

cvtower commented Oct 7, 2023

same error on mac here.
however, it works fine in my ubuntu env.

@iago-suarez
Copy link
Owner

Hi,

It is a bit of a hard problem to reproduce for me. I have found this solution in StackOverflow, can some of you try to force the standard library to be ibstdc++.

You can do it by running:

mkdir build && cd build
LDFLAGS="-stdlib=libstdc++" cmake .. && make
./elsed_main

I hope this helps :)

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

4 participants