imogen icon indicating copy to clipboard operation
imogen copied to clipboard

Fails to build on NixOS

Open magnetophon opened this issue 3 years ago • 3 comments

First of all: thanks for this wonderfull project, I can't wait to make music with it!

Unfortunately, it fails to build on NixOS, I get:

nix-env -f $NIXPKGS -iA imogen  --max-jobs 8 --builders ''

installing 'imogen-unstable-2021-11-07'

this derivation will be built:
  /nix/store/1daiiidqfcr40ks5zrp33y6ffz14b533-imogen-unstable-2021-11-07.drv
building '/nix/store/1daiiidqfcr40ks5zrp33y6ffz14b533-imogen-unstable-2021-11-07.drv'...
unpacking sources
unpacking source archive /nix/store/9pcdd4497wryd4rqxajnq64j5b2j8205-source
source root is source
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/share/doc/Imogen -DCMAKE_INSTALL_INFODIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/include -DCMAKE_INSTALL_SBINDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/xiq6j4jsyj351p8q3yw9cg1hdqp9m685-gcc-wrapper-10.3.0/bin/strip -DCMAKE_RANLIB=/nix/store/lbxfixyw1yk099pjyaiy3xj5dl7kxm1g-binutils-2.35.2/bin/ranlib -DCMAKE_AR=/nix/store/lbxfixyw1yk099pjyaiy3xj5dl7kxm1g-binutils-2.35.2/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/6p7vxzzqscx514mfha3h6s02kbpzva5r-imogen-unstable-2021-11-07
-- The CXX compiler identification is GNU 10.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/xiq6j4jsyj351p8q3yw9cg1hdqp9m685-gcc-wrapper-10.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at GetLemons/CMakeLists.txt:13 (CPMAddPackage):
  Unknown CMake command "CPMAddPackage".


-- Configuring incomplete, errors occurred!
See also "/build/source/build/CMakeFiles/CMakeOutput.log".
error: builder for '/nix/store/1daiiidqfcr40ks5zrp33y6ffz14b533-imogen-unstable-2021-11-07.drv' failed with exit code 1;
       last 10 log lines:
       > -- Detecting CXX compiler ABI info - done
       > -- Check for working CXX compiler: /nix/store/xiq6j4jsyj351p8q3yw9cg1hdqp9m685-gcc-wrapper-10.3.0/bin/g++ - skipped
       > -- Detecting CXX compile features
       > -- Detecting CXX compile features - done
       > CMake Error at GetLemons/CMakeLists.txt:13 (CPMAddPackage):
       >   Unknown CMake command "CPMAddPackage".
       >
       >
       > -- Configuring incomplete, errors occurred!
       > See also "/build/source/build/CMakeFiles/CMakeOutput.log".
       For full logs, run 'nix log /nix/store/1daiiidqfcr40ks5zrp33y6ffz14b533-imogen-unstable-2021-11-07.drv'.

PS: I made a somewhat related program, that might interest you: https://magnetophon.github.io/VoiceOfFaust

magnetophon avatar Dec 24 '21 19:12 magnetophon

I wouldn't be surprised if this project currently fails to build on every OS. I've been working on the shared library of utilities that Imogen is built on top of, and I haven't updated the Imogen repo itself in a while. I'll comment back here once Imogen is in a more stable state.

benthevining avatar Dec 25 '21 05:12 benthevining

Thank you!

magnetophon avatar Dec 25 '21 06:12 magnetophon

Can confirm that building also fails on MacOS, even after trying multiple version of Lemons.

My environment:

MacOS Catalina v10.15.7
cmake version 3.22.3
Doxygen version 1.9.3

I modified AddLemons.cmake (see fork branch) to be able to pass in LEMONS_GIT_TAG so I could build against a past version of Lemons, since I noticed it had been updated a lot since the last commit to this repo.

I tried building against a few different versions.

  1. First, the original behavior, origin/main:
rm -rf Builds Cache && LEMONS_GIT_TAG=origin/main cmake -B Builds .

fails with

CMake Error at Cache/limes-src/libs/CMakeLists.txt:16 (include):
  include could not find requested file:

    LemonsCmakeDevTools


CMake Error at Cache/limes-src/libs/limes_vecops/CMakeLists.txt:11 (include):
  include could not find requested file:

    LemonsDefaultProjectSettings


CMake Error at Cache/limes-src/libs/limes_core/CMakeLists.txt:11 (include):
  include could not find requested file:

    LemonsDefaultProjectSettings


CMake Error at Cache/limes-src/libs/limes_audio/CMakeLists.txt:11 (include):
  include could not find requested file:

    LemonsDefaultProjectSettings


CMake Error at Cache/limes-src/libs/limes_music/CMakeLists.txt:11 (include):
  include could not find requested file:

    LemonsDefaultProjectSettings

etc...
  1. With the latest release:
rm -rf Builds Cache && LEMONS_GIT_TAG=v2.5.1 cmake -B Builds .

fails with:

CMake Error at Cache/juce/0481a040513d58396442b27384bde9dd888fa425/extras/Build/CMake/JUCEUtils.cmake:1663 (add_library):
  CMake doesn't support IPO for current compiler
Call Stack (most recent call first):
  CMakeLists.txt:46 (juce_add_plugin)
  1. With the latest v1 release:
rm -rf Builds Cache && LEMONS_GIT_TAG=v1.26.1 cmake -B Builds .

succeeds! But then

cd Builds && make

fails with:

In file included from /Users/mark/dev/imogen/Source/modules/imogen_state/state/Parameters.h:4:
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:9:2: error: unknown type name 'ToggleParam'
        ToggleParam eqToggle { "EQ toggle", false };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:11:2: error: unknown type name 'HzParam'
        HzParam    eqLowShelfFreq { "EQ low shelf freq", 80.f };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:12:2: error: unknown type name 'FloatParam'
        FloatParam eqLowShelfQ { 0.01f, 10.f, 0.707f, "EQ low shelf Q" };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:13:2: error: unknown type name 'FloatParam'
        FloatParam eqLowShelfGain { 0.f, 4.f, 1.f, "EQ low shelf gain" };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:15:2: error: unknown type name 'HzParam'
        HzParam    eqHighShelfFreq { "EQ high shelf freq", 80.f };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:16:2: error: unknown type name 'FloatParam'
        FloatParam eqHighShelfQ { 0.01f, 10.f, 0.707f, "EQ high shelf Q" };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:17:2: error: unknown type name 'FloatParam'
        FloatParam eqHighShelfGain { 0.f, 4.f, 1.f, "EQ high shelf gain" };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:19:2: error: unknown type name 'HzParam'
        HzParam    eqHighPassFreq { "EQ high pass freq", 80.f };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:20:2: error: unknown type name 'FloatParam'
        FloatParam eqHighPassQ { 0.01f, 10.f, 0.707f, "EQ high pass Q" };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:22:2: error: unknown type name 'HzParam'
        HzParam    eqPeakFreq { "EQ peak freq", 80.f };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:23:2: error: unknown type name 'FloatParam'
        FloatParam eqPeakQ { 0.01f, 10.f, 0.707f, "EQ peak Q" };
        ^
/Users/mark/dev/imogen/Source/modules/imogen_state/state/sublists/EQState.h:24:2: error: unknown type name 'FloatParam'
        FloatParam eqPeakGain { 0.f, 4.f, 1.f, "EQ peak gain" };

etc...

I can't figure out where these *Param type names are defined — I checked older versions of this library and lemons via GitHub search but wasn't successful.

@benthevining, I'd love to build this library, test it out, and help contribute to its development. Any tips on getting a build working? Thanks!

farkmarnum avatar Mar 17 '22 17:03 farkmarnum