Hi,
I've been trying to port OpenCASCADE to MacOS. Moderate success with litle modifications most things seem to compile and link, but a sample application DRAWEXE fails to link. Looking at what is happening it looks as if the X11 libraries are not picked up.
This is an attempt with the GNU type tool chaing using:
./configure --disable-shared CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" LDFLAGS="-arch i386" --with-gl-include=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include --with-x --x-includes=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include --x-libraries=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib --with-tcl=/usr/lib --with-tk=/usr/lib
make
This compiles quite a lot but in the end fails with:
/bin/sh ../../../libtool --mode=link g++ -DCSFDB -DNO_CXX_EXCEPTION -g -DDEB -D_DEBUG -arch i386 -o DRAWEXE DRAWEXE.o ../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 -framework Tcl -framework Tk -lpthread -framework CoreFoundation
g++ -DCSFDB -DNO_CXX_EXCEPTION -g -DDEB -D_DEBUG -arch i386 -o DRAWEXE DRAWEXE.o -framework Tcl -framework Tk -framework CoreFoundation ../TKDraw/.libs/libTKDraw.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKMesh/.libs/libTKMesh.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKHLR/.libs/libTKHLR.a ../TKMesh/.libs/libTKMesh.a ../TKGeomAlgo/.libs/libTKGeomAlgo.a ../TKTopAlgo/.libs/libTKTopAlgo.a ../TKHLR/.libs/libTKHLR.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKTopAlgo/.libs/libTKTopAlgo.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKGeomAlgo/.libs/libTKGeomAlgo.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKBRep/.libs/libTKBRep.a ../TKGeomBase/.libs/libTKGeomBase.a ../TKG2d/.libs/libTKG2d.a ../TKBRep/.libs/libTKBRep.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKGeomBase/.libs/libTKGeomBase.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKG3d/.libs/libTKG3d.a ../TKMath/.libs/libTKMath.a ../TKG3d/.libs/libTKG3d.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKG2d/.libs/libTKG2d.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKMath/.libs/libTKMath.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKernel/.libs/libTKernel.a ../TKernel/.libs/libTKernel.a -lpthread
/usr/bin/ld: Undefined symbols:
_XCreateWindow
_XDisplayName
_XDrawString
_XFlush
_XFree
_XGetWindowAttributes
_XLookupString
_XNextEvent
_XPending
_XSetPlaneMask
_XStoreName
_XSynchronize
collect2: ld returned 1 exit status
make[3]: *** [DRAWEXE] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
How should I debug this?
The config and make files are very very long and there are about a hundred of them. I can't realy figure out where the libraries should be picked up. My thinking is that since this reportedly builds on Linux the real problem is not in the make / configure files (although it could be ofcourse) but in the parameters I supply.
Any ideas on how to debug this further would be appreciated.
What information should I post to help the good people at the forum to help me?
Is this the best forum for this problem?
br Kusti
I've been trying to port OpenCASCADE to MacOS. Moderate success with litle modifications most things seem to compile and link, but a sample application DRAWEXE fails to link. Looking at what is happening it looks as if the X11 libraries are not picked up.
This is an attempt with the GNU type tool chaing using:
./configure --disable-shared CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" LDFLAGS="-arch i386" --with-gl-include=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include --with-x --x-includes=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include --x-libraries=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib --with-tcl=/usr/lib --with-tk=/usr/lib
make
This compiles quite a lot but in the end fails with:
/bin/sh ../../../libtool --mode=link g++ -DCSFDB -DNO_CXX_EXCEPTION -g -DDEB -D_DEBUG -arch i386 -o DRAWEXE DRAWEXE.o ../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 -framework Tcl -framework Tk -lpthread -framework CoreFoundation
g++ -DCSFDB -DNO_CXX_EXCEPTION -g -DDEB -D_DEBUG -arch i386 -o DRAWEXE DRAWEXE.o -framework Tcl -framework Tk -framework CoreFoundation ../TKDraw/.libs/libTKDraw.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKMesh/.libs/libTKMesh.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKHLR/.libs/libTKHLR.a ../TKMesh/.libs/libTKMesh.a ../TKGeomAlgo/.libs/libTKGeomAlgo.a ../TKTopAlgo/.libs/libTKTopAlgo.a ../TKHLR/.libs/libTKHLR.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKTopAlgo/.libs/libTKTopAlgo.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKGeomAlgo/.libs/libTKGeomAlgo.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKBRep/.libs/libTKBRep.a ../TKGeomBase/.libs/libTKGeomBase.a ../TKG2d/.libs/libTKG2d.a ../TKBRep/.libs/libTKBRep.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKGeomBase/.libs/libTKGeomBase.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKG3d/.libs/libTKG3d.a ../TKMath/.libs/libTKMath.a ../TKG3d/.libs/libTKG3d.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKG2d/.libs/libTKG2d.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKMath/.libs/libTKMath.a /Users/nyholku/occ/opencascade-6.1/ros/adm/make/TKernel/.libs/libTKernel.a ../TKernel/.libs/libTKernel.a -lpthread
/usr/bin/ld: Undefined symbols:
_XCreateWindow
_XDisplayName
_XDrawString
_XFlush
_XFree
_XGetWindowAttributes
_XLookupString
_XNextEvent
_XPending
_XSetPlaneMask
_XStoreName
_XSynchronize
collect2: ld returned 1 exit status
make[3]: *** [DRAWEXE] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
How should I debug this?
The config and make files are very very long and there are about a hundred of them. I can't realy figure out where the libraries should be picked up. My thinking is that since this reportedly builds on Linux the real problem is not in the make / configure files (although it could be ofcourse) but in the parameters I supply.
Any ideas on how to debug this further would be appreciated.
What information should I post to help the good people at the forum to help me?
Is this the best forum for this problem?
br Kusti