You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to build from Rstudio the torch project onto UBUNTU 22.04 CPU with env BUILD_LANTERN=1 leads to the following error at the end of the building log
[100%] Linking CXX shared library liblantern.so
make[3] : on quitte le répertoire « /home/xxx/R/_packages/torch/build-lantern »
[100%] Built target lantern
make[2] : on quitte le répertoire « /home/xxx/R/_packages/torch/build-lantern »
Install the project...
-- Install configuration: ""
-- Installing: /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so
-- Set runtime path of "/home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so" to "$ORIGIN"
-- Installing: /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/include/lantern/lantern.h
-- Installing: /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/include/lantern/types.h
gmake[1] : on quitte le répertoire « /home/xxx/R/_packages/torch/build-lantern »
g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o torch.so RcppExports.o amp.o autograd.o backends.o codegen.o contrib.o cuda.o device.o dimname_list.o dtype.o gen-namespace.o generator.o indexing.o ivalue.o jit-compile.o jit-execute.o lantern.o layout.o memory_format.o nn_utils_rnn.o qscheme.o quantization.o reduction.o save.o scalar.o script_module.o stack.o storage.o tensor.o tensor_list.o torch_api.o torch_exports.o trace.o utils.o variable_list.o xptr.o -L/usr/lib/R/lib -lR
ℹ*** Renaming torch lib to torchpkg
"/usr/lib/R/bin/Rscript" "../tools/renamelib.R"
installing to /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
Avis : ℹ torch failed to start, restart your R session to try again.
ℹ You might need to reinstall torch using `install_torch()`
✖ /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so
-
/home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so:
undefined symbol:
_ZN2at4_ops25reflection_pad1d_backward4callERKNS_6TensorES4_N3c108ArrayRefINS5_6SymIntEEE
Caused by error in `cpp_lantern_init()` at torch/R/lantern_load.R:13:2:
! /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so - /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so: undefined symbol: _ZN2at4_ops25reflection_pad1d_backward4callERKNS_6TensorES4_N3c108ArrayRefINS5_6SymIntEEE
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Avis : ℹ torch failed to start, restart your R session to try again.
ℹ You might need to reinstall torch using `install_torch()`
✖ /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so
-
/home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so:
undefined symbol:
_ZN2at4_ops25reflection_pad1d_backward4callERKNS_6TensorES4_N3c108ArrayRefINS5_6SymIntEEE
Caused by error in `cpp_lantern_init()` at torch/R/lantern_load.R:13:2:
! /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so - /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-torch/00new/torch/lib/liblantern.so: undefined symbol: _ZN2at4_ops25reflection_pad1d_backward4callERKNS_6TensorES4_N3c108ArrayRefINS5_6SymIntEEE
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
Avis : ℹ torch failed to start, restart your R session to try again.
ℹ You might need to reinstall torch using `install_torch()`
✖ /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/torch/lib/liblantern.so -
/home/xxx/R/x86_64-pc-linux-gnu-library/4.3/torch/lib/liblantern.so:
undefined symbol:
_ZN2at4_ops25reflection_pad1d_backward4callERKNS_6TensorES4_N3c108ArrayRefINS5_6SymIntEEE
Caused by error in `cpp_lantern_init()` at torch/R/lantern_load.R:13:2:
! /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/torch/lib/liblantern.so - /home/xxx/R/x86_64-pc-linux-gnu-library/4.3/torch/lib/liblantern.so: undefined symbol: _ZN2at4_ops25reflection_pad1d_backward4callERKNS_6TensorES4_N3c108ArrayRefINS5_6SymIntEEE
** testing if installed package keeps a record of temporary installation path
* DONE (torch)
Expected behavior
correct build so I can run tests part of my Pull Request before submitting...
I believe this caused by a mismatch between LibLantern's expected LibTorch and the one installed in the build-lantern directory. What happens if you erase the build-lantern/libtorch and try to rebuild? Do you still get the same errors?
Hello @dfalbel
Thanks a lot for the hint, as yes I had unexpected file in the "lantern/build" folder. Plus I was using the RStudio "Install" button, that, in the case of {torch} is the wrong way to proceed.
Now, with a cleaned install folder plus using the proper procedure documented in CONTRIBUTION.md, build is fine !
Current behavior
Trying to build from Rstudio the torch project onto UBUNTU 22.04 CPU with
env BUILD_LANTERN=1
leads to the following error at the end of the building logExpected behavior
correct build so I can run tests part of my Pull Request before submitting...
Context
The text was updated successfully, but these errors were encountered: