[Solved Upstream] When loading FC console shows: "connect failed: No such file or directory"

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
tsadowski
Posts: 36
Joined: Tue Jan 20, 2015 10:50 pm

Re: When loading FC console shows: "connect failed: No such file or directory"

Post by tsadowski »

I am responsible for this. "connect failed..." is the error message from libspnav. There is no socket when the daemon is not running. It might be possible to avoid this message by checking before if the daemon is running but using the return value of spnav_open() is a check by benign failure.

I did not change the build behaviour on Linux. If libspnav is found, it is compiled in.

A nice option would be weak linking of libspnav but this is easy on Mac OSX but not on Linux. Here is a pointer:
https://github.com/opadron/weak-linking-demo

But is it really an issue?

Cheers, Torsten
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: When loading FC console shows: "connect failed: No such file or directory"

Post by chrisb »

tsadowski wrote: Tue Feb 18, 2020 11:10 pm But is it really an issue?
It's not severe, but it is an issue. False positives are irritating and misleading and may obscure real issues.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
tsadowski
Posts: 36
Joined: Tue Jan 20, 2015 10:50 pm

Re: When loading FC console shows: "connect failed: No such file or directory"

Post by tsadowski »

Ok, I see the following options:
- Ask the Spnav developers nicely to remove the error message -> No hint when you want to know why it is not working
- Ask the Spnav developers nicely to add an extra error report function -> Could be the best solution
- Fork libspnav
- Check if the socket file is present before calling spnav_open() -> upstream code could change without notice, strange failure
- Using dlopen() -> error message when libspnav is present but daemon not running

I prefer the second option. Weak linking is not a full solution as the client library could be present on the system without the daemon running.

Cheers,
Torsten
tsadowski
Posts: 36
Joined: Tue Jan 20, 2015 10:50 pm

Re: When loading FC console shows: "connect failed: No such file or directory"

Post by tsadowski »

I asked the spacenavd developer. The offending message is gone. This will be fixed when the distribution packages are updated.

Cheers,
Torsten
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Solved Upstream] When loading FC console shows: "connect failed: No such file or directory"

Post by Kunda1 »

tsadowski wrote: Fri Feb 21, 2020 5:35 pm I asked the spacenavd developer. The offending message is gone. This will be fixed when the distribution packages are updated.
That is awesome news. Thank you! Any idea when they will be cutting a new release ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
tsadowski
Posts: 36
Joined: Tue Jan 20, 2015 10:50 pm

Re: [Solved Upstream] When loading FC console shows: "connect failed: No such file or directory"

Post by tsadowski »

I did ask for a new release but the maintainer declined. I created a git package in the Arch user repository.

Does someone know what the policies are for git packages in the different Linux distros?

Cheers, Torsten
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Solved Upstream] When loading FC console shows: "connect failed: No such file or directory"

Post by Kunda1 »

tsadowski wrote: Sat Feb 29, 2020 8:23 pm I did ask for a new release but the maintainer declined. I created a git package in the Arch user repository.
When's the next release slated for ?
tsadowski wrote: Sat Feb 29, 2020 8:23 pm Does someone know what the policies are for git packages in the different Linux distros?
Maybe Kurt does?
I'm sure debian is out of the equation. not sure about Ubuntu. I bet the PPA would be fine pulling from Arch. I guess we could ask the different packagers over in the packaging subforum https://forum.freecadweb.org/viewforum.php?f=42
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
tsadowski
Posts: 36
Joined: Tue Jan 20, 2015 10:50 pm

Re: [Solved Upstream] When loading FC console shows: "connect failed: No such file or directory"

Post by tsadowski »

Releases of libspnav are very irregular. The last release (0.2.3) was 2014. The maintainer suggests either to use a specific git revision or to add the commit containing the wanted change to the package diffs.

https://sourceforge.net/p/spacenav/patches/8/

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

Re: [Solved Upstream] When loading FC console shows: "connect failed: No such file or directory"

Post by looo »

It's patched for the conda-forge package. So the warning shouldn't show up for the coming appimages:
https://github.com/conda-forge/libspnav ... 28be93e88e
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Solved Upstream] When loading FC console shows: "connect failed: No such file or directory"

Post by Kunda1 »

Thank you @looo!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply