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

make process error... #24

Closed
hanyun2019 opened this issue Sep 3, 2019 · 11 comments
Closed

make process error... #24

hanyun2019 opened this issue Sep 3, 2019 · 11 comments

Comments

@hanyun2019
Copy link

When I use "make -j$(nproc)" to make, some errors display as the follows:

In file included from /Users/user/documents/deeplearning/open_spiel/open_spiel/abseil-cpp/absl/random/internal/randen_slow.cc:21:
/Users/user/documents/deeplearning/open_spiel/open_spiel/abseil-cpp/absl/random/internal/platform.h:165:48: error:
'TARGET_OS_IPHONE_SIMULATOR' is not defined, evaluates to 0 [-Werror,-Wundef]
#if defined(APPLE) && (TARGET_OS_IPHONE || TARGET_OS_IPHONE_SIMULATOR)

[ 8%] Built target absl_leak_check_disable
In file included from /Users/user/documents/deeplearning/open_spiel/open_spiel/abseil-cpp/absl/random/internal/randen_hwaes.cc:26:
/Users/user/documents/deeplearning/open_spiel/open_spiel/abseil-cpp/absl/random/internal/platform.h:165:48: error:
'TARGET_OS_IPHONE_SIMULATOR' is not defined, evaluates to 0 [-Werror,-Wundef]
#if defined(APPLE) && (TARGET_OS_IPHONE || TARGET_OS_IPHONE_SIMULATOR)
...

Please give some help. Thanks a lot.

@lanctot
Copy link
Collaborator

lanctot commented Sep 3, 2019

What platform are you building on?

If MacOS it might be because nproc is not defined in MacOS, and maybe try the fixes discussed in #2

@hanyun2019
Copy link
Author

hanyun2019 commented Sep 4, 2019 via email

@lanctot
Copy link
Collaborator

lanctot commented Sep 4, 2019

Did you try read the discussion in the link I posted to fix the issue with nproc not being defined on MacOS?

@hanyun2019
Copy link
Author

hanyun2019 commented Sep 4, 2019

Sorry. I cannot find the "build_and_run_tests.sh" file and "scripts" directory:
image

I just follow these steps:

  1. Run ./install.sh
  2. virtualenv -p python3 venv
    source venv/bin/activate
    pip3 install -r requirements.txt
  3. mkdir build
    cd build
  4. CXX=g++ cmake -DPython_TARGET_VERSION=3.6 -DCMAKE_CXX_COMPILER=${CXX} ../open_spiel
  5. make -j$(nproc)
    ...

When I input the step 5 "make -j$(nproc)", the mistake happens...

@hanyun2019 hanyun2019 reopened this Sep 4, 2019
@hanyun2019
Copy link
Author

Sorry, re-open it for help. thanks~

@lanctot
Copy link
Collaborator

lanctot commented Sep 4, 2019

Did you look at the link I posted in my first reply? nproc is not defined in MacOS.

Can you try:

make -j12

@hanyun2019
Copy link
Author

hanyun2019 commented Sep 4, 2019

When I try:

make -j12

Some error occurs:
In file included from /Users/user/documents/deeplearning/open_spiel/open_spiel/abseil-cpp/absl/random/internal/randen_hwaes.cc:26:
/Users/user/documents/deeplearning/open_spiel/open_spiel/abseil-cpp/absl/random/internal/platform.h:165:48: error: In file included from /Users/user/documents/deeplearning/open_spiel/open_spiel/abseil-cpp/absl/random/internal/randen_slow.cc:21:
/Users/user/documents/deeplearning/open_spiel/open_spiel/abseil-cpp/absl/random/internal/platform.h:165:48: error:
'TARGET_OS_IPHONE_SIMULATOR' is not defined, evaluates to 0 [-Werror,-Wundef]
#if defined(APPLE) && (TARGET_OS_IPHONE || TARGET_OS_IPHONE_SIMULATOR)
^

  'TARGET_OS_IPHONE_SIMULATOR' is not defined, evaluates to 0 [-Werror,-Wundef]

#if defined(APPLE) && (TARGET_OS_IPHONE || TARGET_OS_IPHONE_SIMULATOR)
^
1 error generated.
...

@lanctot
Copy link
Collaborator

lanctot commented Sep 4, 2019

I see. Unfortunately we are unable to officially support MacOS at the moment, but maybe someone else will have the same issue and post a fix.

Meanwhile, I suggest you take a look at the following pull request which has some fixes for MacOS and links to several comments on building in MacOS: #6

@hanyun2019
Copy link
Author

OK. Thanks a lot~

@OpenSpiel
Copy link
Collaborator

Hi. Thanks for your report.

I merged #6 which was suggesting a Fix to build on MacOS.

Can you check if it works for you? If not, I would encourage you to send a contribution, as no developer is using Mac (so we it is low priority for DeepMind developers).

I will mark the bug as fixed, assuming the PR was enough, given 2 persons build on macOS, but feel free to reopen with the new kind of errors you have.

@hanyun2019
Copy link
Author

It's OK now. 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

3 participants