[CMake] Cmake MacOSX Question
William A. Hoffman
billlist at nycap.rr.com
Fri Jun 23 13:45:46 EDT 2006
I think there are symlinks to the tcl/tk stuff in /usr/lib or some other
system area, they link to the framework version.
-Bill
At 01:38 PM 6/23/2006, Hans J. Johnson wrote:
>Brad,
>
>Here is the output. I am still perplexed as to why the tcl and tk libraries
>from the framework (or /usr/lib) are being included.
>
>/usr/bin/c++ -bind_at_load -O2 -ftemplate-depth-50 -no-cpp-precomp
>-Wno-long-double -ftemplate-depth-50 -no-cpp-precomp -Wno-long-double
>-DNO_ITK_TCL -O3 -DNDEBUG -headerpad_max_install_names -fPIC
>"CMakeFiles/brains2.dir/tkAppInit.o"
>"CMakeFiles/brains2.dir/tkInstallCommands.o" -o ../bin/brains2
>-L/scratch/hjohnson/src/brains2/MacOSX/FAST/src/lib/InsightToolkit -L.
>-L/scratch/hjohnson/src/brains2/MacOSX/FAST/src/lib -L/usr/X11R6/lib
>-L/sw/lib -lb2Utils -liplGUI -lb2Utils -liplKernel -lITKBasicFilters -lITKIO
>-lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litkopenjpeg -litkpng
>-litktiff -litkjpeg8 -lITKSpatialObject -lITKNumerics -lITKMetaIO
>-lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz -litkzlib -lqHull
>-liplAlgorithms -liplObject -lgts -liplHeader -liplPixelTable -liplUtils
>-liplLogging -lITKCommon -litkvnl_inst -litkvnl_algo -litkvnl -litknetlib
>-litkvcl -litksys -lpthread -lm -lgts -lglib -lgmodule -lgthread -ltcl8.4
>-ltk8.4 -lforms -lformsGL -lm -lX11 -lXext -lXmu -lXpm -lGLU -lGL -v
>Using built-in specs.
>Target: powerpc-apple-darwin8
>Configured with: /private/var/tmp/gcc/gcc-5341.obj~1/src/configure
>--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
>--enable-languages=c,objc,c++,obj-c++
>--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
>--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
>--build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8
>--target=powerpc-apple-darwin8
>Thread model: posix
>gcc version 4.0.1 (Apple Computer, Inc. build 5341)
> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/collect2 -dynamic -arch ppc
>-bind_at_load -headerpad_max_install_names -macosx_version_min 10.3
>-multiply_defined suppress -weak_reference_mismatches non-weak -o
>../bin/brains2 -lcrt1.o /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/crt2.o
>/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/crt3.o
>-L/scratch/hjohnson/src/brains2/MacOSX/FAST/src/lib/InsightToolkit -L.
>-L/scratch/hjohnson/src/brains2/MacOSX/FAST/src/lib -L/usr/X11R6/lib
>-L/sw/lib -L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1
>-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1
>-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../..
>CMakeFiles/brains2.dir/tkAppInit.o
>CMakeFiles/brains2.dir/tkInstallCommands.o -lb2Utils -liplGUI -lb2Utils
>-liplKernel -lITKBasicFilters -lITKIO -lITKNrrdIO -litkgdcm -litkjpeg12
>-litkjpeg16 -litkopenjpeg -litkpng -litktiff -litkjpeg8 -lITKSpatialObject
>-lITKNumerics -lITKMetaIO -lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz
>-litkzlib -lqHull -liplAlgorithms -liplObject -lgts -liplHeader
>-liplPixelTable -liplUtils -liplLogging -lITKCommon -litkvnl_inst
>-litkvnl_algo -litkvnl -litknetlib -litkvcl -litksys -lpthread -lm -lgts
>-lglib -lgmodule -lgthread -ltcl8.4 -ltk8.4 -lforms -lformsGL -lm -lX11
>-lXext -lXmu -lXpm -lGLU -lGL -lstdc++ -lgcc_s.10.4 -lgcc -lSystemStubs
>-lSystem
>[hjohnson at nucleus iplTclCmd]$ otool -L ../bin/brains2../bin/brains2:
>/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
>88.1.5) /sw/lib/libglib-1.2.0.dylib (compatibility version 1.0.0,
>current version 1.10.0) /sw/lib/libgmodule-1.2.0.dylib (compatibility
>version 1.0.0, current version 1.10.0) /sw/lib/libgthread-1.2.0.dylib
>(compatibility version 1.0.0, current version 1.10.0)
> /System/Library/Frameworks/Tcl.framework/Versions/8.4/Tcl
>(compatibility version 8.4.0, current version 8.4.0)
> /System/Library/Frameworks/Tk.framework/Versions/8.4/Tk
>(compatibility version 8.4.0, current version 8.4.0)
> /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current
>version 6.2.0)
> /usr/X11R6/lib/libXext.6.dylib (compatibility version 6.4.0, current
>version 6.4.0)
> /usr/X11R6/lib/libXmu.6.dylib (compatibility version 6.2.0, current
>version 6.2.0)
> /usr/X11R6/lib/libXpm.4.dylib (compatibility version 4.11.0, current
>version 4.11.0)
> /usr/X11R6/lib/libGLU.1.dylib (compatibility version 1.3.0, current
>version 1.3.0)
> /usr/X11R6/lib/libGL.1.dylib (compatibility version 1.2.0, current
>version 1.2.0)
> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
>version 7.4.0)
> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
>version 1.0.0)
>
>
>Thanks,
>Hans
>
>
>
>
>On 6/23/06 12:25 PM, "Brad King" <brad.king at kitware.com> wrote:
>
>> Hans J. Johnson wrote:
>>> Cmake Experts,
>>>
>>> I am running into a problem with static libraries and conflicting frameworks
>>> on MacOSX. I need to statically build my own version of tcl and tk with X11
>>> bindings and link it to my application. The problem is that the linker is
>>> preferring to bind to the Tcl.framework and Tk.Framework dynamic libraries
>>> instead of the ones that I specify.
>>>
>>>
>>> ----- Notice the explicitly specified link directories -----
>>> [hjohnson]$ /usr/bin/c++ -bind_at_load -O2 -ftemplate-depth-50
>>> -no-cpp-precomp -Wno-long-double -ftemplate-depth-50 -no-cpp-precomp
>>> -Wno-long-double -DNO_ITK_TCL -O3 -DNDEBUG -headerpad_max_install_names
>>> -fPIC "CMakeFiles/brains2.dir/tkAppInit.o"
>>> "CMakeFiles/brains2.dir/tkInstallCommands.o" -o ../bin/brains2
>>> -L/scratch/hjohnson/src/brains2/MacOSX/FAST/src/lib/InsightToolkit -L.
>>> -L/scratch/hjohnson/src/brains2/MacOSX/FAST/src/lib -L/usr/X11R6/lib
>>> -L/sw/lib -lb2Utils -liplGUI -lb2Utils -liplKernel -lITKBasicFilters -lITKIO
>>> -lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litkopenjpeg -litkpng
>>> -litktiff -litkjpeg8 -lITKSpatialObject -lITKNumerics -lITKMetaIO
>>> -lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz -litkzlib -lqHull
>>> -liplAlgorithms -liplObject -lgts -liplHeader -liplPixelTable -liplUtils
>>> -liplLogging -lITKCommon -litkvnl_inst -litkvnl_algo -litkvnl -litknetlib
>>> -litkvcl -litksys -lpthread -lm -lgts -lglib -lgmodule -lgthread -ltcl8.4
>>> -ltk8.4 -lforms -lformsGL -lm -lX11 -lXext -lXmu -lXpm -lGLU -lGL
>>
>> Add the -v option to the command line to see exactly what GCC is running
>> underneath.
>>
>> -Brad
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list