facebookresearch / nocturne

A data-driven, fast driving simulator for multi-agent coordination under partial observability.
MIT License
259 stars 29 forks source link

[Question] SFML/Graphics.hpp file not found #61

Open vikrammeyer opened 1 year ago

vikrammeyer commented 1 year ago

I am on macOS Monterey and I have cmake and sfml installed via brew. However when I run, python3 setup.py develop I am getting the fatal error of SFML/Graphics.hpp' file not found. It appears that brew is installing SFML as below:

/usr/local/Cellar/sfml/2.5.1_2
├── INSTALL_RECEIPT.json
├── changelog.md
├── include
│   └── SFML
│       ├── Audio
│       ├── Audio.hpp
│       ├── Config.hpp
│       ├── GpuPreference.hpp
│       ├── Graphics
│       ├── Graphics.hpp
│       ├── Main.hpp
│       ├── Network
│       ├── Network.hpp
│       ├── OpenGL.hpp
│       ├── SFML
│       ├── System
│       ├── System.hpp
│       ├── Window
│       └── Window.hpp
├── lib
│   ├── cmake
│   │   └── SFML
│   ├── libsfml-audio.2.5.1.dylib
│   ├── libsfml-audio.2.5.dylib -> libsfml-audio.2.5.1.dylib
│   ├── libsfml-audio.dylib -> libsfml-audio.2.5.dylib
│   ├── libsfml-graphics.2.5.1.dylib
│   ├── libsfml-graphics.2.5.dylib -> libsfml-graphics.2.5.1.dylib
│   ├── libsfml-graphics.dylib -> libsfml-graphics.2.5.dylib
│   ├── libsfml-network.2.5.1.dylib
│   ├── libsfml-network.2.5.dylib -> libsfml-network.2.5.1.dylib
│   ├── libsfml-network.dylib -> libsfml-network.2.5.dylib
│   ├── libsfml-system.2.5.1.dylib
│   ├── libsfml-system.2.5.dylib -> libsfml-system.2.5.1.dylib
│   ├── libsfml-system.dylib -> libsfml-system.2.5.dylib
│   ├── libsfml-window.2.5.1.dylib
│   ├── libsfml-window.2.5.dylib -> libsfml-window.2.5.1.dylib
│   ├── libsfml-window.dylib -> libsfml-window.2.5.dylib
│   └── pkgconfig
│       ├── sfml-all.pc
│       ├── sfml-audio.pc
│       ├── sfml-graphics.pc
│       ├── sfml-network.pc
│       ├── sfml-system.pc
│       └── sfml-window.pc
├── license.md
├── readme.md
└── share
    └── SFML
        ├── doc
        ├── license.md
        └── readme.md

I ensured /usr/local/lib has the .dylib files for sfml and I manually copied the include directory from the downloaded SFML to /usr/local/include so that SFML/Graphics.hpp exists in there. None of this has worked in getting the project to compile and I am unsure how to proceed. Any tips on how to proceed to get this working?

eugenevinitsky commented 1 year ago

Looking into this, but just to check, did you follow the M1 instructions if you have an M1 chip?

vikrammeyer commented 1 year ago

I have an Intel chip so I did not do any of the M1 instructions. I do not use conda but from my understanding this would not be the issue.

nathanlct commented 1 year ago

I just tried this on my Mac and it worked:

-- Found SFML 2.5.1 in /opt/homebrew/lib/cmake/SFML

Does this path exist for you? If so, do you have the following in your PATH?

> echo $PATH
/opt/homebrew/bin:/opt/homebrew/sbin
vikrammeyer commented 1 year ago

/opt/homebrew/lib/cmake/SFML does not exist for me, in fact /opt/homebrew/ does not even exist for me. I get -- Found SFML 2.5.1 in /usr/local/lib/cmake/SFML