6.3.0. on MacOSX

Thanks for adding all the patches. It worked almost out of the box.
Just some details.

env_DRAW.sh is missing. My now contains just:

#!/bin/sh -f
export DISPLAY=:0.0
export CASROOT=/Users/totty/Projects/OpenCASCADE6.3.0/ros
export DYLD_LIBRARY_PATH=$CASROOT/mac/lib;

I needed one small Makefile patch:

--- adm/make/DRAWEXE/Makefile.am.orig 2008-09-06 14:15:14.000000000 +0200
+++ adm/make/DRAWEXE/Makefile.am 2008-09-06 14:33:58.000000000 +0200
@@ -22,4 +22,4 @@
../TKMath/libTKMath.la \
../TKG3d/libTKG3d.la \
../TKernel/libTKernel.la \
- $(STLPort_LIB) $(CSF_TclLibs_LIB) $(CSF_TclTkLibs_LIB) $(CSF_gdi32_LIB) $(CSF_advapi32_LIB) $(CSF_user32_LIB) $(CSF_SOCKETLibs_LIB) $(CSF_FPELibs_LIB) $(CSF_ThreadLibs_LIB) $(CSF_kernel32_LIB)
+ $(STLPort_LIB) $(CSF_TclLibs_LIB) $(CSF_TclTkLibs_LIB) $(CSF_gdi32_LIB) $(CSF_advapi32_LIB) $(CSF_user32_LIB) $(CSF_SOCKETLibs_LIB) $(CSF_FPELibs_LIB) $(CSF_ThreadLibs_LIB) $(CSF_kernel32_LIB) $(CSF_XwLibs_LIB)

The configure script and the ltmain.sh are too old. The latter was provided by fink and the former was solved by running the whole GNU auto magic:

export CASROOT=/Users/totty/Projects/OpenCASCADE6.3.0/ros
cd ${CASROOT}
aclocal
automake
autoconf
cp /sw/share/libtool/ltmain.sh make/
export TCLHOME=/sw
#configure does not honor --with-gl-include
export CPPFLAGS=-I/usr/X11R6/include
flags="--with-gl-include=/usr/X11R6/include --with-gl-library=/usr/X11R6/lib"
flags="$flags --with-xmu-include=/usr/X11R6/include/X11"
flags="$flags --with-xmu-library=/usr/X11R6/lib"
flags="$flags --with-tcl=${TCLHOME}/lib"
flags="$flags --with-tk=${TCLHOME}/lib "
flags="$flags --with-java-include=/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/ "
flags="$flags --disable-debug --enable-production"
flags="$flags --enable-wrappers=yes"
flags="$flags --enable-wok=yes"
flags="$flags --enable-draw=yes"
./configure --prefix=${CASROOT}/mac $flags
make
make install

DRAWEXE works and now lets recompile my own code.

Cheers, Torsten

manavbhatia's picture

Thanks for sharing this information, Torsten.

I tried this and the first make command gave me the error from libtool that --tag=CXX was not a recognized option. I had to get around this by adding the following line to the section of libtool script that parses command line options:

--tag=*) tag="$optarg" ;;

Aron Wahlberg's picture

I encounter the same problem as you Manav (I know it was some time ago). However, I don't see where to put the line you have provided. I'm quite a newbie to these things... Could you please be a bit more specific? A line-number or a few lines of surrounding code that could helpe in localizing the line you've added would be nice.

And of course, many thanks to Torsten for sharing this information. It really helped.

Aron

PS. Here's the last lines of output from the make command:

#######
../../../libtool: line 662: : warning: cannot infer operation mode without MODE-ARGS: command not found
../../../libtool: line 5253: : you must specify a MODE: command not found
../../../libtool: line 5254: Try ` --help' for more information.: command not found
../../../libtool: line 526: X--tag=CXX: command not found
../../../libtool: line 604: : unrecognized option `--tag=CXX': command not found
../../../libtool: line 605: Try ` --help' for more information.: command not found
make[3]: *** [Dico_DictionaryOfInteger_0.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
######

Dean Goves's picture

I am encountering the same errors, Did you ever solve this issue?

manavbhatia's picture

Hi Aron,

This was a long time ago, and i forgot. But, the error probably gives a hint about the line number. I think it should be around line 526, where the script checks for the options and takes respective actions.

I do not have the actual code any longer on Mac to reproduce this any more.
I hope this helps.

Manav

Greg Pettit's picture

Torsten,

Thanks for your contributions.

I am currently trying to build OCC on OS X 10.5.6; However, when I run configure, it seems to have a problem finding the OpenGL libraries as shown below: I was wondering if you ran into a similar problem. I also tried export LDFLAGS=-L/usr/X11R6/lib as the output suggests. Any help would be greatly appreciated.

Thanks again,
Greg

export CASROOT=/Users/gp/Build/OpenCASCADE6.3.0/ros
cd ${CASROOT}

aclocal
automake
autoconf

cp /sw/share/libtool/ltmain.sh make/
export TCLHOME=/sw
export CPPFLAGS=-I/usr/X11R6/include

./configure --prefix=${CASROOT}/mac --with-gl-include=/usr/X11R6/include --with-gl-library=/usr/X11R6/lib --with-xmu-include=/usr/X11R6/include/X11 --with-xmu-library=/usr/X11R6/lib --with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib --with-java-include=/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/ --disable-debug --enable-production --enable-wrappers=yes --enable-wok=yes --enable-draw=yes

output snippet from configure...

checking for XmuLookupStandardColormap in -lXmu... yes
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for _GLUfuncptr... yes
checking for glClear in -lGL... no
configure: "Specify LDFLAGS=-L to enable OpenGL support"
checking DPS/dpsXclient.h usability... no
checking DPS/dpsXclient.h presence... no
checking for DPS/dpsXclient.h... no
checking for DPSInitialize in -ldps... no
configure: "Specify CPPFLAGS=-I to enable DPS support"
configure: "Specify LDFLAGS=-L to enable DPS support"
checking if platform is 64-bit... no
configure: WARNING: Disabling OpenGL portion of visualization component: GL not found
configure: Disabling application framework: not building visualization component
configure: Disabling data exchange component: not building OCAF
configure: error: Test harness requires visualization component.

Torsten Sadowski's picture

Hi Greg,

there is a difference with 10.5. Could you

export LDFLAGS="-L/usr/X11R6/lib -lX11"

before running configure without "--with-gl-include --with-gl-library --with-xmu-include --with-xmu-library"

If it still doesn't work please post the relevant piece of config.log.

Cheers, Torsten

Greg Pettit's picture

Hi Torsten, thanks for your speedy response!

I made the changes you suggested so my build process looked like the following:

export CASROOT=/Users/gp/Build/OpenCASCADE6.3.0/ros
cd ${CASROOT}

aclocal
automake
autoconf

cp /sw/share/libtool/ltmain.sh make/
export TCLHOME=/sw
export CPPFLAGS=-I/usr/X11R6/include
export LDFLAGS="-L/usr/X11R6/lib -lX11"

./configure --prefix=${CASROOT}/mac --with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib --with-java-include=/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/ --disable-debug --enable-production --enable-wrappers=yes --enable-wok=yes --enable-draw=yes

Still failed with the following error in the config.log:

configure:26471: checking for glClear in -lGL
configure:26506: gcc -o conftest -DCSFDB -DOCC_CONVERT_SIGNALS -I/usr/X11/include -I/usr/X11R6/include -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/ -L/usr/X11R6/lib -lX11 -L/usr/X11/lib conftest.c -lGL -lpthread >&5
ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib
collect2: ld returned 1 exit status
configure:26512: $? = 1
configure: failed program was:
| /* confdefs.h. */

I googled the error and found the following link:
http://developer.apple.com/qa/qa2007/qa1567.html

As suggested, I added the following to my LDFLAGS and configure was successful.
export LDFLAGS="-L/usr/X11R6/lib -lX11 -dylib_file \
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"

I am getting ready to run make. Thanks again for your help,

Greg

Dean Goves's picture

I get the following error when running Make, I am running OS X 10.6

make all-recursive
Making all in adm/make
Making all in TKernel
/bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../inc -I../../../drv/FSD -I../../../src/FSD -I../../../drv/MMgt -I../../../src/MMgt -I../../../drv/OSD -I../../../src/OSD -I../../../drv/Plugin -I../../../src/Plugin -I../../../drv/Quantity -I../../../src/Quantity -I../../../drv/Resource -I../../../src/Resource -I../../../drv/SortTools -I../../../src/SortTools -I../../../drv/Standard -I../../../src/Standard -I../../../drv/StdFail -I../../../src/StdFail -I../../../drv/Storage -I../../../src/Storage -I../../../drv/TColStd -I../../../src/TColStd -I../../../drv/TCollection -I../../../src/TCollection -I../../../drv/TShort -I../../../src/TShort -I../../../drv/Units -I../../../src/Units -I../../../drv/UnitsAPI -I../../../src/UnitsAPI -I../../../drv/IncludeLibrary -I../../../src/IncludeLibrary -I../../../drv/Dico -I../../../src/Dico -I../../../drv/NCollection -I../../../src/NCollection -I../../../drv/Message -I../../../src/Message -I/usr/X11R6/include -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/ -D_OCC64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -O2 -MT Dico_DictionaryOfInteger_0.lo -MD -MP -MF .deps/Dico_DictionaryOfInteger_0.Tpo -c -o Dico_DictionaryOfInteger_0.lo `test -f '../../../drv/Dico/Dico_DictionaryOfInteger_0.cxx' || echo './'`../../../drv/Dico/Dico_DictionaryOfInteger_0.cxx
../../../libtool: line 835: X--tag=CXX: command not found
../../../libtool: line 868: libtool: ignoring unknown tag : command not found
../../../libtool: line 835: X--mode=compile: command not found
../../../libtool: line 1002: *** Warning: inferring the mode of operation is deprecated.: command not found
../../../libtool: line 1003: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../../../libtool: line 1146: Xg++: command not found
../../../libtool: line 1146: X-DHAVE_CONFIG_H: command not found
../../../libtool: line 1146: X-I.: command not found
../../../libtool: line 1146: X-I../../..: No such file or directory
../../../libtool: line 1146: X-I../../../inc: No such file or directory
../../../libtool: line 1146: X-I../../../drv/FSD: No such file or directory
../../../libtool: line 1146: X-I../../../src/FSD: No such file or directory
../../../libtool: line 1146: X-I../../../drv/MMgt: No such file or directory
../../../libtool: line 1146: X-I../../../src/MMgt: No such file or directory
../../../libtool: line 1146: X-I../../../drv/OSD: No such file or directory
../../../libtool: line 1146: X-I../../../src/OSD: No such file or directory
../../../libtool: line 1146: X-I../../../drv/Plugin: No such file or directory
../../../libtool: line 1146: X-I../../../src/Plugin: No such file or directory
../../../libtool: line 1146: X-I../../../drv/Quantity: No such file or directory
../../../libtool: line 1146: X-I../../../src/Quantity: No such file or directory
../../../libtool: line 1146: X-I../../../drv/Resource: No such file or directory
../../../libtool: line 1146: X-I../../../src/Resource: No such file or directory
../../../libtool: line 1146: X-I../../../drv/SortTools: No such file or directory
../../../libtool: line 1146: X-I../../../src/SortTools: No such file or directory
../../../libtool: line 1146: X-I../../../drv/Standard: No such file or directory
../../../libtool: line 1146: X-I../../../src/Standard: No such file or directory
../../../libtool: line 1146: X-I../../../drv/StdFail: No such file or directory
../../../libtool: line 1146: X-I../../../src/StdFail: No such file or directory
../../../libtool: line 1146: X-I../../../drv/Storage: No such file or directory
../../../libtool: line 1146: X-I../../../src/Storage: No such file or directory
../../../libtool: line 1146: X-I../../../drv/TColStd: No such file or directory
../../../libtool: line 1146: X-I../../../src/TColStd: No such file or directory
../../../libtool: line 1146: X-I../../../drv/TCollection: No such file or directory
../../../libtool: line 1146: X-I../../../src/TCollection: No such file or directory
../../../libtool: line 1146: X-I../../../drv/TShort: No such file or directory
../../../libtool: line 1146: X-I../../../src/TShort: No such file or directory
../../../libtool: line 1146: X-I../../../drv/Units: No such file or directory
../../../libtool: line 1146: X-I../../../src/Units: No such file or directory
../../../libtool: line 1146: X-I../../../drv/UnitsAPI: No such file or directory
../../../libtool: line 1146: X-I../../../src/UnitsAPI: No such file or directory
../../../libtool: line 1146: X-I../../../drv/IncludeLibrary: No such file or directory
../../../libtool: line 1146: X-I../../../src/IncludeLibrary: No such file or directory
../../../libtool: line 1146: X-I../../../drv/Dico: No such file or directory
../../../libtool: line 1146: X-I../../../src/Dico: No such file or directory
../../../libtool: line 1146: X-I../../../drv/NCollection: No such file or directory
../../../libtool: line 1146: X-I../../../src/NCollection: No such file or directory
../../../libtool: line 1146: X-I../../../drv/Message: No such file or directory
../../../libtool: line 1146: X-I../../../src/Message: No such file or directory
../../../libtool: line 1146: X-I/usr/X11R6/include: No such file or directory
../../../libtool: line 1146: X-I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/: No such file or directory
../../../libtool: line 1146: X-D_OCC64: command not found
../../../libtool: line 1146: X-DNDEBUG: command not found
../../../libtool: line 1146: X-DNo_Exception: command not found
../../../libtool: line 1146: X-DCSFDB: command not found
../../../libtool: line 1146: X-DOCC_CONVERT_SIGNALS: command not found
../../../libtool: line 1146: X-O2: command not found
../../../libtool: line 1146: X-MT: command not found
../../../libtool: line 1146: XDico_DictionaryOfInteger_0.lo: command not found
../../../libtool: line 1146: X-MD: command not found
../../../libtool: line 1146: X-MP: command not found
../../../libtool: line 1146: X-MF: command not found
../../../libtool: line 1146: X.deps/Dico_DictionaryOfInteger_0.Tpo: No such file or directory
../../../libtool: line 1146: X-c: command not found
../../../libtool: line 1199: XDico_DictionaryOfInteger_0.lo: command not found
../../../libtool: line 1204: libtool: compile: cannot determine name of library object from `': command not found
make[3]: *** [Dico_DictionaryOfInteger_0.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Dean Goves's picture

Does anyone have any ideas?

Nicolas Geimer's picture

Hello,

I've exactly the same problem as you Dean with native products.

It's ok for me if I load my Fink environment first (autotools from Fink).

Did you solve it another way ?

Nicolas

Dean Goves's picture

Nicolas,
I switched from using Fink to macports and updated the TCLHOME path accordingly.
-Dean