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

Add nn~ build script for Linux #51

Merged
merged 3 commits into from
Jun 22, 2023

Conversation

devstermarts
Copy link
Contributor

raspberrypi.sh runs into errors with Torch (e.g. searching for Torch cmake configuration files). This script uses libtorch in a temp folder to build nn~ for Linux.

@caillonantoine caillonantoine merged commit da626b9 into acids-ircam:master Jun 22, 2023
@maurice-jo
Copy link

Hi there,

I've been following the instructions for the linux build as the raspberrypi.sh was giving me errors. It seems like I'm close but now I'm getting the following error.

-- Build files have been written to: /home/sonicagent1/nn_tilde/build
[ 20%] Building CXX object backend/CMakeFiles/backend.dir/parsing_utils.cpp.o
[ 40%] Building CXX object backend/CMakeFiles/backend.dir/backend.cpp.o
[ 60%] Linking CXX static library libbackend.a
[ 60%] Built target backend
[ 80%] Building CXX object frontend/puredata/nn_tilde/CMakeFiles/nn.dir/nn_tilde.cpp.o
[100%] Linking CXX shared library "nn~.pd_linux"
/usr/bin/ld: /home/sonicagent1/nn_tilde/lib/libtorch/lib/libtorch.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [frontend/puredata/nn_tilde/CMakeFiles/nn.dir/build.make:102: frontend/puredata/nn_tilde/nn~.pd_linux] Error 1
make[1]: *** [CMakeFiles/Makefile2:142: frontend/puredata/nn_tilde/CMakeFiles/nn.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
cp: cannot stat 'frontend/puredata/nn_tilde/nn~.pd_linux': No such file or directory

Any advice on how to fix this as it seems connected to the libtorch.so?

I'm running a Pi 5 with bookworm.

@hongyue-howard-wang
Copy link

/home/sonicagent1/nn_tilde/lib/libtorch/lib/libtorch.so: error adding symbols: file in wrong f

Hi,
I also met this issue this morning, do you know how to slove it?

jbabr@vibeplate:~/nn_tilde/build $ make [ 60%] Built target backend [ 80%] Linking CXX shared library "nn~.pd_linux" /home/jbabr/nn_tilde/lib/libtorch/lib/libtorch.so: file not recognized: file format not recognized collect2: error: ld returned 1 exit status make[2]: *** [frontend/puredata/nn_tilde/CMakeFiles/nn.dir/build.make:108: frontend/puredata/nn_tilde/nn~.pd_linux] Error 1 make[1]: *** [CMakeFiles/Makefile2:161: frontend/puredata/nn_tilde/CMakeFiles/nn.dir/all] Error 2 make: *** [Makefile:103: all] Error 2
I am running a Pi 4.

@caillonantoine
Copy link
Collaborator

caillonantoine commented Jul 30, 2024

The install script uses a hardcoded path to the lib, can you make sure there is a file there ?

@maurice-jo
Copy link

There's not and for some reason I can't install Python3.9 + torch site-packages there....

@maurice-jo
Copy link

So digging further. It seems to be an issue with Raspberry Pi 5 and 64-bit Bookworm OS. Bookworm comes with Python 3.11 and it does not let me downgrade to Python 3.9 systemwide, which is why the script cannot access the path (/.local/lib/python3.9/site-packages/torch/) as it does not exist.

I've been trying to compile it using a venv but failed thus far. Is there a possibility to upgrade the nn~ compiler to python3.9?


On another note, I bought a Pi4 and ran it with legacy raspbian bullseye. I was able to compile the file but whenever I create the object in PureData the program crashes....

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

Successfully merging this pull request may close these issues.

4 participants