[Solved] Snap package: POV-ray executable not found

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
_AndreaS_
Posts: 34
Joined: Sat Jun 06, 2020 12:19 pm

[Solved] Snap package: POV-ray executable not found

Post by _AndreaS_ »

Code: Select all

OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.28907 (Git)
Build type: Release
Branch: master
Hash: 354c4e96358a9bd77152ab48fd378711b920d840
Python 3.8.10, Qt 5.15.3, Coin 4.0.0, OCC 7.6.2
Locale: Italian/Italy (it_IT)
Installed mods: 
  * 3D_Printing_Tools
  * Manipulator 1.4.3
  * Assembly4 0.11.12
  * A2plus 0.4.56
  * POV-Ray-Rendering
I'm trying both Raytracing and POV-Ray-Rendering workbenches. For both I set up the executable path of POVray in the preferences.
Mine is under /usr/bin/povray:

Code: Select all

$ which povray 
/usr/bin/povray
$ ls -l /usr/bin/povray 
-rwxr-xr-x 1 root root 3016000 set 30  2021 /usr/bin/povray
$ povray --version
POV-Ray 3.7.0.10.unofficial

This is an unofficial version compiled by:
 Andreas Beckmann <anbe at debian dot org> for Debian <www.debian.org>
 The POV-Ray Team is not responsible for supporting this version.

Copyright 1991-2013 Persistence of Vision Raytracer Pty. Ltd.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Built-in features:
  I/O restrictions:          enabled
  X Window display:          enabled (using SDL)
  Supported image formats:   gif tga iff ppm pgm hdr png jpeg tiff openexr
  Unsupported image formats: -

Compilation settings:
  Build architecture:  x86_64-pc-linux-gnu
  Built/Optimized for: x86_64-pc-linux-gnu
  Compiler vendor:     gnu
  Compiler version:    g++
  Compiler flags:      -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -Wno-non-template-friend -g -O2 -ffile-prefix-map=/build/povray-Hx0vGd/povray-3.7.0.10=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -O3
Both workbenches, when I start a rendering tells me I have to set up the executable path in the preferences... Why don't they find it?
Last edited by Kunda1 on Sun May 29, 2022 8:53 pm, edited 1 time in total.
Reason: Added [Solved] to thread title
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: POV-ray executable not found

Post by ppd »

That's the freecad snap, yes? In that case, FreeCAD cannot access programs outside its confinement, which is by design. We need to add povray into the snap or provide it as a plugin to make it work. I'll look into it.

-> https://github.com/FreeCAD/FreeCAD-snap ... 5c0288de87
-> https://github.com/FreeCAD/FreeCAD-snap ... 2356619493
Should appear in edge in about two hours.

In the future, if you encounter such problems with the snap and have a GitHub account, consider filing an issue at https://github.com/FreeCAD/FreeCAD-snap/issues
I'm much more likely to find and fix those errors quickly if they're collected in the issue tracker there.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
_AndreaS_
Posts: 34
Joined: Sat Jun 06, 2020 12:19 pm

Re: POV-ray executable not found

Post by _AndreaS_ »

Thanks! Yes it's a snap installation. I received the suggestion to use it instead of the standard apt packages.
I'll try to update later today and I'll report back the results.
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: POV-ray executable not found

Post by ppd »

The povray executable will be located at /snap/freecad/current/usr/bin/povray, so if you have to configure its path, you have to set it to that value. I hope the workbenches find it themselves in PATH.

I added function to set the povray path automatically if it is unset: https://github.com/FreeCAD/FreeCAD-snap ... cebe8ce55d

Release ETA 2 hours: https://github.com/FreeCAD/FreeCAD-snap ... 2357234554
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
_AndreaS_
Posts: 34
Joined: Sat Jun 06, 2020 12:19 pm

Re: POV-ray executable not found

Post by _AndreaS_ »

ppd wrote: Fri May 20, 2022 8:12 am Release ETA 2 hours: https://github.com/FreeCAD/FreeCAD-snap ... 2357234554
After refreshing snap package to:

Code: Select all

snap-id:      6gjU50q0lEDaMTtSUxYoVDSmjR5fERpB
tracking:     latest/edge
refresh-date: today at 05:49 CEST
channels:
  latest/stable:    0.19.4         2022-05-18 (29) 504MB -
  latest/candidate: 0.20beta1      2022-05-27 (41) 587MB -
  latest/beta:      0.20-g391c9a6b 2022-05-29 (43) 587MB -
  latest/edge:      0.20-g2d32de3c 2022-06-03 (51) 587MB -
installed:          0.20-gd860c4bb            (50) 587MB -
it refuses to start at all now:

Code: Select all

$ freecad
cannot update snap namespace: cannot create symlink in "/etc/povray": existing file in the way
snap-update-ns failed with code 1
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: [Solved] Snap package: POV-ray executable not found

Post by ppd »

@_AndreaS_ You do have /etc/povray on the host/your system, correct? Seems like we'd need a bind mount in this case. I forgot that /etc is mounted from the host. Will push a fix later.

Edit:

https://github.com/FreeCAD/FreeCAD-snap ... 9393283dfc
https://github.com/FreeCAD/FreeCAD-snap ... 2433498015

This should be available in edge in about two hours.

Edit 2: It's working for me now. Please test.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
_AndreaS_
Posts: 34
Joined: Sat Jun 06, 2020 12:19 pm

Re: [Solved] Snap package: POV-ray executable not found

Post by _AndreaS_ »

ppd wrote: Fri Jun 03, 2022 8:02 am @_AndreaS_ You do have /etc/povray on the host/your system, correct? Seems like we'd need a bind mount in this case. I forgot that /etc is mounted from the host. Will push a fix later.

Edit:

https://github.com/FreeCAD/FreeCAD-snap ... 9393283dfc
https://github.com/FreeCAD/FreeCAD-snap ... 2433498015

This should be available in edge in about two hours.

Edit 2: It's working for me now. Please test.

Thank you very much. Yes, I have `povray` in my system.
Actually I think it needs more than a couple of hours... still now it says there are no updates available. Last time it took a couple of days IIRC.
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: [Solved] Snap package: POV-ray executable not found

Post by ppd »

It's been online for quite some time now. Try running sudo snap refresh freecad in a terminal.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
_AndreaS_
Posts: 34
Joined: Sat Jun 06, 2020 12:19 pm

Re: [Solved] Snap package: POV-ray executable not found

Post by _AndreaS_ »

ppd wrote: Fri Jun 03, 2022 5:46 pm It's been online for quite some time now. Try running sudo snap refresh freecad in a terminal.
It's what I've just done:

Code: Select all

$ sudo snap refresh freecad 
snap "freecad" has no updates available
_AndreaS_
Posts: 34
Joined: Sat Jun 06, 2020 12:19 pm

Re: [Solved] Snap package: POV-ray executable not found

Post by _AndreaS_ »

Wait!
It actually updated by itself! Perhaps there is an automatic refreshing of the snap packages... sorry but I didn't know!
Post Reply