EmbarkStudios / texture-synthesis

🎨 Example-based texture synthesis written in Rust 🦀
http://embark.rs
Apache License 2.0
1.75k stars 83 forks source link

could not compile `texture-synthesis` #164

Closed Xsafo closed 2 years ago

Xsafo commented 2 years ago

could not compile texture-synthesis

Steps to reproduce the behavior:

  1. Go to clone repo \texture-synthesis
  2. Run in Terminal cargo install --path=cli
  3. See error

stable-x86_64-pc-windows-msvc (default) rustc 1.56.1 (59eed8a2a 2021-11-01)

Caused by:
  build failed
PS C:\texture_synthesis> cargo update
    Updating git repository `https://github.com/EmbarkStudios/img_hash.git`
    Updating crates.io index
    Updating bstr v0.2.16 -> v0.2.17
    Updating bumpalo v3.7.0 -> v3.8.0
    Updating cc v1.0.69 -> v1.0.72
    Updating clang-sys v1.2.1 -> v1.3.0
    Updating cmake v0.1.45 -> v0.1.46
    Updating console v0.14.1 -> v0.15.0
    Updating crc32fast v1.2.1 -> v1.2.2
      Adding cty v0.2.2
    Updating encoding_rs v0.8.28 -> v0.8.29
    Updating flate2 v1.0.21 -> v1.0.22
    Updating half v1.7.1 -> v1.8.2
    Updating js-sys v0.3.53 -> v0.3.55
    Updating libc v0.2.101 -> v0.2.108
    Updating libloading v0.7.0 -> v0.7.2
    Removing maybe-uninit v2.0.0
      Adding once_cell v1.8.0
    Updating pdqselect v0.1.0 -> v0.1.1
    Updating pkg-config v0.3.19 -> v0.3.22
    Updating proc-macro2 v1.0.29 -> v1.0.32
    Updating quote v1.0.9 -> v1.0.10
    Removing raw-window-handle v0.3.3
      Adding raw-window-handle v0.3.4
      Adding raw-window-handle v0.4.2
    Updating serde_json v1.0.67 -> v1.0.72
    Updating structopt v0.3.23 -> v0.3.25
    Updating structopt-derive v0.4.16 -> v0.4.18
    Updating syn v1.0.75 -> v1.0.82
    Updating unicode-width v0.1.8 -> v0.1.9
    Updating wasm-bindgen v0.2.76 -> v0.2.78
    Updating wasm-bindgen-backend v0.2.76 -> v0.2.78
    Updating wasm-bindgen-macro v0.2.76 -> v0.2.78
    Updating wasm-bindgen-macro-support v0.2.76 -> v0.2.78
    Updating wasm-bindgen-shared v0.2.76 -> v0.2.78
    Updating web-sys v0.3.53 -> v0.3.55
    Updating x11-dl v2.18.5 -> v2.19.1
PS C:\texture_synthesis> cargo install --path=cli
  Installing texture-synthesis-cli v0.8.2 (C:\texture_synthesis\cli)
    Updating git repository `https://github.com/EmbarkStudios/img_hash.git`
    Updating crates.io index
warning: Patch `img_hash v2.1.0 (https://github.com/EmbarkStudios/img_hash.git?rev=c40da78#c40da789)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
   Compiling texture-synthesis v0.8.1 (C:\texture_synthesis\lib)
error: failed to compile `texture-synthesis-cli v0.8.2 (C:\texture_synthesis\cli)`, intermediate artifacts can be found at `C:\texture_synthesis\target`

Caused by:
  could not compile `texture-synthesis`

Caused by:
  process didn't exit successfully: `rustc --crate-name texture_synthesis --edition=2018 lib\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=49f1ddcd6f2ccc14 -C extra-filename=-49f1ddcd6f2ccc14 --out-dir C:
\texture_synthesis\target\release\deps -L dependency=C:\texture_synthesis\target\release\deps --extern crossbeam_utils=C:\texture_synthesis\target\release\deps\libcrossbeam_utils-7b399fb1046e66b6.rmeta --extern image=C:\texture_synthesis\target\release\deps\libimage-5e450dcef3d57d47.rmeta --extern num_cpus=C:\text
ure_synthesis\target\release\deps\libnum_cpus-d3a6b4fc392a88ff.rmeta --extern rand=C:\texture_synthesis\target\release\deps\librand-1b42e77a27ea407f.rmeta --extern rand_pcg=C:\texture_synthesis\target\release\deps\librand_pcg-145f9981a0711c53.rmeta --extern rstar=C:\texture_synthesis\target\release\deps\librstar-e
66dad66812cd298.rmeta` (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)
PS C:\texture_synthesis>

Please help, what am I doing wrong?

Xsafo commented 2 years ago

work it only stable-x86_64-pc-windows-gnu

Jake-Shadle commented 2 years ago

Please try with cargo install --locked --path=cli

AlexMikhalev commented 2 years ago

I can't compile it on linux (Ubuntu 20.01) too, with SIGSEGV: invalid memory reference:

texture-synthesis git:(main) cargo install --locked --path=cli
  Installing texture-synthesis-cli v0.8.2 (/home/alex/rust_code/texture-synthesis/cli)
    Updating crates.io index
warning: Patch `img_hash v2.1.0 (https://github.com/EmbarkStudios/img_hash.git?rev=c40da78#c40da789)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
   Compiling syn v1.0.75
   Compiling texture-synthesis v0.8.1 (/home/alex/rust_code/texture-synthesis/lib)
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x5205d3)[0x7fe809d3f5d3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7fe8094863c0]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution22isImpliedViaOperationsENS_7CmpInst9PredicateEPKNS_4SCEVES5_S5_S5_j+0x60f)[0x7fe806a56d5f]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution27isImpliedCondOperandsHelperENS_7CmpInst9PredicateEPKNS_4SCEVES5_S5_S5_+0x9e)[0x7fe806a34e0e]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution26isImpliedCondBalancedTypesENS_7CmpInst9PredicateEPKNS_4SCEVES5_S2_S5_S5_PKNS_11InstructionE+0x619)[0x7fe806a33229]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_S2_S5_S5_PKNS_11InstructionE+0x194)[0x7fe806a31b34]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_PKNS_5ValueEbPKNS_11InstructionE+0x186)[0x7fe806a30156]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution27isLoopBackedgeGuardedByCondEPKNS_4LoopENS_7CmpInst9PredicateEPKNS_4SCEVES8_+0x4ef)[0x7fe806a2f16f]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution19isKnownViaInductionENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x2a6)[0x7fe806cf0a66]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution31isKnownViaNonRecursiveReasoningENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x215)[0x7fe806a35725]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution27isImpliedCondOperandsHelperENS_7CmpInst9PredicateEPKNS_4SCEVES5_S5_S5_+0xc6)[0x7fe806a34e36]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution26isImpliedCondBalancedTypesENS_7CmpInst9PredicateEPKNS_4SCEVES5_S2_S5_S5_PKNS_11InstructionE+0x25c)[0x7fe806a32e6c]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_S2_S5_S5_PKNS_11InstructionE+0x194)[0x7fe806a31b34]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_PKNS_5ValueEbPKNS_11InstructionE+0x186)[0x7fe806a30156]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution30isBasicBlockEntryGuardedByCondEPKNS_10BasicBlockENS_7CmpInst9PredicateEPKNS_4SCEVES8_+0x1f8)[0x7fe806bca7c8]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution19evaluatePredicateAtENS_7CmpInst9PredicateEPKNS_4SCEVES5_PKNS_11InstructionE+0x5e)[0x7fe806ce6bce]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm17simplifyUsersOfIVEPNS_7PHINodeEPNS_15ScalarEvolutionEPNS_13DominatorTreeEPNS_8LoopInfoEPKNS_19TargetTransformInfoERNS_15SmallVectorImplINS_14WeakTrackingVHEEERNS_12SCEVExpanderEPNS_9IVVisitorE+0xb7a)[0x7fe806ce38ea]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(+0x2b9c9e7)[0x7fe806cd39e7]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(+0x2b9a2b1)[0x7fe806cd12b1]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm13LPPassManager13runOnFunctionERNS_8FunctionE+0x48a)[0x7fe806d81d3a]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x307)[0x7fe806273727]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(+0x27d4f3c)[0x7fe80690bf3c]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x36c)[0x7fe8070d846c]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(LLVMRunPassManager+0xa)[0x7fe8073ada9a]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x219e6c5)[0x7fe80b9bd6c5]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x219eee1)[0x7fe80b9bdee1]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x21b77f4)[0x7fe80b9d67f4]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x215cd34)[0x7fe80b97bd34]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x2190d40)[0x7fe80b9afd40]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x21c91ac)[0x7fe80b9e81ac]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/libstd-7c582493123fc1dd.so(rust_metadata_std_5c4e0e91f40690d7+0xaa933)[0x7fe809559933]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x9609)[0x7fe80947a609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7fe80938e293]
error: could not compile `texture-synthesis`

Caused by:
  process didn't exit successfully: `rustc --crate-name texture_synthesis --edition=2018 lib/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=6972832790432fd6 -C extra-filename=-6972832790432fd6 --out-dir /home/alex/rust_code/texture-synthesis/target/release/deps -L dependency=/home/alex/rust_code/texture-synthesis/target/release/deps --extern crossbeam_utils=/home/alex/rust_code/texture-synthesis/target/release/deps/libcrossbeam_utils-eadf027b921bbccf.rmeta --extern image=/home/alex/rust_code/texture-synthesis/target/release/deps/libimage-ea3bf36b520a2a17.rmeta --extern num_cpus=/home/alex/rust_code/texture-synthesis/target/release/deps/libnum_cpus-fe3ba3da25c02a10.rmeta --extern rand=/home/alex/rust_code/texture-synthesis/target/release/deps/librand-c91d70f73c2407a9.rmeta --extern rand_pcg=/home/alex/rust_code/texture-synthesis/target/release/deps/librand_pcg-ab922b1c2de7032d.rmeta --extern rstar=/home/alex/rust_code/texture-synthesis/target/release/deps/librstar-f1e280046eafcc74.rmeta` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `texture-synthesis-cli v0.8.2 (/home/alex/rust_code/texture-synthesis/cli)`, intermediate artifacts can be found at `/home/alex/rust_code/texture-synthesis/target`

Caused by:
  build failed
➜  texture-synthesis git:(main) cargo install --locked --path=cli --verbose
  Installing texture-synthesis-cli v0.8.2 (/home/alex/rust_code/texture-synthesis/cli)
    Updating crates.io index
warning: Patch `img_hash v2.1.0 (https://github.com/EmbarkStudios/img_hash.git?rev=c40da78#c40da789)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
       Fresh autocfg v1.0.1
       Fresh version_check v0.9.3
       Fresh unicode-xid v0.2.2
       Fresh adler32 v1.2.0
       Fresh bitflags v1.3.2
       Fresh lazy_static v1.4.0
       Fresh cfg-if v1.0.0
       Fresh byteorder v1.4.3
       Fresh rand_core v0.6.3
       Fresh unicode-width v0.1.8
       Fresh unicode-segmentation v1.8.0
       Fresh vec_map v0.8.2
       Fresh pdqselect v0.1.0
       Fresh jpeg-decoder v0.1.22
       Fresh regex-syntax v0.6.25
       Fresh ansi_term v0.11.0
       Fresh color_quant v1.1.0
       Fresh strsim v0.8.0
       Fresh bytemuck v1.7.2
       Fresh number_prefix v0.4.0
       Fresh deflate v0.8.6
       Fresh miniz_oxide v0.3.7
       Fresh heck v0.3.3
       Fresh textwrap v0.11.0
       Fresh rand_pcg v0.3.1
       Fresh rand v0.8.4
       Fresh libc v0.2.101
       Fresh proc-macro2 v1.0.29
       Fresh regex v1.5.4
       Fresh num-traits v0.2.14
       Fresh quote v1.0.9
       Fresh crc32fast v1.2.1
       Fresh atty v0.2.14
       Fresh terminal_size v0.1.17
       Fresh crossbeam-utils v0.8.5
       Fresh num_cpus v1.13.0
       Fresh num-integer v0.1.44
       Fresh syn v1.0.75
       Fresh proc-macro-error-attr v1.0.4
       Fresh png v0.16.8
       Fresh clap v2.33.3
       Fresh console v0.14.1
       Fresh rstar v0.7.1
       Fresh num-iter v0.1.42
   Compiling proc-macro-error v1.0.4
       Fresh num-rational v0.3.2
       Fresh indicatif v0.16.2
       Fresh image v0.23.12
     Running `rustc --crate-name proc_macro_error --edition=2018 /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-1.0.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="syn"' --cfg 'feature="syn-error"' -C metadata=34e115651513204e -C extra-filename=-34e115651513204e --out-dir /home/alex/rust_code/texture-synthesis/target/release/deps -L dependency=/home/alex/rust_code/texture-synthesis/target/release/deps --extern proc_macro_error_attr=/home/alex/rust_code/texture-synthesis/target/release/deps/libproc_macro_error_attr-689a924cd53715f6.so --extern proc_macro2=/home/alex/rust_code/texture-synthesis/target/release/deps/libproc_macro2-e6a72189411ec8ce.rmeta --extern quote=/home/alex/rust_code/texture-synthesis/target/release/deps/libquote-05f0aa60e5f101e0.rmeta --extern syn=/home/alex/rust_code/texture-synthesis/target/release/deps/libsyn-6eb9d0b792f953a2.rmeta --cap-lints allow --cfg use_fallback`
   Compiling texture-synthesis v0.8.1 (/home/alex/rust_code/texture-synthesis/lib)
     Running `rustc --crate-name texture_synthesis --edition=2018 lib/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=6972832790432fd6 -C extra-filename=-6972832790432fd6 --out-dir /home/alex/rust_code/texture-synthesis/target/release/deps -L dependency=/home/alex/rust_code/texture-synthesis/target/release/deps --extern crossbeam_utils=/home/alex/rust_code/texture-synthesis/target/release/deps/libcrossbeam_utils-eadf027b921bbccf.rmeta --extern image=/home/alex/rust_code/texture-synthesis/target/release/deps/libimage-ea3bf36b520a2a17.rmeta --extern num_cpus=/home/alex/rust_code/texture-synthesis/target/release/deps/libnum_cpus-fe3ba3da25c02a10.rmeta --extern rand=/home/alex/rust_code/texture-synthesis/target/release/deps/librand-c91d70f73c2407a9.rmeta --extern rand_pcg=/home/alex/rust_code/texture-synthesis/target/release/deps/librand_pcg-ab922b1c2de7032d.rmeta --extern rstar=/home/alex/rust_code/texture-synthesis/target/release/deps/librstar-f1e280046eafcc74.rmeta`
   Compiling structopt-derive v0.4.16
     Running `rustc --crate-name structopt_derive --edition=2018 /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/structopt-derive-0.4.16/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C embed-bitcode=no -C debug-assertions=off -C metadata=6ce255bbe1fc5ae9 -C extra-filename=-6ce255bbe1fc5ae9 --out-dir /home/alex/rust_code/texture-synthesis/target/release/deps -L dependency=/home/alex/rust_code/texture-synthesis/target/release/deps --extern heck=/home/alex/rust_code/texture-synthesis/target/release/deps/libheck-d61a88955424aec5.rlib --extern proc_macro_error=/home/alex/rust_code/texture-synthesis/target/release/deps/libproc_macro_error-34e115651513204e.rlib --extern proc_macro2=/home/alex/rust_code/texture-synthesis/target/release/deps/libproc_macro2-e6a72189411ec8ce.rlib --extern quote=/home/alex/rust_code/texture-synthesis/target/release/deps/libquote-05f0aa60e5f101e0.rlib --extern syn=/home/alex/rust_code/texture-synthesis/target/release/deps/libsyn-6eb9d0b792f953a2.rlib --extern proc_macro --cap-lints allow`
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x5205d3)[0x7f911cc975d3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f911c3de3c0]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution22isImpliedViaOperationsENS_7CmpInst9PredicateEPKNS_4SCEVES5_S5_S5_j+0x60f)[0x7f91199aed5f]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution27isImpliedCondOperandsHelperENS_7CmpInst9PredicateEPKNS_4SCEVES5_S5_S5_+0x9e)[0x7f911998ce0e]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution26isImpliedCondBalancedTypesENS_7CmpInst9PredicateEPKNS_4SCEVES5_S2_S5_S5_PKNS_11InstructionE+0x619)[0x7f911998b229]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_S2_S5_S5_PKNS_11InstructionE+0x194)[0x7f9119989b34]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_PKNS_5ValueEbPKNS_11InstructionE+0x186)[0x7f9119988156]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution27isLoopBackedgeGuardedByCondEPKNS_4LoopENS_7CmpInst9PredicateEPKNS_4SCEVES8_+0x4ef)[0x7f911998716f]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution19isKnownViaInductionENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x2a6)[0x7f9119c48a66]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution31isKnownViaNonRecursiveReasoningENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x215)[0x7f911998d725]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution27isImpliedCondOperandsHelperENS_7CmpInst9PredicateEPKNS_4SCEVES5_S5_S5_+0xc6)[0x7f911998ce36]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution26isImpliedCondBalancedTypesENS_7CmpInst9PredicateEPKNS_4SCEVES5_S2_S5_S5_PKNS_11InstructionE+0x25c)[0x7f911998ae6c]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_S2_S5_S5_PKNS_11InstructionE+0x194)[0x7f9119989b34]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution13isImpliedCondENS_7CmpInst9PredicateEPKNS_4SCEVES5_PKNS_5ValueEbPKNS_11InstructionE+0x186)[0x7f9119988156]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution30isBasicBlockEntryGuardedByCondEPKNS_10BasicBlockENS_7CmpInst9PredicateEPKNS_4SCEVES8_+0x1f8)[0x7f9119b227c8]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm15ScalarEvolution19evaluatePredicateAtENS_7CmpInst9PredicateEPKNS_4SCEVES5_PKNS_11InstructionE+0x5e)[0x7f9119c3ebce]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm17simplifyUsersOfIVEPNS_7PHINodeEPNS_15ScalarEvolutionEPNS_13DominatorTreeEPNS_8LoopInfoEPKNS_19TargetTransformInfoERNS_15SmallVectorImplINS_14WeakTrackingVHEEERNS_12SCEVExpanderEPNS_9IVVisitorE+0xb7a)[0x7f9119c3b8ea]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(+0x2b9c9e7)[0x7f9119c2b9e7]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(+0x2b9a2b1)[0x7f9119c292b1]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm13LPPassManager13runOnFunctionERNS_8FunctionE+0x48a)[0x7f9119cd9d3a]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x307)[0x7f91191cb727]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(+0x27d4f3c)[0x7f9119863f3c]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x36c)[0x7f911a03046c]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.57.0-stable.so(LLVMRunPassManager+0xa)[0x7f911a305a9a]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x219e6c5)[0x7f911e9156c5]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x219eee1)[0x7f911e915ee1]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x21b77f4)[0x7f911e92e7f4]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x215cd34)[0x7f911e8d3d34]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x2190d40)[0x7f911e907d40]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-15fe7307aff1f259.so(+0x21c91ac)[0x7f911e9401ac]
/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/libstd-7c582493123fc1dd.so(rust_metadata_std_5c4e0e91f40690d7+0xaa933)[0x7f911c4b1933]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x9609)[0x7f911c3d2609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f911c2e6293]
error: could not compile `texture-synthesis`

Caused by:
  process didn't exit successfully: `rustc --crate-name texture_synthesis --edition=2018 lib/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=6972832790432fd6 -C extra-filename=-6972832790432fd6 --out-dir /home/alex/rust_code/texture-synthesis/target/release/deps -L dependency=/home/alex/rust_code/texture-synthesis/target/release/deps --extern crossbeam_utils=/home/alex/rust_code/texture-synthesis/target/release/deps/libcrossbeam_utils-eadf027b921bbccf.rmeta --extern image=/home/alex/rust_code/texture-synthesis/target/release/deps/libimage-ea3bf36b520a2a17.rmeta --extern num_cpus=/home/alex/rust_code/texture-synthesis/target/release/deps/libnum_cpus-fe3ba3da25c02a10.rmeta --extern rand=/home/alex/rust_code/texture-synthesis/target/release/deps/librand-c91d70f73c2407a9.rmeta --extern rand_pcg=/home/alex/rust_code/texture-synthesis/target/release/deps/librand_pcg-ab922b1c2de7032d.rmeta --extern rstar=/home/alex/rust_code/texture-synthesis/target/release/deps/librstar-f1e280046eafcc74.rmeta` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `texture-synthesis-cli v0.8.2 (/home/alex/rust_code/texture-synthesis/cli)`, intermediate artifacts can be found at `/home/alex/rust_code/texture-synthesis/target`
Caused by:
  build failed

Rust/Cargo versions:

texture-synthesis git:(main) cargo --version                            
cargo 1.57.0 (b2e52d7ca 2021-10-21)
➜  texture-synthesis git:(main) rustc --version      
rustc 1.57.0 (f1edd0429 2021-11-29)

Libxkb common installed via sudo apt install libxkbcommon-x11-dev

MassimilianoBiancucci commented 2 years ago

I got the same error, I don't really understand what was the problem but after several attempts, I found that the nightly version works properly. I'm using Ubuntu 20.01 too.

try this one: cargo 1.60.0-nightly (95bb3c92b 2022-01-18) rustc 1.60.0-nightly (51126be1b 2022-01-24)

At this time you can install it with: rustup default nightly

With the 1.57.0-x86_64-unknown-linux-gnu not nightly version I can compile it but only with the below command, and the result is in debug without optimization, which make the library unusable: cargo build --target-dir target

AlexMikhalev commented 2 years ago

@MassimilianoBiancucci if you only want to change nightly for the current project use rustup override set nightly . You solution worked for me with above nightly override, compiles with cargo install --locked --path=cli --verbose and runs with cargo run --release -- -o out/03.png generate --target-guide imgs/masks/2_target.jpg --guides imgs/masks/2_example.jpg -- imgs/2.jpg but I am now on Pop Os! 21.10

Jake-Shadle commented 2 years ago

I am going to report this to rust later today, if they don't already have a bug report on it. We are not really maintaining this project (which I should note in the Readme) so won't dig too deep, but would gladly take prs that somehow workaround whatever is causing llvm to choke on this project.

Jake-Shadle commented 2 years ago

I've filed https://github.com/rust-lang/rust/issues/93372, in the meantime, you can either compile with rust 1.55.0 cargo +1.55.0 build --release or with a nightly shown in other comments in this thread.

Jake-Shadle commented 2 years ago

This now works on the current stable 1.62.0 as well as the current latest nightly as LLVM 13 is no longer being used, so I'm closing this issue as resolved. If someone runs into this issue again, it's most likely you are using a rust version between 1.56 and 1.59 and you'll need to use a compiler version outside that range to compile texture synthesis.