ebu / ear-production-suite

The EAR Production Suite is a set of VST® plugins and tools for producing immersive and personalizable audio content suitable for any Next Generation Audio codec. It is based on the Audio Definition Model (ITU-R BS.2076) and the ITU ADM Renderer (ITU-R BS.2127) and enables monitoring on any ITU-R BS.2051 loudspeaker configuration.
https://ear-production-suite.ebu.io/
GNU General Public License v3.0
102 stars 20 forks source link

CMake Error on Mac (nng file or directory does not exist) #276

Closed yyf closed 3 months ago

yyf commented 7 months ago

Trying to configure EAR 1.0.0 on Mac M1 using cmake --preset macnos-default-arm64 but got nng related error. Has this been fixed? In the log, it complains about nng file or directory referenced by variable NNG_INCLUDE_DIRS does not exist.

firthm01 commented 7 months ago

Hi - thanks for raising. Do you have your full cmake log to hand?

yyf commented 7 months ago

I don't see full log under the Temporary folder? here is the log from terminal:

CMake Error at build/macos-default-arm64/vcpkg_installed/arm64-osx-11_0/share/nng/nng-config.cmake:19 (message):
File or directory
/User/.../ear-production-suite/build/macos-default-arm64/vcpkg_installed/include/nng
referenced by variable NNG_INCLUDE_DIRS does not exist !
Call Stack (most recent call first): 
build/macos-default-arm64/vcpkg_installed/arm64-osx-11_0/share/nng/nng-config.cmake:39 (set_and_check)
submodule/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
CMakeList.txt:48 (find_package)

-- Configuring incomplete, errors occured!
rsjbailey commented 7 months ago

Hi, thanks for reporting the problem & sorry you're having issues. I've just tried a clean checkout/build on my M1 macbook pro and it's built without issue here, so we may need a bit more info to figure out where things are going wrong.

Here's what I did to try and reproduce:

rm -rf ~/.cache/vcpkg # this was just to make sure I didn't have a cached copy of nng hiding the problem, you probably don't need to / shouldn't do this, it'll just slow things down
git clone --recursive https://github.com/ebu/ear-production-suite.git
cd ear-production-suite
./submodules/vcpkg/bootstrap-vcpkg.sh 
cmake --preset macos-default-arm64
cmake --build --preset macos-default-arm64

For reference, I'm on Sonoma 14.4.1 using Apple clang version 15.0.0 (clang-1500.3.9.4) and CMake 3.29.0

Assuming you've done something similar, the cmake logs should live in ear-production-suite/build/macos-default-arm64/CMakeFiles/ For recent CMake versions I think it's called CMakeConfigureLog.yaml, for older versions it's something ending in -log.txt.

If you could attach any build / error logs to this issue, I can see if there's anything that jumps out. Attaching CMakeCache.txt from your build directory (ear-production-suite/build/macos-default-arm64) might also help.

The include path that nng is trying to find looks a bit suspect (ear-production-suite/build/macos-default-arm64/vcpkg_installed/include/nng) as it's missing the vcpkg triplet subdirectory - I'd expect it to be ear-production-suite/build/macos-default-arm64/vcpkg_installed/arm64-osx-11_0/include/nng

Looking at how that variable is defined by the nng cmake config file, I can't see any obvious way for it to go wrong, so probably need a peek at the logs to get any further.

rsjbailey commented 3 months ago

Closing as can't reproduce / no further comms