Bug 241401 - cad/freecad fails to run: 'no such file or directory'.
Summary: cad/freecad fails to run: 'no such file or directory'.
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Christoph Moench-Tegeder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-21 22:15 UTC by Nicola Mingotti
Modified: 2019-10-28 20:34 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cmt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicola Mingotti 2019-10-21 22:15:47 UTC
Hi,

I can't run FreeCAD in FreeBSD anymore. 

I am using FreeBSD 12.0, instal form pagkace after `pkg update; pkg upgrade`. 

FreeCAD fails to run with this output: 
===================================
$> FreeCAD                                                                                                     
FreeCAD 0.18, Libs: 0.18R0.18.3                                                                                                   
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019                                                                         
  #####                 ####  ###   ####                                                                                          
  #                    #      # #   #   #                                                                                         
  #     ##  #### ####  #     #   #  #   #                                                                                         
  ####  # # #  # #  #  #     #####  #   #                                                                                         
  #     #   #### ####  #    #     # #   #                                                                                         
  #     #   #    #     #    #     # #   #  ##  ##  ##                                                                             
  #     #   #### ####   ### #     # ####   ##  ##  ##                                                                             

Error in InitApplications [Errno 2] No such file or directory                                                                   
--------------------------------------------------------------------------------                                                
Traceback (most recent call last):                                                                                              
  File "/usr/local/lib/python3.6/pkgutil.py", line 412, in get_importer                                                         
    importer = sys.path_importer_cache[path_item]                                                                               
KeyError: ''                                                                                                                    
                                                                                                                                
During handling of the above exception, another exception occurred: 

                                                                                                                                
Traceback (most recent call last):                                                                                              
  File "<string>", line 241, in <module>                                                                                        
  File "<string>", line 155, in InitApplications
  File "/usr/local/FreeCAD/Ext/freecad/__init__.py", line 2, in <module>
    __path__ = pkgutil.extend_path(__path__, __name__)
  File "/usr/local/lib/python3.6/pkgutil.py", line 557, in extend_path
    finder = get_importer(dir)
  File "/usr/local/lib/python3.6/pkgutil.py", line 416, in get_importer
    importer = path_hook(path_item)
  File "<frozen importlib._bootstrap_external>", line 1324, in path_hook_for_FileFinder
  File "<frozen importlib._bootstrap_external>", line 102, in _path_isdir
FileNotFoundError: [Errno 2] No such file or directory
--------------------------------------------------------------------------------

Error in FreeCADGuiInit.py: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "<string>", line 175, in <module>
  File "<string>", line 137, in InitApplications
  File "/usr/local/FreeCAD/Ext/freecad/__init__.py", line 2, in <module>
    __path__ = pkgutil.extend_path(__path__, __name__)
  File "/usr/local/lib/python3.6/pkgutil.py", line 557, in extend_path
    finder = get_importer(dir)
  File "/usr/local/lib/python3.6/pkgutil.py", line 416, in get_importer
    importer = path_hook(path_item)
  File "<frozen importlib._bootstrap_external>", line 1324, in path_hook_for_FileFinder
  File "<frozen importlib._bootstrap_external>", line 102, in _path_isdir
<class 'FileNotFoundError'>: [Errno 2] No such file or directory

===================================

bye
Nicola Mingotti
Comment 1 Christoph Moench-Tegeder freebsd_committer 2019-10-22 06:09:31 UTC
If that worked before the "pkg upgrade" - which packages have been upgraded?
Comment 2 Nicola Mingotti 2019-10-22 18:09:45 UTC
(In reply to Christoph Moench-Tegeder from comment #1)

Unfortunately it is not so direct. 

The package FreeCAD was working in FreeBSD 11.X, I used it. Since a few months I moved to FreeBSD 12.0, yesterday I wanted to use FreeCAD, I installed and I saw it is not working.

Before doing the `pkg upgrade` I was getting an error concerning Qt libraries, after `pkg upgrade`, Qt libraries were updated, theat problem was solved, but still the program stops somewhere. 

If it can be of any help, I can tell you that I tryed to run it in also Linux compability mode and I have problems even in that way. 

bye
Nicola
Comment 3 Nicola Mingotti 2019-10-22 23:19:49 UTC
If I compile from the port with -DBATCH option FreeCAD works. 
Ports freshly updated before the compile. I generally use packages.

Unfortunately the port is very large, it took me hours to compile it. It is better to have the package working;) 

bye
Nicola
Comment 4 Christoph Moench-Tegeder freebsd_committer 2019-10-27 14:41:02 UTC
I think something went wrong with your whole upgrade process - the exceptions above are all coming out of python's own pkgutil.py and "really shouldn't happen that way". What's more, this is the first report of FreeCAD not working in this way, and there are more users of this port than just you and me...
Did you perhaps upgrade the base system from 11 to 12 with all the ports left in place? I'm not sure that whould be a safe thing to do, you'd have to reinstall almost all ports...
Comment 5 Nicola Mingotti 2019-10-28 07:41:19 UTC
Hi Cristoph,

-] This installation of FreeBSD-12 is fresh, not an upgrade from 11.X. 

-] I work daily on the image, so, of course, I added and removed stuff in time. But I try to stick as much as possible to packages. 

-] Before the `pkg upgrade` the install of FreeCAD was failing due a QtCore minor number. If I remember well. The `pkg upgrade` completed without any issues.

-] I don't use any popular fat Desktop environment. I use fvwm so, it may be the case that the problem does not manifest itself in general because most of the FreeCAD users in FreeBSD are working (i suppose) with Gnome and KDE which load a tremendous amount of stuff for themselves.

-] The single component that has created me recurrent headaches is Qt.

Unfortunately I can't tell you more than this at the moment. I have other FreeBSD-12 installations but they are headless.
Comment 6 Christoph Moench-Tegeder freebsd_committer 2019-10-28 20:34:03 UTC
(In reply to Nicola Mingotti from comment #5)

> -] I work daily on the image, so, of course, I added and removed stuff in time. > But I try to stick as much as possible to packages. 

That doesn't make this any easier. And now that you've rebuild FreeCAD it's about impossible to re-create the broken state. Hm.

> -] I don't use any popular fat Desktop environment. I use fvwm so, it may be the case that the problem does not manifest itself in general because most of the FreeCAD users in FreeBSD are working (i suppose) with Gnome and KDE which load a tremendous amount of stuff for themselves.

Rest assured that FreeCAD works very well under fvwm.

I don't think we'll make any progress here - the non-working state is gone and can't be debugged any more, and this was the only report of such problems (I run my own poudriere and use those packages - "it just works"). What's more, there's 0.18.4 around the corner, I'm only waiting for the final announcement (lest upstream rolls some last-minute-fix). I'm closing this, please report back if it breaks again.