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

Unable to build on NixOS #21

Closed
magnetophon opened this issue Dec 24, 2021 · 2 comments
Closed

Unable to build on NixOS #21

magnetophon opened this issue Dec 24, 2021 · 2 comments

Comments

@magnetophon
Copy link

First of all, thanks for this wonderful project.
The video and docs look really appealing, can't wait to make music with this!

Unfortunately, I'm unable to build it on NixOS.
I get the following build output:

nix-env -f $NIXPKGS -iA loopers  --max-jobs 8 --builders '' --show-trace
installing 'loopers-0.2.0'
this derivation will be built:
  /nix/store/gn4ca81s3zppyg3xahj7xh338c3w1234-loopers-0.2.0.drv
building '/nix/store/gn4ca81s3zppyg3xahj7xh338c3w1234-loopers-0.2.0.drv'...
unpacking sources
unpacking source archive /nix/store/9alflm8bv1pn9z18b264xz1hayxdakwh-source
source root is source
Executing cargoSetupPostUnpackHook
unpacking source archive /nix/store/syysm2y64cfq04jmy2hwbz3cisp6yb72-loopers-0.2.0-vendor.tar.gz
Finished cargoSetupPostUnpackHook
patching sources
Executing cargoSetupPostPatchHook
Validating consistency between /build/source//Cargo.lock and /build/loopers-0.2.0-vendor.tar.gz/Cargo.lock
Finished cargoSetupPostPatchHook
configuring
building
Executing cargoBuildHook
++ env CC_x86_64-unknown-linux-gnu=/nix/store/xiq6j4jsyj351p8q3yw9cg1hdqp9m685-gcc-wrapper-10.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/xiq6j4jsyj351p8q3yw9cg1hdqp9m685-gcc-wrapper-10.3.0/bin/c++ CC_x86_64-unknown-linux-gnu=/nix/store/xiq6j4jsyj351p8q3yw9cg1hdqp9m685-gcc-wrapper-10.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/xiq6j4jsyj351p8q3yw9cg1hdqp9m685-gcc-wrapper-10.3.0/bin/c++ cargo build -j 8 --target x86_64-unknown-linux-gnu --frozen --release
   Compiling libc v0.2.100
   Compiling proc-macro2 v1.0.28
   Compiling memchr v2.4.1
   Compiling unicode-xid v0.2.2
   Compiling cfg-if v1.0.0
   Compiling log v0.4.14
   Compiling autocfg v1.0.1
   Compiling syn v1.0.75
   Compiling serde_derive v1.0.128
   Compiling serde v1.0.128
   Compiling cc v1.0.69
   Compiling ryu v1.0.5
   Compiling lazy_static v1.4.0
   Compiling spin v0.5.2
   Compiling untrusted v0.7.1
   Compiling radium v0.5.3
   Compiling once_cell v1.8.0
   Compiling tinyvec_macros v0.1.0
   Compiling glob v0.3.0
   Compiling serde_json v1.0.66
   Compiling version_check v0.9.3
   Compiling wyz v0.2.0
   Compiling matches v0.1.9
   Compiling funty v1.1.0
   Compiling tap v1.0.1
   Compiling unicode-width v0.1.8
   Compiling unicode-bidi v0.3.6
   Compiling regex-syntax v0.6.25
   Compiling percent-encoding v2.1.0
   Compiling crc32fast v1.2.1
   Compiling ansi_term v0.11.0
   Compiling bindgen v0.59.1
   Compiling khronos_api v3.1.0
   Compiling termcolor v1.1.2
   Compiling strsim v0.8.0
   Compiling adler v1.0.2
   Compiling crossbeam-utils v0.8.5
   Compiling base64 v0.13.0
   Compiling bitflags v1.3.2
   Compiling humantime v2.1.0
   Compiling vec_map v0.8.2
   Compiling version-compare v0.0.10
   Compiling cfg-if v0.1.10
   Compiling ppv-lite86 v0.2.10
   Compiling unicode-segmentation v1.8.0
   Compiling lazycell v1.3.0
   Compiling itoa v0.4.7
   Compiling shlex v1.0.0
   Compiling peeking_take_while v0.1.2
   Compiling rustc-hash v1.1.0
   Compiling chunked_transfer v1.4.0
   Compiling regex-automata v0.1.10
   Compiling xml-rs v0.8.4
   Compiling crossbeam-queue v0.3.2
   Compiling convert_case v0.4.0
   Compiling remove_dir_all v0.5.3
   Compiling arrayvec v0.7.1
   Compiling sdl2 v0.34.5
   Compiling bytes v1.0.1
   Compiling hound v3.4.0
   Compiling either v1.6.1
   Compiling byteorder v1.4.3
   Compiling futures v0.1.31
   Compiling libloading v0.6.7
   Compiling tinyvec v1.3.1
   Compiling miniz_oxide v0.4.4
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling atomic v0.5.0
   Compiling textwrap v0.11.0
   Compiling form_urlencoded v1.0.1
   Compiling nom v6.1.2
   Compiling clang-sys v1.0.1
   Compiling sdl2-sys v0.34.5
   Compiling ring v0.16.20
   Compiling tinyfiledialogs v3.8.3
   Compiling heck v0.3.3
   Compiling itertools v0.10.1
   Compiling unicode-normalization v0.1.19
   Compiling fern v0.6.0
   Compiling aho-corasick v0.7.18
   Compiling csv-core v0.1.10
   Compiling getrandom v0.2.3
   Compiling dirs-sys v0.3.6
   Compiling time v0.1.43
   Compiling jack-sys v0.2.2
   Compiling iovec v0.1.4
   Compiling atty v0.2.14
   Compiling xattr v0.2.2
   Compiling which v3.1.1
   Compiling filetime v0.2.15
   Compiling bitvec v0.19.5
   Compiling quote v1.0.9
   Compiling gl_generator v0.14.0
   Compiling crossbeam-channel v0.5.1
   Compiling idna v0.2.3
   Compiling regex v1.5.4
   Compiling flate2 v1.0.20
   Compiling rand_core v0.6.3
   Compiling dirs v3.0.2
   Compiling dirs v2.0.2
   Compiling bytes v0.4.12
   Compiling jack v0.7.1
   Compiling clap v2.33.3
   Compiling tar v0.4.37
   Compiling gl v0.14.0
   Compiling url v2.2.2
   Compiling rand_chacha v0.3.1
   Compiling env_logger v0.8.4
   Compiling webpki v0.21.4
   Compiling sct v0.6.1
   Compiling chrono v0.4.19
   Compiling rand v0.8.4
   Compiling webpki-roots v0.21.1
   Compiling cexpr v0.5.0
   Compiling rustls v0.19.1
   Compiling tempfile v3.2.0
   Compiling ureq v2.1.1
   Compiling derive_more v0.99.16
   Compiling bstr v0.2.16
   Compiling toml v0.5.8
   Compiling csv v1.1.6
   Compiling loopers-common v0.2.0 (/build/source/loopers-common)
   Compiling skia-bindings v0.41.0
   Compiling loopers-engine v0.2.0 (/build/source/loopers-engine)
error: failed to run custom build command for `skia-bindings v0.41.0`

Caused by:
  process didn't exit successfully: `/build/source/target/release/build/skia-bindings-50ce9445063d0674/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=SKIA_DEBUG
  cargo:rerun-if-env-changed=SKIA_SOURCE_DIR
  cargo:rerun-if-env-changed=SKIA_LIBRARY_SEARCH_PATH
  STARTING OFFLINE BUILD
  HOST: x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=OPT_LEVEL
  cargo:rerun-if-env-changed=CC
  cargo:rerun-if-env-changed=CXX
  cargo:rerun-if-env-changed=SKIA_USE_SYSTEM_LIBRARIES
  cargo:rerun-if-env-changed=SDKROOT
  cargo:rerun-if-env-changed=SKIA_NINJA_COMMAND
  cargo:rerun-if-env-changed=SKIA_GN_COMMAND
  Probing 'python'
  Python 2 found: "python"
  Skia args: is_official_build=true is_debug=false skia_enable_gpu=true skia_use_gl=true skia_use_egl=false skia_use_x11=true skia_use_system_libpng=false skia_use_libwebp_encode=false skia_use_libwebp_decode=false skia_use_system_zlib=false skia_use_xps=false skia_use_dng_sdk=false cc="clang" cxx="clang++" skia_use_icu=false skia_use_system_libjpeg_turbo=false target_os="linux" target_cpu="x86_64" skia_use_expat=true skia_use_system_expat=false extra_cflags=["-O3","--target=x86_64-unknown-linux-gnu"] extra_asmflags=["--target=x86_64-unknown-linux-gnu"]
  Done. Made 76 targets from 28 files in 106ms
  ninja: Entering directory `/build/source/target/x86_64-unknown-linux-gnu/release/build/skia-bindings-cd8da1efe10dd65c/out/skia'
  [1/909] stamp obj/android_utils.stamp
  [2/909] stamp obj/arm64.stamp
  [3/909] stamp obj/armv7.stamp
  [4/909] stamp obj/compile_processors.stamp
  [5/909] stamp obj/compile_sksl_fp_tests.stamp
  [6/909] stamp obj/compile_sksl_glsl_nosettings_tests.stamp
  [7/909] stamp obj/compile_sksl_glsl_tests.stamp
  [8/909] stamp obj/compile_sksl_metal_tests.stamp
  [9/909] compile ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/opts/SkOpts_avx.cpp
  FAILED: obj/src/opts/avx.SkOpts_avx.o
  clang++ -MD -MF obj/src/opts/avx.SkOpts_avx.o.d -DNDEBUG -DSK_R32_SHIFT=16 -DSK_GAMMA_APPLY_TO_A8 -DSKIA_IMPLEMENTATION=1 -I../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source -mavx -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -O3 -fdata-sections -ffunction-sections -O3 --target=x86_64-unknown-linux-gnu -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/opts/SkOpts_avx.cpp -o obj/src/opts/avx.SkOpts_avx.o
  /bin/sh: clang++: not found
  [10/909] stamp obj/compile_sksl_skvm_tests.stamp
  [11/909] stamp obj/compile_sksl_spirv_tests.stamp
  [12/909] stamp obj/crc32.stamp
  [13/909] stamp obj/dehydrate_sksl.stamp
  [14/909] compile ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontConfigInterface.cpp
  FAILED: obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface.o
  clang++ -MD -MF obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface.o.d -DNDEBUG -DSK_R32_SHIFT=16 -DSK_GAMMA_APPLY_TO_A8 -DSKIA_IMPLEMENTATION=1 -I../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -O3 -fdata-sections -ffunction-sections -O3 --target=x86_64-unknown-linux-gnu -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontConfigInterface.cpp -o obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface.o
  /bin/sh: clang++: not found
  [15/909] compile ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontConfigInterface_direct.cpp
  FAILED: obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface_direct.o
  clang++ -MD -MF obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface_direct.o.d -DNDEBUG -DSK_R32_SHIFT=16 -DSK_GAMMA_APPLY_TO_A8 -DSKIA_IMPLEMENTATION=1 -I../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -O3 -fdata-sections -ffunction-sections -O3 --target=x86_64-unknown-linux-gnu -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontConfigInterface_direct.cpp -o obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface_direct.o
  /bin/sh: clang++: not found
  [16/909] compile ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontConfigInterface_direct_factory.cpp
  FAILED: obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface_direct_factory.o
  clang++ -MD -MF obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface_direct_factory.o.d -DNDEBUG -DSK_R32_SHIFT=16 -DSK_GAMMA_APPLY_TO_A8 -DSKIA_IMPLEMENTATION=1 -I../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -O3 -fdata-sections -ffunction-sections -O3 --target=x86_64-unknown-linux-gnu -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontConfigInterface_direct_factory.cpp -o obj/src/ports/fontmgr_FontConfigInterface.SkFontConfigInterface_direct_factory.o
  /bin/sh: clang++: not found
  [17/909] compile ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontMgr_FontConfigInterface.cpp
  FAILED: obj/src/ports/fontmgr_FontConfigInterface.SkFontMgr_FontConfigInterface.o
  clang++ -MD -MF obj/src/ports/fontmgr_FontConfigInterface.SkFontMgr_FontConfigInterface.o.d -DNDEBUG -DSK_R32_SHIFT=16 -DSK_GAMMA_APPLY_TO_A8 -DSKIA_IMPLEMENTATION=1 -I../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -O3 -fdata-sections -ffunction-sections -O3 --target=x86_64-unknown-linux-gnu -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontMgr_FontConfigInterface.cpp -o obj/src/ports/fontmgr_FontConfigInterface.SkFontMgr_FontConfigInterface.o
  /bin/sh: clang++: not found
  [18/909] compile ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontMgr_android.cpp
  FAILED: obj/src/ports/fontmgr_android.SkFontMgr_android.o
  clang++ -MD -MF obj/src/ports/fontmgr_android.SkFontMgr_android.o.d -DNDEBUG -DSK_R32_SHIFT=16 -DSK_GAMMA_APPLY_TO_A8 -DSKIA_IMPLEMENTATION=1 -DXML_STATIC -I../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -O3 -fdata-sections -ffunction-sections -O3 --target=x86_64-unknown-linux-gnu -isystem /nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/third_party/externals/expat/expat/lib -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontMgr_android.cpp -o obj/src/ports/fontmgr_android.SkFontMgr_android.o
  /bin/sh: clang++: not found
  ninja: build stopped: subcommand failed.

  --- stderr
  thread 'main' panicked at '`ninja` returned an error, please check the output for details.', /build/loopers-0.2.0-vendor.tar.gz/skia-bindings/build_support/skia/config.rs:388:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
error: builder for '/nix/store/gn4ca81s3zppyg3xahj7xh338c3w1234-loopers-0.2.0.drv' failed with exit code 101;
       last 10 log lines:
       >   FAILED: obj/src/ports/fontmgr_android.SkFontMgr_android.o
       >   clang++ -MD -MF obj/src/ports/fontmgr_android.SkFontMgr_android.o.d -DNDEBUG -DSK_R32_SHIFT=16 -DSK_GAMMA_APPLY_TO_A8 -DSKIA_IMPLEMENTATION=1 -DXML_STATIC -I../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -O3 -fdata-sections -ffunction-sections -O3 --target=x86_64-unknown-linux-gnu -isystem /nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/third_party/externals/expat/expat/lib -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../../../../../../../../nix/store/z2g04w32m41h43kjmfj0k1c07hpmc6f9-source/src/ports/SkFontMgr_android.cpp -o obj/src/ports/fontmgr_android.SkFontMgr_android.o
       >   /bin/sh: clang++: not found
       >   ninja: build stopped: subcommand failed.
       >
       >   --- stderr
       >   thread 'main' panicked at '`ninja` returned an error, please check the output for details.', /build/loopers-0.2.0-vendor.tar.gz/skia-bindings/build_support/skia/config.rs:388:5
       >   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       > warning: build failed, waiting for other jobs to finish...
       > error: build failed
       For full logs, run 'nix log /nix/store/gn4ca81s3zppyg3xahj7xh338c3w1234-loopers-0.2.0.drv'.
@bburdette
Copy link

FWIW I compiled it yesterday with

nix-shell -p cargo rustc  fontconfig freetype libGL libjack2 SDL2
cargo install loopers

After that it seems to run fine from my .cargo/bin/.

@magnetophon
Copy link
Author

@bburdette Thanks a lot, that works a charm! :)

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

2 participants