Release Branch for 0.9 & New LibPack

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Release Branch for 0.9 & New LibPack

Post by yorik »

But you are right neverthless. This line gives the error (in src/Mod/Sketcher/App):

x86_64-linux-gnu-g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.3.4/crtbeginS.o .libs/Sketcher_la-AppSketcher.o -Wl,--rpath -Wl,/usr/lib/freecad/lib -Wl,--rpath -Wl,/usr/lib/freecad/Mod/Part -Wl,--rpath -Wl,/usr/lib/freecad/Mod/Sketcher -L/home/yorik/fcpackage/FreeCAD-0.9.2646/src/Base -L/home/yorik/fcpackage/FreeCAD-0.9.2646/src/App -L/home/yorik/fcpackage/FreeCAD-0.9.2646/src/Mod/Part/App -L/usr/lib -lpthread -lboost_regex-mt -lboost_system-mt -lpython2.5 -L/home/yorik/fcpackage/FreeCAD-0.9.2646/debian/tmp/freecad/usr/lib -lxerces-c -L/home/yorik/fcpackage/FreeCAD-0.9.2646/debian/tmp/freecad/usr/lib/freecad/lib -L/usr/lib/freecad/lib -lFreeCADBase -lFreeCADApp -L/home/yorik/fcpackage/FreeCAD-0.9.2646/debian/tmp/freecad/usr/lib/freecad/Mod/Part -L/usr/lib/freecad/Mod/Part -lPart -lTKernel -lTKG2d -lTKG3d -lTKMath -lTKSTEP -lTKIGES -lTKSTL -lTKShHealing -lTKXSBase -lTKBool -lTKBO -lTKBRep -lTKTopAlgo -lTKGeomAlgo -lTKGeomBase -lTKOffset -lTKPrim -lTKHLR -L/home/yorik/fcpackage/FreeCAD-0.9.2646/debian/tmp/freecad/usr/lib/freecad/Mod/Sketcher -L/usr/lib/freecad/Mod/Sketcher -lSketcher -L/usr/lib/gcc/x86_64-linux-gnu/4.3.4 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../.. -L/usr/lib/x86_64-linux-gnu -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.3.4/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib/crtn.o -Wl,-z -Wl,defs -Wl,-soname -Wl,Sketcher.so -o .libs/Sketcher.so
.libs/Sketcher_la-AppSketcher.o: In function `initSketcher':
/home/yorik/fcpackage/FreeCAD-0.9.2646/src/Mod/Sketcher/App/AppSketcher.cpp:53: undefined reference to `Sketcher_methods'
/home/yorik/fcpackage/FreeCAD-0.9.2646/src/Mod/Sketcher/App/AppSketcher.cpp:61: undefined reference to `Sketcher::SketchObject::init()'
collect2: ld returned 1 exit status

But if I remove "-Wl,-z -Wl,defs" form the g++ line, it runs without error... The funny thing is that if I do "make" manually, in that same directory, the exact same g++ command as above is executed (with -Wl,-z -Wl,defs), but this time without error? It's hard to understand...
wmayer
Founder
Posts: 20306
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Release Branch for 0.9 & New LibPack

Post by wmayer »

The point is that by default when libtool is creating a library not all symbols need to be resolved at that time. Once, the application is running then this is the latest time where really all symbols must be resolved.

Since this feature is a bit problematic for application modules you won't never ever see at compile/link time that there might be missing source files or so in the makefile. Then when running the app and loading the concerning module you'll get an error message. That's the reason why we use -Wl,-z -Wl,defs.

So, if you build the sources without set -Wl,-z -Wl,defs you won't get an linker error but when running the app and loading the Sketcher module you'll run into an error.
wmayer
Founder
Posts: 20306
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Release Branch for 0.9 & New LibPack

Post by wmayer »

Ah, there is one thing I remember right now: do you have built the pythonOCC and/or the Salome GEOM module on your system? As far as I can remember there is also a library libSketcher.so part of the GEOM stuff which conflicts with FreeCAD's sketcher module.
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Release Branch for 0.9 & New LibPack

Post by yorik »

That's it! you are right, I had salomegeom (for pythonOCC)... I removed it and the package compiles fine...
I'll just upload the debian 64bits package now.

Thanks for the help Werner!
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Release Branch for 0.9 & New LibPack

Post by yorik »

Werner, I have problems with both packages I just made (debian & karmic): in the debian one I get an error when doing this:

Code: Select all

from pivy import coin
sg = Gui.ActiveDocument.ActiveView.getSceneGraph()
cube = coin.SoCube()
sg.addChild(cube)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/lib/pymodules/python2.5/pivy/coin.py", line 41175, in addChild
return _coin.SoGroup_addChild(*args)
TypeError: in method 'SoGroup_addChild', argument 1 of type 'SoGroup *'

The funny thing is that the same code works fine with my normal trunk FreeCAD version...

The karmic package shows another error: when I start FreeCAD, and try to create a new document, the application crashes with this message:

freecad: SoBase.cpp:190: SoBase::SoBase(): Assertion `(SoBase::classTypeId != SoType::badType()) && "An SoBase-derived class was attempted instantiated *before* Coin initialization. (Have you perhaps placed an SoBase-derived instance (e.g. a scene graph node) in non-heap memory?) See SoBase class documentation for more info."' failed.

Too bad, just when I was getting some success ;)
Any idea? Do you think I should try to compile FreeCAD on karmic the "normal" way too, to sse if there is some difference?
Cheers
Yorik
wmayer
Founder
Posts: 20306
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Release Branch for 0.9 & New LibPack

Post by wmayer »

Hi Yorik,

for both errors you must make sure to use the same python, coin and soqt versions for FreeCAD and pivy. To judge by the error text this possibly is not the case.

Cheers,
Werner
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Release Branch for 0.9 & New LibPack

Post by yorik »

Hm I think you're right, the python package upgraded a couple of days ago...
And the karmic computer here still has an old pivy... I forgot about that.
Thanks for the help! This time I hope I'll come back with everything working!
Yorik
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Release Branch for 0.9 & New LibPack

Post by yorik »

Okay, this time everything is working!
You were right Werner, everything was because of a too old pivy package. Thanks a lot for helping me out!
So, here are all the 64bit packages I made:

For debian testing:
FreeCAD 0.9 : http://yorik.uncreated.net/archive/pack ... _amd64.deb
Pivy : http://yorik.uncreated.net/archive/pack ... _amd64.deb

For ubuntu karmic:
FreeCAD 0.9 : http://yorik.uncreated.net/archive/pack ... _amd64.deb
Pivy : http://yorik.uncreated.net/archive/pack ... _amd64.deb

Sorry about the not too orthodox naming...
Post Reply