FreeCAD Application Execution Aborted [SOLVED]

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Bebopity
Posts: 11
Joined: Sat Apr 30, 2022 7:12 pm

FreeCAD Application Execution Aborted [SOLVED]

Post by Bebopity »

Hi everyone, I'm trying to run FreeCAD in the freecad-build/bin/ directory. Currently, I am running into a problem when I try to actually execute the application. It seems it can't boot the application and aborts immediately. You can see the message I get in the .png file I attached to this post.

I've compiled and built FreeCAD out of source using an ubuntu docker container on WSL-2 (Ubuntu 20.04). I reached 100% build but I may have missed some error/warning messages throughout the build process.

So far, I have tried executing the application in the same manner outside of the container, on WSL-2, but have had no luck. This time, however, I get an actual error message, here it is:
./FreeCAD: error while loading shared libraries: libFreeCADGui.so: cannot open shared object file: No such file or directory

I located libFreeCADGui.so in the freecad-build/lib/ directory. It seems like the issue is rooted at this "missing" shared object file but I'm not sure, can anyone here provide any assistance?

I am following the build guide for Ubuntu found in freecad-source/tools/build/README.rst.
Attachments
FreeCADExecuteAborted.PNG
FreeCADExecuteAborted.PNG (33.02 KiB) Viewed 2381 times
Last edited by Bebopity on Sun May 22, 2022 6:14 am, edited 1 time in total.
chrisb
Veteran
Posts: 53934
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD Application Execution Aborted

Post by chrisb »

Hi and welcome to the forum!

You may get additional information by starting FreeCAD with the additional parameter --write-log, which creates a log file in your FreeCAD directory.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD Application Execution Aborted

Post by wmayer »

What does ldd FreeCAD say? In case it says that libFreeCADGui.so cannot be found you have to set LD_LIBRARY_PATH before running FreeCAD.
Bebopity
Posts: 11
Joined: Sat Apr 30, 2022 7:12 pm

Re: FreeCAD Application Execution Aborted

Post by Bebopity »

I've now set the LD_LIBRARY_PATH and I've resolved the missing dependencies; thanks for the ldd command. I've posted a txt file of the ldd FreeCAD message log to show that I have in fact linked all of the dependencies to LD_LIBRARY_PATH; yet, I am still getting aborted when I try to launch FreeCAD.

I have to launch FreeCAD from within the docker container, correct? I mean, why else would I have made it...

I am looking back into the errors, warnings, and missing components I saw being logged during the build process, so that may have to do with it. Here are a few of them after running make -j$(nproc --ignore=2):
1.
/bin/sh: 1: bzr: not found
/bin/sh: 1: svnversion: not found
/bin/sh: 1: svn: not found
Unknown version control
2.
[ 45%] Building CXX object src/App/CMakeFiles/FreeCADApp.dir/GeoFeatureGroupExtension.cpp.o
In file included from /builds/freecad-source/src/App/Expression.cpp:3191:
ExpressionParser.tab.c: In function 'int App::ExpressionParser::ExpressionParser_yyparse()':
ExpressionParser.tab.c:2093:18: warning: 'void free(void*)' called on unallocated object 'yyssa' [-Wfree-nonheap-object]
In file included from /builds/freecad-source/src/App/Expression.cpp:3191:
ExpressionParser.tab.c:1202:18: note: declared here
3.
[ 45%] Building CXX object src/App/CMakeFiles/FreeCADApp.dir/GeoFeatureGroupExtension.cpp.o
In file included from /builds/freecad-source/src/App/Expression.cpp:3191:
ExpressionParser.tab.c: In function 'int App::ExpressionParser::ExpressionParser_yyparse()':
ExpressionParser.tab.c:2093:18: warning: 'void free(void*)' called on unallocated object 'yyssa' [-Wfree-nonheap-object]
In file included from /builds/freecad-source/src/App/Expression.cpp:3191:
ExpressionParser.tab.c:1202:18: note: declared here

I'm currently looking into these. Do you think these, or similar warnings, are the cause of the issue? Thanks.
Attachments
ldd FreeCAD.txt
(7.71 KiB) Downloaded 37 times
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD Application Execution Aborted

Post by wmayer »

1.
/bin/sh: 1: bzr: not found
/bin/sh: 1: svnversion: not found
/bin/sh: 1: svn: not found
Unknown version control
I wonder why it doesn't mention git here. But nevertheless, it's only about showing a version number in the About dialog. Nothing serious.
2.
[ 45%] Building CXX object src/App/CMakeFiles/FreeCADApp.dir/GeoFeatureGroupExtension.cpp.o
Can be ignored.
3.
[ 45%] Building CXX object src/App/CMakeFiles/FreeCADApp.dir/GeoFeatureGroupExtension.cpp.o
Same here.

The txt file mentions the Python version 3.10
libpython3.10.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.10.so.1.0 (0x00007f7dffa7f000)
A Debian user has reported a problem recently because his shiboken/PySide version is built against an older Python version. Can you double-check that your shiboken version depends on Python 3.10?

Code: Select all

ldd /usr/lib/x86_64-linux-gnu/libshiboken2.cpython-310-x86_64-linux-gnu.so.5.15
ldd /usr/lib/x86_64-linux-gnu/libpyside2.cpython-310-x86_64-linux-gnu.so.5.15
According to its filename it probably does.

Next thing to try is starting FreeCAD in a debugger because this may give us some clue where exactly it crashes.

Code: Select all

gdb ./FreeCAD
run
after the crash enter this into the console

Code: Select all

bt
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCAD Application Execution Aborted

Post by adrianinsaval »

are you trying to run the FreeCAD GUI? do other GUI apps run successfully from the docker container? in other words, do you have a properly configured and connected X server?
Out of curiosity, are you running docker for windows with the WSL backend or are you running docker inside WSL?
Bebopity
Posts: 11
Joined: Sat Apr 30, 2022 7:12 pm

Re: FreeCAD Application Execution Aborted

Post by Bebopity »

Thank you for the quick replies.

I believe I am running docker for windows with the WSL backend. I installed docker for windows (Docker Desktop) and now my docker commands work in WSL. The Docker Desktop app's displayed containers, images, and volumes are consistent with what I see on WSL, and in the general settings the "Use the WSL 2 based engine (Windows Home can only run the WSL 2 backend)" checkbox is checked.

I will try to run a different GUI app and get back to you. I'm going to dive into the windows x-server, VcXsrv.

I believe that my shiboken version does depend on Python 3.10.

I ran the gdb debugger and it seems I'm missing ./nptl/pthread_kill.c. I can't find it anywhere in my container.

I've got a lot of debugging to do so I probably won't update ya'll for a while. Thanks for the help!

Command Message Logs

This is the latest change log for libshiboken (/usr/share/doc/libshiboken2-dev/changelog.Debian.gz)

Code: Select all

pyside2 (5.15.2-2build2) jammy; urgency=medium

  * No-change rebuild against Qt 5.15.3.

 -- Dmitry Shachnev <mitya57@ubuntu.com>  Sat, 19 Mar 2022 21:58:20 +0300

pyside2 (5.15.2-2build1) jammy; urgency=medium

  * No-change rebuild with Python 3.10 only.

 -- Matthias Klose <doko@ubuntu.com>  Thu, 17 Mar 2022 15:07:19 +0100

pyside2 (5.15.2-2) unstable; urgency=medium

  * Backport upstream patches for Python 3.10 support (closes: #999369).
  * Backport upstream patch to adapt for LLVM 12.01.
  * Run build-time tests with all supported Python versions.
    - Add a patch to make the tests find the matching build directory.

 -- Dmitry Shachnev <mitya57@debian.org>  Tue, 16 Nov 2021 12:16:14 +0300
Here is the result of running

Code: Select all

ldd /usr/lib/x86_64-linux-gnu/libshiboken2.cpython-310-x86_64-linux-gnu.so.5.15
ldd /usr/lib/x86_64-linux-gnu/libpyside2.cpython-310-x86_64-linux-gnu.so.5.15
==>

Code: Select all

root@7d8ce0a84ddd:/# ldd /usr/lib/x86_64-linux-gnu/libshiboken2.cpython-310-x86_64-linux-gnu.so.5.15
        linux-vdso.so.1 (0x00007ffc2dd5f000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0609e4d000)
        libgcc_s.so.1 => /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0609e2d000)
        libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007f0609c05000)
        libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007f0609b1e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f060a0c7000)
root@7d8ce0a84ddd:/# ldd /usr/lib/x86_64-linux-gnu/libpyside2.cpython-310-x86_64-linux-gnu.so.5.15
        linux-vdso.so.1 (0x00007ffc3369f000)
        libshiboken2.cpython-310-x86_64-linux-gnu.so.5.15 => /usr/lib/x86_64-linux-gnu/libshiboken2.cpython-310-x86_64-linux-gnu.so.5.15 (0x00007f2f7160e000)
        libQt5Qml.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 (0x00007f2f71184000)
        libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f2f70c25000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2f709f9000)
        libgcc_s.so.1 => /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2f709d7000)
        libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007f2f707af000)
        libQt5Network.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007f2f705fe000)
        libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007f2f70517000)
        libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00007f2f704fb000)
        libdouble-conversion.so.3 => /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007f2f704e6000)
        libicui18n.so.70 => /usr/lib/x86_64-linux-gnu/libicui18n.so.70 (0x00007f2f701b5000)
        libicuuc.so.70 => /usr/lib/x86_64-linux-gnu/libicuuc.so.70 (0x00007f2f6ffba000)
        libpcre2-16.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f2f6ff31000)
        libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f2f6fe62000)
        libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f2f6fd28000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2f7168d000)
        libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f2f6fcd2000)
        libicudata.so.70 => /usr/lib/x86_64-linux-gnu/libicudata.so.70 (0x00007f2f6e0b4000)
        libpcre.so.3 => /usr/lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f2f6e03e000)
        libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f2f6df73000)
        libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f2f6df44000)
        libcom_err.so.2 => /usr/lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f2f6df3e000)
        libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f2f6df2e000)
        libkeyutils.so.1 => /usr/lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f2f6df27000)
        libresolv.so.2 => /usr/lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f2f6df13000)
Here is what I get when I "run" the app in gdb and then "bt"

Code: Select all

(gdb) run
Starting program: /builds/Dev/freecad-build/bin/FreeCAD
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
FreeCAD 0.20, Libs: 0.20RUnknown
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2022
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####
  #                    #      # #   #   #
  #     ##  #### ####  #     #   #  #   #
  ####  # # #  # #  #  #     #####  #   #
  #     #   #### ####  #    #     # #   #
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##


Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140023025111936) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140023025111936) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140023025111936) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140023025111936, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007f59ab8d4476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007f59ab8ba7f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007f59abd96ba3 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f59ac39d713 in QGuiApplicationPrivate::createPlatformIntegration() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#7  0x00007f59ac39dc08 in QGuiApplicationPrivate::createEventDispatcher() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#8  0x00007f59abfc6b07 in QCoreApplicationPrivate::init() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f59ac3a0b70 in QGuiApplicationPrivate::init() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#10 0x00007f59acab4ced in QApplicationPrivate::init() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007f59afc49c3d in Gui::GUIApplicationNativeEventAware::GUIApplicationNativeEventAware(int&, char**) () from /builds/Dev/freecad-build/lib/libFreeCADGui.so
#12 0x00007f59afc46f7b in Gui::GUIApplication::GUIApplication(int&, char**) () from /builds/Dev/freecad-build/lib/libFreeCADGui.so
#13 0x00007f59afc479ff in Gui::GUISingleApplication::GUISingleApplication(int&, char**) () from /builds/Dev/freecad-build/lib/libFreeCADGui.so
#14 0x00007f59afaf0154 in Gui::Application::runApplication() () from /builds/Dev/freecad-build/lib/libFreeCADGui.so
#15 0x000055b74ca13b6c in main ()
(gdb) exit
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD Application Execution Aborted

Post by wmayer »

That's the actual problem.
#4 0x00007f59ab8ba7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007f59abd96ba3 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007f59ac39d713 in QGuiApplicationPrivate::createPlatformIntegration() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
In order to run the GUI of Qt you need a plugin to support your platform. What's the display protocol that you use on that system? Wayland or X Window?

What's the output of?

Code: Select all

ls /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/
And is the environment variable QT_QPA_PLATFORM set? You can check it with

Code: Select all

echo $QT_QPA_PLATFORM
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCAD Application Execution Aborted

Post by adrianinsaval »

Bebopity wrote: Thu May 05, 2022 2:15 am I will try to run a different GUI app and get back to you. I'm going to dive into the windows x-server, VcXsrv.
Does this mean you had not installed and configured vcxsrv before? If not that is a prerequisite for running GUI apps on WSL on windows 10 (11 I think has built-in support for wayland but I have not tried win11 yet). IIRC setting up an x-server for WSL2 is more complicated than WSL1 so pay attention to find tutorials corresponding to your WSL version.
Bebopity
Posts: 11
Joined: Sat Apr 30, 2022 7:12 pm

Re: FreeCAD Application Execution Aborted - WSL 2 - [SOLVED]

Post by Bebopity »

You guys have been crazy helpful. I managed to get FreeCAD up and running after installing and configuring Windows X Server, VcXSrv.

Check out the attachment for a photo of a cool rocket engine injector I designed (using SolidWorks) in university that I loaded into FreeCAD!

Unfortunately, it is running at like < 5 fps. This, in addition to taking 45 minutes on my laptop to build the source files, seems like developing the code is going to be impossible. I am going to give it a shot on my beefed up gaming desktop pc, but, do you have any software development tips, generally speaking and pertaining to FreeCAD, that I can implement to modify the source code and debug efficiently?

Additional Debug Info

I followed this guide to set-up VcXSrv for WSL-2:
https://stackoverflow.com/questions/667 ... -with-wsl2

I get this warning after launching FreeCAD, doesn't seem like a big deal. I installed the packages nonetheless.

Code: Select all

Addon Manager Warning: Could not import QtWebEngineWidgets, it seems to be missing from your system. 
Please use your system's package manager to install the python3-pyside2.qtwebengine* and
python3-pyside2.qtwebchannel packages, and if possible alert your package creator to the missing dependency. 
Display of package README will be limited until this dependency is resolved.
Result of running ls /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/

Code: Select all

root@1598ddfc5e2c:/builds/freecad-build/bin# ls /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/
libqeglfs.so  libqlinuxfb.so  libqminimal.so  libqminimalegl.so  libqoffscreen.so  libqvnc.so  libqxcb.so
Result of running echo $QT_QPA_PLATFORM

Code: Select all

root@1598ddfc5e2c:/builds/freecad-build/bin# echo $QT_QPA_PLATFORM
^ No response
Post Reply