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

Widen range of OS support - *BSD, Haiku etc. #1878

Closed
Veraellyunjie opened this issue Sep 8, 2022 · 2 comments
Closed

Widen range of OS support - *BSD, Haiku etc. #1878

Veraellyunjie opened this issue Sep 8, 2022 · 2 comments
Labels
pending Pending for developer attention.

Comments

@Veraellyunjie
Copy link

Veraellyunjie commented Sep 8, 2022

Opening a new issue was suggested at #1240 (comment)

Blender itself is available on more platforms than AN supports:
FreeBSD: https://www.freshports.org/graphics/blender/
OpenBSD: https://openports.se/graphics/blender
Haiku: https://depot.haiku-os.org/__multipage/pkg/blender3/haikuports/haikuports_x86_64/3/0/1/-/1/x86_64?natlangcode=en

Being on OpenBSD, I made a try to install AN and had no success. Pre-built release for Linux doesn't fit whereas in building it myself I got stuck with:

egcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory
compilation terminated.
building 'animation_nodes.libs.FastNoiseSIMD.wrapper' extension
creating build/temp.openbsd-7.1-amd64-3.9/tmp/animation_nodes-master
creating build/temp.openbsd-7.1-amd64-3.9/tmp/animation_nodes-master/animation_nodes
creating build/temp.openbsd-7.1-amd64-3.9/tmp/animation_nodes-master/animation_nodes/libs
creating build/temp.openbsd-7.1-amd64-3.9/tmp/animation_nodes-master/animation_nodes/libs/FastNoiseSIMD
cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -g -fPIC -O2 -pipe -g -O2 -pipe -g -fPIC -I/tmp/animation_nodes-master/animation_nodes/libs/FastNoiseSIMD/source -I/usr/local/include/python3.9 -c /tmp/animation_nodes-master/animation_nodes/libs/FastNoiseSIMD/wrapper.cpp -o build/temp.openbsd-7.1-amd64-3.9/tmp/animation_nodes-master/animation_nodes/libs/FastNoiseSIMD/wrapper.o -g0 -std=c++11
c++ -pthread -shared -fPIC -L/usr/local/lib/ build/temp.openbsd-7.1-amd64-3.9/tmp/animation_nodes-master/animation_nodes/libs/FastNoiseSIMD/wrapper.o -L/tmp/animation_nodes-master/animation_nodes/libs/FastNoiseSIMD/source -L/usr/local/lib -lFastNoiseSIMD_openbsd -o /tmp/animation_nodes-master/animation_nodes/libs/FastNoiseSIMD/wrapper.cpython-39.so
ld: error: unable to find library -lFastNoiseSIMD_openbsd
c++: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/c++' failed with exit code 1

find / -name cc1plus returns nothing.
I'm not actually knowledgeable in the topic.

My trivial edits:

diff -r animation_nodes-master/_setuputils/generic.py animation_nodes-master.openbsd/_setuputils/generic.py
14a15
> onOpenBSD = sys.platform.startswith("openbsd")
16c17
< if not (onLinux or onWindows or onMacOS):
---
> if not (onLinux or onWindows or onMacOS or onOpenBSD):
diff -r animation_nodes-master/_setuputils/compilation.py animation_nodes-master.openbsd/_setuputils/compilation.py
124c124
<         if onLinux or onMacOS:
---
>         if onLinux or onMacOS or onOpenBSD:
diff -r animation_nodes-master/setup.py animation_nodes-master.openbsd/setup.py
37a38
> elif onOpenBSD: currentOS = "openbsd"
diff -r animation_nodes-master/animation_nodes/libs/FastNoiseSIMD/wrapper_setup_info.py animation_nodes-master.openbsd/animation_nodes/libs/FastNoiseSIMD/wrapper_setup_info.py
40a41,44
>     if utils.onOpenBSD:
>         return ("libFastNoiseSIMD_openbsd.a",
>                 ["sh", os.path.join(sourceDir, "compile_openbsd.sh")],
>                 {"libraries" : ["FastNoiseSIMD_openbsd"]})
cat animation_nodes-master.openbsd/animation_nodes/libs/FastNoiseSIMD/source/compile_openbsd.sh
#!/bin/sh

# copied from file compile_macos.sh
# on OpenBSD gcc installs as /usr/local/bin/egcc

set -e

egcc -c FastNoiseSIMD.cpp -std=c++11 -fPIC -O3
egcc -c FastNoiseSIMD_internal.cpp -std=c++11 -fPIC -O3

if [ "$(arch)" == "arm64" ]; then
	egcc -c FastNoiseSIMD_neon.cpp -std=c++11 -fPIC -O3
else
	egcc -c FastNoiseSIMD_sse2.cpp -std=c++11 -fPIC -O3 -msse2
	egcc -c FastNoiseSIMD_sse41.cpp -std=c++11 -fPIC -O3 -msse4.1
	egcc -c FastNoiseSIMD_avx2.cpp -std=c++11 -fPIC -O3 -march=core-avx2
fi

egcc-ar rcs libFastNoiseSIMD_openbsd.a *.o

echo "Done."
@OmarEmaraDev OmarEmaraDev added the pending Pending for developer attention. label Sep 14, 2022
@OmarEmaraDev
Copy link
Collaborator

Can you move those edits into a pull request to better see the changes and identify what we need to do further?

@OmarEmaraDev
Copy link
Collaborator

Since there is already a pull request for this, lets continue the discussion and reopen there if needed.

@OmarEmaraDev OmarEmaraDev closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending Pending for developer attention.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants