Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 19:03
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Linking Problem with OpenCascade
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Fri 04 Nov 2011, 04:19    Post_subject:  Linking Problem with OpenCascade
Sub_title: 3d Library
 

I want to compile FreeCad (3d Cad program), It uses OpenCascade technology. OpenCascade would actually be quite cool to have, because it is the engine behind lots of 3d projects.
I already have compiled a decent stack of dependencies, nailed out some bugs and applied patches and I think I am 95% through with the built. But I got stuck on something and maybe somebody sees what I don't.

As the last Stage, when all the OpenCascade Libraries were built, it compiles "DRAWEXE". This is a simple 3d drawer/Viewer. I get an error at the final linking stage i.e. I have DRAWEXE.o

the Makefile executes
Code:
g++ -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -o .libs/DRAWEXE DRAWEXE.o  ../TKDraw/.libs/libTKDraw.so -L/usr/lib/tbb -L/usr/lib /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKMesh/.libs/libTKMesh.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKHLR/.libs/libTKHLR.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so ../TKMesh/.libs/libTKMesh.so ../TKGeomAlgo/.libs/libTKGeomAlgo.so ../TKTopAlgo/.libs/libTKTopAlgo.so ../TKHLR/.libs/libTKHLR.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKTopAlgo/.libs/libTKTopAlgo.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKGeomAlgo/.libs/libTKGeomAlgo.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKBRep/.libs/libTKBRep.so ../TKGeomBase/.libs/libTKGeomBase.so ../TKG2d/.libs/libTKG2d.so ../TKBRep/.libs/libTKBRep.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKGeomBase/.libs/libTKGeomBase.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKG3d/.libs/libTKG3d.so ../TKMath/.libs/libTKMath.so ../TKG3d/.libs/libTKG3d.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKG2d/.libs/libTKG2d.so ../TKernel/.libs/libTKernel.so ../TKService/.libs/libTKService.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKMath/.libs/libTKMath.so /initrd/mnt/dev_save/COMPILE/ros/adm/make/TKernel/.libs/libTKernel.so /usr/lib/libstdc++.so -lm -lrt -ltcl8.5 -ltk8.5 -ltbb -ltbbmalloc -lXt /usr/lib/libX11.so /usr/lib/libXau.so /usr/lib/libXdmcp.so -lXmu -ldl -lpthread -Wl,--rpath -Wl,/opt/OpenCascade/lib


which bombs with

Code:
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::accessPixels() const'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::convertToType(FREE_IMAGE_TYPE, int)'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::convertTo24Bits()'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::getColorType() const'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::getWidth() const'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::save(char const*, int) const'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::getImageType() const'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::~fipImage()'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::colorQuantize(FREE_IMAGE_QUANTIZE)'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::adjustGamma(double)'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::getHeight() const'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `FreeImage_GetFIFFromFilename'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::fipImage(fipImage const&)'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::getPixelColor(unsigned int, unsigned int, tagRGBQUAD*) const'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::getScanLine(unsigned short) const'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::operator=(FIBITMAP*)'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, unsigned short, unsigned short)'
/initrd/mnt/dev_save/COMPILE/ros/adm/make/TKService/.libs/libTKService.so: undefined reference to `FreeImage_ConvertFromRawBits'
collect2: ld returned 1 exit status
make: *** [DRAWEXE] Error 1


Now it seems It cant find the library functions of the FreeImage library. But I checked that I have this library (in /usr/lib/libfreeimage.so and libfreeimage.a) and I also have FreeImage.h and FreeImagePlus.h (which is a c++ wrapper around FreeImage.h) in /usr/include.

I also checked that the missing functions are present in the header files. So my guess is that it doesn't pick up the library correctly at the linker stage. The Makefile is rather cryptic for my untrained eyes, but I have identified:

Code:
CSF_FreeImagePlus_INCLUDES = -I/usr/include/ #-DHAVE_FREEIMAGE
CSF_FreeImagePlus_LIB = -L/usr/lib -lfreeimage


this goes into

Code:
DRAWEXE_LDADD = ../TKDraw/libTKDraw.la \
../TKMesh/libTKMesh.la \
../TKGeomAlgo/libTKGeomAlgo.la \
../TKTopAlgo/libTKTopAlgo.la \
../TKHLR/libTKHLR.la \
../TKGeomBase/libTKGeomBase.la \
../TKG2d/libTKG2d.la \
../TKBRep/libTKBRep.la \
../TKMath/libTKMath.la \
../TKG3d/libTKG3d.la \
../TKernel/libTKernel.la \
../TKService/libTKService.la \
 $(STLPort_LIB) $(CSF_TclLibs_LIB) $(CSF_TclTkLibs_LIB) $(CSF_gdi32_LIB) $(CSF_advapi32_LIB) $(CSF_user32_LIB) $(CSF_TBB_LIB) $(CSF_SOCKETLibs_LIB) $(CSF_FPELibs_LIB) $(CSF_ThreadLibs_LIB) $(CSF_kernel32_LIB) $(CSF_MotifLibs_LIB) $(CSF_XwLibs_LIB) $(CSF_dpsLibs_LIB) $(CSF_XmuLibs_LIB) $(CSF_FreeImagePlus_LIB) 



and the linking step in the makefile

Code:
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@




which actually passes the call of the compiler to the script "libtool".

Well, I know I cannot expect to have somebody give me a walkthrough, but I would appreciate any comments on

a) general strategies to solve this and similar problems
b) how can I reduce this problem to a "minimum Non-Working example"
c) Maybe somebody spots something really obvious and I am lucky Very Happy

I am working on a Lupu 511 base. I append the full Makefile just in case.
Thank you in advance
emil
Back to top
View user's profile Send_private_message Visit_website 
Ibidem

Joined: 25 May 2010
Posts: 501
Location: State of Jefferson

PostPosted: Tue 29 Nov 2011, 23:52    Post_subject:  

1. It seems you didn't attach the makefile?
2. Looking at the code you showed, it seems there are two things:
a- There should be a \ after EVERY line except the last in the variable DRAWEXE_LDADD
b- grep for DRAWEXE_LDADD -- if it isn't somewhere else, you have a big problem in the makefile.
[/code]
Back to top
View user's profile Send_private_message 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Wed 30 Nov 2011, 12:21    Post_subject:  

Hi -thanks for respond -
yep I somehow missed the makefile, sorry. I work on something different atm, but I will go back to this. In a PM I got also the hint of the commented option #-DHAVE_FREEIMAGE. Will try those things and give an update, but it will need some weeks I guess.

thanks everybody Cool
emil
Back to top
View user's profile Send_private_message Visit_website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Wed 30 Nov 2011, 12:22    Post_subject:  

Hi -thanks for respond -
yep I somehow missed the makefile, sorry. I work on something different atm, but I will go back to this. In a PM I got also the hint of the commented option #-DHAVE_FREEIMAGE. Will try those things and give an update, but it will need some weeks I guess.

thanks everybody Cool
emil
Back to top
View user's profile Send_private_message Visit_website 
paulski

Joined: 06 Oct 2006
Posts: 127
Location: Cologne, Germany &/or Perth, Australia

PostPosted: Wed 27 Feb 2013, 19:02    Post_subject:  

Hi emil,

Did you ever succeed in getting Freecad to go in Puppy?
I'm trying to use a Ubuntu Lucid build in Lupu Puppy 528.
Working my way through dependencies. Stealing a lot from ubuntu repositories and hoping they will work.

Perhaps you have a pile of pre made libs you are willing to share.

Did you document what you did to get 95% through?
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0664s ][ Queries: 11 (0.0047s) ][ GZIP on ]