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

Any ideas? #880

Open
Quicksticks-oss opened this issue Jul 21, 2024 · 4 comments
Open

Any ideas? #880

Quicksticks-oss opened this issue Jul 21, 2024 · 4 comments

Comments

@Quicksticks-oss
Copy link

.bashrc

export LIBTORCH=/home/printrman/libtorch/
# LIBTORCH_INCLUDE must contain `include` directory.
export LIBTORCH_INCLUDE=/home/printrman/libtorch/include/
# LIBTORCH_LIB must contain `lib` directory.
export LIBTORCH_LIB=/home/printrman/libtorch/lib/
The following warnings were emitted during compilation:

warning: torch-sys@0.16.0: libtch/torch_api.cpp:1:9: fatal error: torch/csrc/autograd/engine.h: No such file or directory
warning: torch-sys@0.16.0:     1 | #include<torch/csrc/autograd/engine.h>
warning: torch-sys@0.16.0:       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.16.0: compilation terminated.
warning: torch-sys@0.16.0: ToolExecError: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include/torch/csrc/api/include" "-Wl,-rpath=/home/printrman/libtorch/lib/lib" "-std=c++17" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/torch-sys-d7c755c455b28224/out/19072f24a82f85ae-torch_api.o" "-c" "libtch/torch_api.cpp" with args c++ did not execute successfully (status code exit status: 1).cargo:warning=In file included from /home/printrman/libtorch/include/torch/csrc/api/include/torch/all.h:7,
warning: torch-sys@0.16.0:                  from /home/printrman/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
warning: torch-sys@0.16.0:                  from libtch/torch_api.h:6,
warning: torch-sys@0.16.0:                  from libtch/torch_api_generated.h:2,
warning: torch-sys@0.16.0:                  from libtch/torch_api_generated.cpp:2:
warning: torch-sys@0.16.0: /home/printrman/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:10: fatal error: torch/csrc/autograd/autograd.h: No such file or directory
warning: torch-sys@0.16.0:     3 | #include <torch/csrc/autograd/autograd.h>
warning: torch-sys@0.16.0:       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: torch-sys@0.16.0: compilation terminated.
warning: torch-sys@0.16.0: ToolExecError: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include/torch/csrc/api/include" "-Wl,-rpath=/home/printrman/libtorch/lib/lib" "-std=c++17" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/torch-sys-d7c755c455b28224/out/19072f24a82f85ae-torch_api_generated.o" "-c" "libtch/torch_api_generated.cpp" with args c++ did not execute successfully (status code exit status: 1).

error: failed to run custom build command for `torch-sys v0.16.0`

Caused by:
  process didn't exit successfully: `/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/torch-sys-7997bcac3cb09619/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=LIBTORCH_USE_PYTORCH
  cargo:rerun-if-env-changed=LIBTORCH
  cargo:rerun-if-env-changed=LIBTORCH_INCLUDE
  cargo:rerun-if-env-changed=LIBTORCH_LIB
  cargo:rerun-if-env-changed=LIBTORCH_BYPASS_VERSION_CHECK
  cargo:rerun-if-env-changed=LIBTORCH_CXX11_ABI
  cargo:rerun-if-env-changed=LIBTORCH_STATIC
  cargo:rustc-link-search=native=/home/printrman/libtorch/lib/lib
  cargo:rerun-if-changed=libtch/fake_cuda_dependency.cpp
  cargo:rerun-if-changed=libtch/torch_python.cpp
  cargo:rerun-if-changed=libtch/torch_python.h
  cargo:rerun-if-changed=libtch/torch_api_generated.cpp
  cargo:rerun-if-changed=libtch/torch_api_generated.h
  cargo:rerun-if-changed=libtch/torch_api.cpp
  cargo:rerun-if-changed=libtch/torch_api.h
  cargo:rerun-if-changed=libtch/stb_image_write.h
  cargo:rerun-if-changed=libtch/stb_image_resize.h
  cargo:rerun-if-changed=libtch/stb_image.h
  cargo:libtorch_lib=/home/printrman/libtorch/lib/lib
  OUT_DIR = Some(/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/torch-sys-d7c755c455b28224/out)
  TARGET = Some(x86_64-unknown-linux-gnu)
  OPT_LEVEL = Some(0)
  HOST = Some(x86_64-unknown-linux-gnu)
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(true)
  CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:warning=libtch/torch_api.cpp:1:9: fatal error: torch/csrc/autograd/engine.h: No such file or directory
  cargo:warning=    1 | #include<torch/csrc/autograd/engine.h>
  cargo:warning=      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=compilation terminated.
  exit status: 1
  cargo:warning=ToolExecError: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include/torch/csrc/api/include" "-Wl,-rpath=/home/printrman/libtorch/lib/lib" "-std=c++17" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/torch-sys-d7c755c455b28224/out/19072f24a82f85ae-torch_api.o" "-c" "libtch/torch_api.cpp" with args c++ did not execute successfully (status code exit status: 1).cargo:warning=In file included from /home/printrman/libtorch/include/torch/csrc/api/include/torch/all.h:7,
  cargo:warning=                 from /home/printrman/libtorch/include/torch/csrc/api/include/torch/torch.h:3,
  cargo:warning=                 from libtch/torch_api.h:6,
  cargo:warning=                 from libtch/torch_api_generated.h:2,
  cargo:warning=                 from libtch/torch_api_generated.cpp:2:
  cargo:warning=/home/printrman/libtorch/include/torch/csrc/api/include/torch/autograd.h:3:10: fatal error: torch/csrc/autograd/autograd.h: No such file or directory
  cargo:warning=    3 | #include <torch/csrc/autograd/autograd.h>
  cargo:warning=      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=compilation terminated.

  exit status: 1
  cargo:warning=ToolExecError: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include/torch/csrc/api/include" "-Wl,-rpath=/home/printrman/libtorch/lib/lib" "-std=c++17" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/torch-sys-d7c755c455b28224/out/19072f24a82f85ae-torch_api_generated.o" "-c" "libtch/torch_api_generated.cpp" with args c++ did not execute successfully (status code exit status: 1).
  exit status: 0

  --- stderr


  error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include" "-I" "/home/printrman/libtorch/include/torch/csrc/api/include/torch/csrc/api/include" "-Wl,-rpath=/home/printrman/libtorch/lib/lib" "-std=c++17" "-D_GLIBCXX_USE_CXX11_ABI=1" "-o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/torch-sys-d7c755c455b28224/out/19072f24a82f85ae-torch_api_generated.o" "-c" "libtch/torch_api_generated.cpp" with args c++ did not execute successfully (status code exit status: 1).
@ItsEthra
Copy link

must contain include directory.
must contain lib directory.

Try these instead.

export LIBTORCH=/home/printrman/libtorch/
export LIBTORCH_INCLUDE=/home/printrman/libtorch/
export LIBTORCH_LIB=/home/printrman/libtorch/

@Quicksticks-oss
Copy link
Author

good start but now im getting

error: linking with ccfailed: exit status: 1 | = note: LC_ALL="C" PATH="/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/printrman/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustchnulRq/symbols.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.1xrrk5es2lwn9lq8.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.1yr9kbqt8hbqh7ow.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.26a3z59wgm0p9pnz.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.2d81rc9bgwj67ats.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.3gamzb5hjjmhc5dl.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.3i2hby1ptqffu22c.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.3k05qofj27im68s1.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.58pjws0qxs32t5n8.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.kwfntzq3eua41mp.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.l91zmpgzht066et.rcgu.o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8.2qxuw3vz8zk3eejy.rcgu.o" "-Wl,--as-needed" "-L" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps" "-L" "/home/printrman/libtorch/lib" "-L" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/torch-sys-d7c755c455b28224/out" "-L" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/bzip2-sys-df89f9e224dff715/out/lib" "-L" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/build/zstd-sys-65e2071821f783fa/out" "-L" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtch-56044675e675705a.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libndarray-e1e75c35b21bd4e0.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libmatrixmultiply-fc281897c83078d9.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libnum_complex-9336bf2a6d3641ee.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libnum_integer-54364a6a5f65db50.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libnum_traits-95ace4b5b21daf1b.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/librawpointer-d4ad7865a88bbd68.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/librand-a9670b2472be595c.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/librand_chacha-f9db4711769b9527.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libppv_lite86-d465ebe5ccd8cd05.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libsafetensors-53b9de6edf3515bb.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libserde_json-4d5a250adfb99824.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libitoa-c15a9e53020eeaf9.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libryu-d93b5e3834f5f7eb.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libserde-02847efa9507e1ff.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libhalf-796c9acfc4d88031.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libzip-31fae40f6a4016e2.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libpbkdf2-68c80a1557cc845e.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libsha2-015fc8ee0ab68bc3.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libpassword_hash-352a3df6ae5983da.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libbase64ct-a282805a87cc914f.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/librand_core-6659f719f3c824b9.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libgetrandom-5a3b2ba2164b5f4b.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtime-b7972416eaec2ad8.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtime_core-bb9ca4ba71fa0300.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libnum_conv-d96f7d0d7b71094d.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libderanged-4ab9d3ee42842d04.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libpowerfmt-5c12ba38c17a7a93.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libzstd-854391cf14d72c76.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libzstd_safe-ccc865a1e0b6fdae.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libzstd_sys-70e0eebee2252397.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libbzip2-717c7c6c28aea308.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libbzip2_sys-e2030acfeea7b7dd.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/liblibc-6c3abdfc09455cdf.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libflate2-c66510c5828c4613.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libminiz_oxide-932d1495b85c60e2.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libadler-6dc18cb44731d0e5.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libcrc32fast-549734f33c9a7fed.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libbyteorder-d037f30a05559b0f.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libaes-b4ff7494b28cdd84.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libcipher-50f19474f2c0f0f3.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libinout-7caab29788ddb80e.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libsha1-36d9b2dba661bc88.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libcpufeatures-aeb5d1fb3b70debf.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libcfg_if-d27551194aacd98f.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libhmac-b8f7ed73cd064aee.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libdigest-6d858a7d316578d1.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libsubtle-ec7b580a29f796fb.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libblock_buffer-2fdeb358b549edf8.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libcrypto_common-e94934c0421a4656.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libgeneric_array-2d74e7d2cb8bdc96.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtypenum-3b0e0a7ef9ae714b.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libconstant_time_eq-dda76ef28dbc07a8.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libthiserror-73b64e36e0cdd88b.rlib" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/liblazy_static-065126ceef935bda.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-d5189b81a4fa4d36.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-6a4779412a873200.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-c88c426dd6780435.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-e74540b31113a555.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-8751b61bd13c15cf.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-a8b99dba9f449259.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-f0068d76172a0372.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-c16dfaf47799564e.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-bfa26dd63e299db5.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-75a2330a693e738f.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-76779dce1f7ab63d.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-01c5cc588623cb35.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-07bb9745ec737292.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-6eacdcc91004cefb.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-ae2488b58226c836.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-52acaddcaaba04c6.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-326b78eac9ecd050.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-307ebf19f0f13d30.rlib" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d9076ee5964191bf.rlib" "-Wl,-Bdynamic" "-lstdc++" "-ltorch_hip" "-ltorch_cpu" "-ltorch" "-lc10" "-lc10_hip" "-lgomp" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/printrman/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/tester-c4a955c51ef864a8" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" = note: /usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in functionc10::Device::validate()':
/home/printrman/libtorch/include/c10/core/Device.h:177:(.text._ZN3c106Device8validateEv[_ZN3c106Device8validateEv]+0x9c): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/printrman/libtorch/include/c10/core/Device.h:181:(.text._ZN3c106Device8validateEv[_ZN3c106Device8validateEv]+0x14d): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function c10::intrusive_ptr_target::~intrusive_ptr_target()': /home/printrman/libtorch/include/c10/util/intrusive_ptr.h:118:(.text._ZN3c1020intrusive_ptr_targetD2Ev[_ZN3c1020intrusive_ptr_targetD5Ev]+0x242): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function caffe2::TypeMeta::fromScalarType(c10::ScalarType)': /home/printrman/libtorch/include/c10/util/typeid.h:467:(.text._ZN6caffe28TypeMeta14fromScalarTypeEN3c1010ScalarTypeE[_ZN6caffe28TypeMeta14fromScalarTypeEN3c1010ScalarTypeE]+0x98): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function c10::fromIntArrayRefSlow(c10::ArrayRef<long>)': /home/printrman/libtorch/include/c10/core/SymIntArrayRef.h:63:(.text._ZN3c1019fromIntArrayRefSlowENS_8ArrayRefIlEE[_ZN3c1019fromIntArrayRefSlowENS_8ArrayRefIlEE]+0xd7): undefined reference to c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::isIntrusivePtr() const': /home/printrman/libtorch/include/ATen/core/ivalue.h:1289:(.text._ZNK3c106IValue14isIntrusivePtrEv[_ZNK3c106IValue14isIntrusivePtrEv]+0x98): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::toComplexDouble() const': /home/printrman/libtorch/include/ATen/core/ivalue_inl.h:155:(.text._ZNK3c106IValue15toComplexDoubleEv[_ZNK3c106IValue15toComplexDoubleEv]+0xb8): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::toSymInt() const &': /home/printrman/libtorch/include/ATen/core/ivalue_inl.h:245:(.text._ZNKR3c106IValue8toSymIntEv[_ZNKR3c106IValue8toSymIntEv]+0xdc): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::toObjectRef() const': /home/printrman/libtorch/include/ATen/core/ivalue_inl.h:1686:(.text._ZNK3c106IValue11toObjectRefEv[_ZNK3c106IValue11toObjectRefEv]+0xad): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::toIntList() const &': /home/printrman/libtorch/include/ATen/core/ivalue_inl.h:1972:(.text._ZNKR3c106IValue9toIntListEv[_ZNKR3c106IValue9toIntListEv]+0xb1): undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o):/home/printrman/libtorch/include/ATen/core/ivalue_inl.h:2004: more undefined references to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow /usr/bin/ld: /home/printrman/stable-diffusion-xl-burn/new_test/tester/target/debug/deps/libtorch_sys-ef49e8c91c1c279a.rlib(19072f24a82f85ae-torch_api.o): in function void c10::FunctionSchema::checkArgc10::Type(c10::IValue const&, c10::Argument const&, std::optional) const':
/home/printrman/libtorch/include/ATen/core/function_schema_inl.h:337:(.text._ZNK3c1014FunctionSchema8checkArgINS_4TypeEEEvRKNS_6IValueERKNS_8ArgumentESt8optionalImE[_ZNK3c1014FunctionSchema8checkArgINS_4TypeEEEvRKNS_6IValueERKNS_8ArgumentESt8optionalImE]+0x1dd): undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
collect2: error: ld returned 1 exit status

= note: some extern functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the -l flag to specify native libraries to link
= note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

error: could not compile tester (bin "tester") due to 1 previous error
`

@for-lack-of-a-better-name-j

I have a similar error when compiling my app.

error: linking with cc failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/j/.local/share/pnpm:/home/j/.bun/bin:/home/j/.cargo/bin:/home/j/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/opt/nvim-linux64/bin:/home/j/zig:/usr/local/go/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcDeK69s/symbols.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.03vmmdb4khs0vwa1pgxrr4lt0.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.0kmp2inzo2t955gmti37v1mns.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.1fkm49xsg1wh81j0ztvm1nvy9.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.2f8ktz7cvv96xqqxs34xtr107.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.4894ts1d3a5bbcsixf97jx1t1.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.4h0hi7s2je0hi28t5blkfk57w.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.5djpq5ih6ze7gimrtkvzyzuyo.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.9b21rlet9dnm1z5t40yk7rfvl.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.e0d7bxxg5vo6cbsbic45wpmiy.rcgu.o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2.blrrl7z943zmrah60kbzsh568.rcgu.o" "-Wl,--as-needed" "-L" "/home/j/rust/torch_practice_potato/target/debug/deps" "-L" "/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/lib" "-L" "/home/j/rust/torch_practice_potato/target/debug/build/torch-sys-7fb37d506b355772/out" "-L" "/home/j/rust/torch_practice_potato/target/debug/build/bzip2-sys-a4b2e112730dc107/out/lib" "-L" "/home/j/rust/torch_practice_potato/target/debug/build/zstd-sys-401c4c6a42323f72/out" "-L" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/j/rust/torch_practice_potato/target/debug/deps/libtch-0efe7584e6760a91.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libndarray-0bc152fe4641a4e1.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libmatrixmultiply-7d2fa4d559b45a6b.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libnum_complex-c5848fc5c22f9d94.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libnum_integer-9f60054cd173be1e.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libnum_traits-04aafd531c53483b.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/librawpointer-325e0870a16f39a2.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/librand-4c341af819a4e17a.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/librand_chacha-308bc73281029d7c.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libppv_lite86-fc13c97da03c02d6.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libsafetensors-25f723198864e865.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libserde_json-dac629f060b9c716.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libitoa-b403a0016b573ecf.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libryu-a30ca92a6cd52873.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libserde-f7e8274c50cecd75.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libhalf-4dc1b093cb96e3d7.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libzip-445cd31c95c7b5a5.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libpbkdf2-22f339277488ff97.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libsha2-cdd88f1945694eea.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libpassword_hash-6337a13519042d25.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libbase64ct-cf14952bb28d36e4.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/librand_core-cf32172b7155a478.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libgetrandom-7680b2602ad02335.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libtime-4789bed04ef64cd1.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libtime_core-42f2c186203b160a.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libnum_conv-55432f4834443513.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libderanged-c91179d13f1fbee6.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libpowerfmt-c4043a15f5bcef6b.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libzstd-aa7ca7a2d9c552cd.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libzstd_safe-20021a2a4c5c56a7.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libzstd_sys-e5af08931b34c2cc.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libbzip2-0dea582f09a5ea48.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libbzip2_sys-027e16f6a749224a.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/liblibc-199649b676bb0ce6.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libflate2-2f9f2a7c0e298b2d.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libminiz_oxide-2a5b7d55615ceb14.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libadler-9b73e8b1b1c632b0.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libcrc32fast-ce6bd1df143fee3e.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libbyteorder-a0db01b1e004d420.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libaes-46f2df7b3fb764e6.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libcipher-ad7cd4fbf92138b4.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libinout-7055f993a1a00ef9.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libsha1-aa6211b7b39979e3.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libcpufeatures-3e9adcea7e4cc0d1.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libcfg_if-f93ad0443750a3ea.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libhmac-283d367d628be348.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libdigest-3f4dc4c11f33fb25.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libsubtle-014bf7af62cec289.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libblock_buffer-61f50ad40f5f5f90.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libcrypto_common-9a2525ec7fa09139.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libgeneric_array-75b90efe9827e224.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libtypenum-0d3cadd5bc64204a.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libconstant_time_eq-13bdb41f319fda6d.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/libthiserror-7ff7275d784098fd.rlib" "/home/j/rust/torch_practice_potato/target/debug/deps/liblazy_static-009c0753e8a2f53a.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-0fbbe72b9e0d57dc.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4cbc28d57c85be7b.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-d583e13b4b2d89a2.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5d2a1bfb1589ab43.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-dcf90797fbd00d23.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-3b6828d7a1725131.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-f75bdd612dd19f44.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-130d6997e9e34e6a.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-c9c9da5b4611a660.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-0f5b4153173c663b.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-877178c8f84ba478.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-3907ca7c36d3c032.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-e8b263070ac20a8a.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-d1969118c6f0c13e.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-d48855f89c749535.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9a1cbc1305da137e.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-d290b706bbcc90ac.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-fd707bd9d5d3d672.rlib" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d4ebcca572002f93.rlib" "-Wl,-Bdynamic" "-lstdc++" "-ltorch_cpu" "-ltorch" "-lc10" "-lgomp" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/j/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/j/rust/torch_practice_potato/target/debug/deps/torch_practice_potato-ece8b6a5b95632b2" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function c10::Device::validate()': /home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/c10/core/Device.h:177: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: /home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/c10/core/Device.h:181: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function c10::intrusive_ptr_target::~intrusive_ptr_target()':
/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/c10/util/intrusive_ptr.h:118: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function caffe2::TypeMeta::fromScalarType(c10::ScalarType)':
/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/c10/util/typeid.h:467: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function c10::fromIntArrayRefSlow(c10::ArrayRef)':
/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/c10/core/SymIntArrayRef.h:63: undefined reference to c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::isIntrusivePtr() const':
/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/ATen/core/ivalue.h:1289: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::toComplexDouble() const':
/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/ATen/core/ivalue_inl.h:155: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::toSymInt() const &':
/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/ATen/core/ivalue_inl.h:245: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::toObjectRef() const':
/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/ATen/core/ivalue_inl.h:1686: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function c10::IValue::toIntList() const &':
/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/ATen/core/ivalue_inl.h:1972: undefined reference to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o):/home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/ATen/core/ivalue_inl.h:2004: more undefined references to c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' follow
/usr/bin/ld: /home/j/rust/torch_practice_potato/target/debug/deps/libtorch_sys-2f8da6925599a7ab.rlib(19072f24a82f85ae-torch_api.o): in function void c10::FunctionSchema::checkArg<c10::Type>(c10::IValue const&, c10::Argument const&, std::optional<unsigned long>) const': /home/j/Downloads/libtorch_versions/libtorch-shared-with-deps-2.3.0+cpu/libtorch/include/ATen/core/function_schema_inl.h:337: undefined reference to c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
collect2: error: ld returned 1 exit status

= note: some extern functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the -l flag to specify native libraries to link
= note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

error: could not compile torch_practice_potato (bin "torch_practice_potato") due to 1 previous error

This only happens when I use the libtorch cpu-only library. When I use the ROCM library, everything works perfectly.

For a sanity check, I built the same thing in C++ to see if it wasn't an issue with libtorch itself, and it worked okay.

Not sure where to go from here.

@for-lack-of-a-better-name-j
Copy link

for-lack-of-a-better-name-j commented Aug 6, 2024

Using the libtorch version with the Cxx11 ABI just worked... I must have made some mistake in my .bashrc before. I had to specify:
export LIBTORCH=/home/j/Downloads/libtorch_versions/libtorch-cxx11-abi-shared-with-deps-2.3.0+cpu/libtorch/

export LD_LIBRARY_PATH=/home/j/Downloads/libtorch_versions/libtorch-cxx11-abi-shared-with-deps-2.3.0+cpu/libtorch/lib/:$LD_LIBRARY_PATH

export LIBTORCH_LIB=/home/j/Downloads/libtorch_versions/libtorch-cxx11-abi-shared-with-deps-2.3.0+cpu/libtorch/

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

3 participants