[Solved] Spacemouse not working in .18 AppImage

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
grooveman
Posts: 42
Joined: Fri Jul 05, 2019 3:29 pm

[Solved] Spacemouse not working in .18 AppImage

Post by grooveman »

Hi,

Ever since updating to the Freecad .18 Appimage, my spacemouse is no longer detected. It worked fine in .17.

My system (which is Gentoo LInux, up to date as of this moment), detects the spacemouse just fine on /dev/input/event14. As soon as I start FreeCAD, however, my /var/log/spnavd.log starts filling up with:

Code: Select all

adding device.
failed to open device: No such file or directory
removing device: 
failed to find any supported devices
adding device.
failed to open device: No such file or directory
removing device: 
failed to find any supported devices
adding device.
failed to open device: No such file or directory
removing device: 
failed to find any supported devices
adding device.
failed to open device: No such file or directory
removing device: 
failed to find any supported devices
adding device.
failed to open device: No such file or directory
removing device: 
failed to find any supported devices
When I go back to .17, it works fine again. I tried a couple different builds for .18, including the most current as of today. The problem persists.

Every time I open freecad to configure the spacemouse, instead of seeing all my settings, I see a window that is blank except for the "No Spaceball Present" message.

It is as if the device it is looking for is hard-coded or something, and cannot find it, because it is looking in the wrong place or at the wrong device... but I couldn't find anywhere in freecad to configure this.

About>Help:

Code: Select all

OS: Gentoo/Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16117 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.18.2)
Hash: dbb4cc6415bac848a294f03b80f65e888d531742
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
I'm stuck using the appimage lately, because freecad has been removed from portage. There is a not-so-stable overlay that pulled my system too far out of whack to be a real option -- so .AppImage is what I must use for the time being.

Thank you for any help.

G
Last edited by grooveman on Sun Jul 14, 2019 6:36 pm, edited 1 time in total.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Spacemouse not working in .18 AppImage

Post by jmaustpc »

Welcome to FreeCAD. :)
grooveman wrote: Fri Jul 05, 2019 4:04 pm Ever since updating to the Freecad .18 Appimage, my spacemouse is no longer detected. It worked fine in .17.
Its not because its 0.18, its because its an AppImage. The FreeCAD AppImage was not compiled with spacemouse support. There was a discussion about it and explaining why somewhere on this forum a few days ago. I don't personally know the details.

Once you set up your development environment, compiling FreeCAD is not terribly difficult, if you build FreeCAD out of the sourcecode directory, then you can just "git pull" and do an incremental compile whenever you want to and optionally follow master.
grooveman wrote: Fri Jul 05, 2019 4:04 pm because freecad has been removed from portage.

Perhaps consider a more user friendly and common distro, the Ubuntu clones are best supported from the release and daily PPAs. I have been running Kubuntu for many years and have been mostly happy with it, most of the time.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Spacemouse not working in .18 AppImage

Post by looo »

jmaustpc wrote: Fri Jul 05, 2019 4:16 pm Its not because its 0.18, its because its an AppImage. The FreeCAD AppImage was not compiled with spacemouse support. There was a discussion about it and explaining why somewhere on this forum a few days ago. I don't personally know the detail
Everyone ist welcome to add spacemouse support. All build scripts are open, there is nothing preventing someone missing this feature to add it.

So get active or it won't happen. For sure the community will help you getting it done.
grooveman
Posts: 42
Joined: Fri Jul 05, 2019 3:29 pm

Re: Spacemouse not working in .18 AppImage

Post by grooveman »

jmaustpc wrote: Fri Jul 05, 2019 4:16 pm
Its not because its 0.18, its because its an AppImage. The FreeCAD AppImage was not compiled with spacemouse support. There was a discussion about it and explaining why somewhere on this forum a few days ago. I don't personally know the details.

Once you set up your development environment, compiling FreeCAD is not terribly difficult, if you build FreeCAD out of the sourcecode directory, then you can just "git pull" and do an incremental compile whenever you want to and optionally follow master.


I've searched the forum for spacemouse and spacenav... I couldn't find anything, and I also googled the heck out of it... I do not doubt that someone else has bumped into this, but I was unable to find any precedent.

My system is used for many things... I cannot wrap it around one application, as much as I enjoy FreeCAD. Yes. I can certainly compile it myself, and load my system up with all manner of dependencies for which the package manager would be be completely unaware, and risk the stability and overall performance of my machine. I simply don't have the time to submerge myself in dependency hell. I've been there before and I'm done with that. Using an overlay is a better suggestion because it at least keeps the package manager abreast of what is on my system, but it still brings in so many unstable packages that the whole system becomes a nightmare to stabilize every time it comes time to upgrade. And, I'm not dumping Gentoo for the sake of one package, just so I can run into another issue for another package on another distro...

Spacemouse support was compiled into the .17 AppImage. Why would it be pulled out of the .18 AppImage? I have a hard time believing that this was done by design -- especially given the error output. It is looking for the device, it is just not finding it... it is just broken. I'm thinking it was probably just an oversight. .17 to .18 was a huge undertaking, so something like this was bound to happen.

One day I'm sure FreeCAD will be back in portage. I think it just got removed because Gentoo was on QT5 before Freecad was, and it was making things difficult to have both QT4 and QT5 dependencies on the same system. Now that they are both QT5, I'm hoping native support will be returned to Gentoo.
looo wrote: Fri Jul 05, 2019 4:47 pm
jmaustpc wrote: Fri Jul 05, 2019 4:16 pm Its not because its 0.18, its because its an AppImage. The FreeCAD AppImage was not compiled with spacemouse support. There was a discussion about it and explaining why somewhere on this forum a few days ago. I don't personally know the detail
Everyone ist welcome to add spacemouse support. All build scripts are open, there is nothing preventing someone missing this feature to add it.

So get active or it won't happen. For sure the community will help you getting it done.
I would love to just "get active", but I hold two jobs, work 80 hours a week, live in a fixer-upper and have severe medical issues. I barely have the time to use FreeCAD, least of all build for it... Believe me if I had the time, I would do this. I just don't. Meanwhile, someone who is already doing this, could just add a compile flag (or fix the bug), and be done with it, and everyone would benefit. Again, if this is just an oversight, it would be a very simple affair for someone who is in the neighbourhood already. It would probably take this person a few minutes to do this, whereas for me, it would take weeks (in multiple 10 minute sessions). No reason for someone else to re-invent the wheel. The appimage maintainer probably isn't even aware of this issue. Posting here is my first step in moving toward bringing him/her this information.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Spacemouse not working in .18 AppImage

Post by sgrogan »

grooveman wrote: Fri Jul 05, 2019 6:11 pm The appimage maintainer probably isn't even aware of this issue
Well... at @looo is the maintainer so he knows ;)
The story.
We used to build the AppImage using Ubuntu 14.04 FreeCAD PPA assets (QT4/PY2) but the PY3/QT5 versions were too old. 14.04 has reached EOL and the 16.04 versions of the libs are also too old.
So we switched to Conda based builds. There is no spnav package available. So it's required to make the spnav package (and any dependencies of spnav that are not available on Conda) then set the compile flag when building FreeCAD.

It looks like they got the overlay working https://forum.freecadweb.org/viewtopic. ... 17#p319017
"fight the good fight"
grooveman
Posts: 42
Joined: Fri Jul 05, 2019 3:29 pm

Re: Spacemouse not working in .18 AppImage

Post by grooveman »

Ah, I see.

That is interesting. Why is it then that the logs for spnav show FreeCAD looking for a device then? Wouldn't it just ignore spacenavd altogether?

Well, if he is the maintainer, I guess he would most certainly know. If he doesn't have time, then he doesn't have time. Believe me, I get that. And if the current environment doesn't support it, then I get that too. Again, I'd love to get involved, but it just isn't possible in the foreseeable future. I will try to make monetary contributions instead. I think this package is amazing, and I"m absolutely stunned I don't see more people using it in the 3D printing communities. I'm sure Fusion360 has some niceties to it, but man I haven't bumped into anything that FC cannot handle yet... and it is still so young! I'm really blown away by FC.

Maybe I'll give the overlay another crack... it just wanted to sooo many unstable packages (it is only yellow in the layman output)... or I'll just stick with .17 AppImage until something else happens.

Thanks.

G
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Spacemouse not working in .18 AppImage

Post by looo »

grooveman wrote: Fri Jul 05, 2019 6:55 pm Well, if he is the maintainer, I guess he would most certainly know. If he doesn't have time, then he doesn't have time. Believe me, I get that.
I have not much idea how to enable the spacenav support. If it would be a 10 min job I would have already added spacenav support. But I am not yet sure 1. If it's possible to add it to conda (which platforms?) and 2. how to do so?
grooveman
Posts: 42
Joined: Fri Jul 05, 2019 3:29 pm

Re: Spacemouse not working in .18 AppImage

Post by grooveman »

I suspect you cannot use conda for this... I haven't used it before, but as appears to be a binary package manager, there probably ins't an option. The appimage would probably need to be compiled from source... where spacenav is probably a compile time option... but that's just a guess... Who did the .appimage from .17? Maybe he/she can provide a tip?
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Spacemouse not working in .18 AppImage

Post by sgrogan »

grooveman wrote: Sat Jul 06, 2019 6:37 pm I suspect you cannot use conda for this... I haven't used it before, but as appears to be a binary package manager, there probably ins't an option
looo builds and packages these packages for Conda. I think he's packaged the entire dependency chain for FreeCAD less QT.
The missing package for Conda is libspnav(-dev) See here; for how it is handled for Ubuntu https://packages.ubuntu.com/source/bionic/libspnav

For the 0.17 AppImage we re-packaged the Ubuntu FreeCAD PPA14.04 build and this package is available there at build time and run time.
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Spacemouse not working in .18 AppImage

Post by looo »

sgrogan wrote: Sat Jul 06, 2019 6:48 pm The missing package for Conda is libspnav(-dev) See here; for how it is handled for Ubuntu https://packages.ubuntu.com/source/bionic/libspnav
Thanks for the information @sgrogan. I will try to setup a staged recipe in the next days for this library. Once done we can add a local build to the freecad channel and use it in the weekly builds.
Post Reply