Bug 1102621
| Summary: | FreeCAD fails to start properly due to undefined symbol | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Neil Darlow <neil> |
| Component: | freecad | Assignee: | Richard Shaw <hobbes1069> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | hobbes1069, john, kevin |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | smesh-5.1.2.2-10.svn55.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-10 03:06:56 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Neil Darlow
2014-05-29 10:27:51 UTC
Great... I noticed this in Fedora-review but I haven't had any problems running freecad locally. Getting the human readable name: $ c++filt "_ZN4Part29BRepOffsetAPI_MakePipeShellPy3addEP7_object" Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) Looking for where it's defined: $ grep -r "BRepOffsetAPI_MakePipeShellPy::add" src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp.oce_015:PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args) src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp:PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args) I'm far from an expert here but it looks like Part.so should be providing the symbol, but pehaps through the python library? For posterity, here's the full list which we'll likely run into even if this one is fixed: ]$ rpmlint freecad | grep undefined-non-weak-symbol freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/ReverseEngineering.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Sketcher.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Raytracing.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPartGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Part.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/DrawingGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so TColgp_Array1OfXYZ::Destroy() freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so TColgp_Array1OfXYZ::TColgp_Array1OfXYZ(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so TColgp_Array1OfXYZ::TColgp_Array1OfXYZ(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so TColgp_Array1OfVec::TColgp_Array1OfVec(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so MeshVS_HArray1OfSequenceOfInteger::MeshVS_HArray1OfSequenceOfInteger(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so TColgp_Array1OfXYZ::Destroy() freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so Expr_Array1OfNamedUnknown::Expr_Array1OfNamedUnknown(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so TColgp_HArray1OfVec::TColgp_HArray1OfVec(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/FemGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/PartGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so TColgp_Array1OfXYZ::Destroy() freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so TColgp_Array1OfXYZ::TColgp_Array1OfXYZ(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so TColgp_Array1OfXYZ::TColgp_Array1OfXYZ(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so TColgp_Array1OfVec::TColgp_Array1OfVec(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so MeshVS_HArray1OfSequenceOfInteger::MeshVS_HArray1OfSequenceOfInteger(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so TColgp_Array1OfXYZ::Destroy() freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so Expr_Array1OfNamedUnknown::Expr_Array1OfNamedUnknown(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so TColgp_HArray1OfVec::TColgp_HArray1OfVec(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Fem.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/SketcherGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so TColgp_Array1OfXYZ::Destroy() freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so TColgp_Array1OfXYZ::TColgp_Array1OfXYZ(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so TColgp_Array1OfXYZ::TColgp_Array1OfXYZ(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so TColgp_Array1OfVec::TColgp_Array1OfVec(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so MeshVS_HArray1OfSequenceOfInteger::MeshVS_HArray1OfSequenceOfInteger(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so TColgp_Array1OfXYZ::Destroy() freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so Expr_Array1OfNamedUnknown::Expr_Array1OfNamedUnknown(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so TColgp_HArray1OfVec::TColgp_HArray1OfVec(int, int) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/MeshPart.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/RobotGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/ImportGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/InspectionGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Robot.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/RaytracingGui.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Inspection.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) freecad.x86_64: W: undefined-non-weak-symbol /usr/lib64/freecad/lib/Drawing.so Part::BRepOffsetAPI_MakePipeShellPy::add(_object*) The question is, what changed? I haven't changed the way freecad is building... I am building against a newer version of OCE (0.15) than what I think is on RPM Fusion but I've been running it locally for some time without issue. Could it be buildsystem differences between RPM Fusion and Fedora? I suppose you might try migrating the existing freecad-0.13-4 into Fedora and see if the build fails in a similar fashion (assuming you didn't start out this way). The only other thing I could possibly suggest is that it could be a C++ namespace issue but that's clutching at straws. Ok, now I'm even more confused... When I look through the build logs[1] I see this:
Linking CXX shared library ../../../../Mod/Part/Part.so
cd /builddir/build/BUILD/freecad-0.13.1830/build/src/Mod/Part/App && /usr/bin/cmake -E cmake_link_script CMakeFiles/Part.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_OCC64 -Wl,--as-needed -shared -Wl,-soname,Part.so -o ../../../../Mod/Part/Part.so
[SNIP]
CMakeFiles/Part.dir/BRepOffsetAPI_MakePipeShellPyImp.cpp.o
[SNIP]
Ok, So this file here includes the generated file and header, BRepOffsetAPI_MakePipeShellPy.{h,cpp} which is built into the Part.so library
[1] https://kojipkgs.fedoraproject.org//packages/freecad/0.13/6.fc20/data/logs/x86_64/build.log
I've dorked around with this all day (at work no less) and I'm completely confused. We need the help of an actual programmer. Try building the package with: %cmake … -DBUILD_SHARED_LIBS:BOOL=OFF so that unspecified libraries get built as static. Some CMakeLists.txt setups expect that, i.e., they just use add_library without specifying STATIC and expect it to be a static library by default (whereas others expect users to use BUILD_SHARED_LIBS to decide whether to build static or shared libraries for their public libraries). Tried a suggestion from the freecad forums first, adding -Wl,--no-undefined and got this, not sure if it helps though: CMakeFiles/Part.dir/BRepOffsetAPI_MakePipeShellPyImp.cpp.o: In function `Part::BRepOffsetAPI_MakePipeShellPy::staticCallback_add(_object*, _object*)': /home/build/rpmbuild/freecad/BUILD/freecad-0.13.1830/build/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPy.cpp:568: undefined reference to `Part::BRepOffsetAPI_MakePipeShellPy::add(_object*)' Ack! I think I found it... the patch to be compatible had the #endif in the wrong place so "BRepOffsetAPI_MakePipeShellPy::add" was actually getting skipped! I'm not sure how this happened (or why it ever worked) since I used the patch I was given from upstream which was creating right out of a git commit... I guess that: 1. the context lines around the added #endif are not unique in that source file and 2. upstream changed some code elsewhere in the file that added or removed lines and thus the #endif got inserted in the wrong location. freecad-0.13-7.el6, smesh-5.1.2.2-10.svn55.el6, OCE-0.15-3.el6.1 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-1524/freecad-0.13-7.el6,smesh-5.1.2.2-10.svn55.el6,OCE-0.15-3.el6.1 freecad-0.13-7.fc20, OCE-0.15-3.fc20.1, smesh-5.1.2.2-10.svn55.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/FEDORA-2014-6805/OCE-0.15-3.fc20.1,smesh-5.1.2.2-10.svn55.fc20,freecad-0.13-7.fc20 I think we got it. Thanks Kevin for responding so quickly. Yes, FreeCAD starts correctly now. A broken upstream patch... who'd have thought? It reminds me of ad old adage often quoted by one of my ex-employers viz. "In God we trust... In humans we check!". Any thoughts on the upgrade path? A "yum update" will bail out and suggest using --skip-broken. I had to deinstall and then install freecad. I've setup the new update but it hasn't been pushed into testing yet. This bug should be updated when it does and then a yum update (with the testing repo enabled) should work fine. freecad-0.13-7.el6, smesh-5.1.2.2-10.svn55.el6, OCE-0.15-3.el6.1 has been pushed to the Fedora EPEL 6 testing repository. freecad-0.13-7.fc20, OCE-0.15-3.fc20.1, smesh-5.1.2.2-10.svn55.fc20 has been pushed to the Fedora 20 stable repository. smesh-5.1.2.2-10.svn55.el6, OCE-0.15-3.el6.1 has been pushed to the Fedora EPEL 6 stable repository. |