Re: [Plplot-devel] Need help with OS X compilers
On Jul 13, 2007, at 1:32 AM, Alan W. Irwin wrote: On 2007-07-13 00:31-0400 Hazen Babcock wrote: I've installed macada and I've managed to get this far on my OS-X box. I was hoping to be able to tell cmake (using the ccmake facility) to use /usr/bin/gcc for the C compiler. However when I set the CMAKE_C_COMPILER = /usr/bin/gcc and then configure it always gets flipped back to /usr/local/ada-4.3/bin/gcc. My suspicion is that we could get both Ada and Aquaterm to work if we could somehow suppress the behavior. Ideas? How do you set CMAKE_C_COMPILER? I was trying to set it using the cmake text GUI interface, ccmake. I have never used that CMake variable, but my interpretation of http://www.cmake.org/Wiki/ CMake_Useful_Variables#Compilers_and_Tools is you can only set it using a -D option to cmake which will only work if you haven't cached anything before (i.e., you are starting fresh with no CMakeCache.txt file in your build directory). Anyhow, I assume the flipping back to /usr/local/ada-4.3/bin/gcc is cause by a cached value. Another way to set the C compiler (and associated flags) which I know works, is to set the CC environment variable (as also discussed at the above site) before invoking cmake _with no cache file_. Similarly, to set the Ada compiler, specify the ADA environment variable (see the first few lines of cmake/modules/ CMakeDetermineAdaCompiler.cmake). From further along in that file you can see that it is always assumed that the Ada executable builder is going to be called gnatmake, and gnatmake is looked for in the same directory as the specified Ada compiler. Anyhow, I believe that setting the CC and ADA environment variables before running cmake with no CMakeCache.txt file in your build directory should give you full and separate control of the C compiler, the Ada compiler, and the Ada executable builder. Let me know if that is not the case. This worked, thanks! I was able to get both ADA and Aquaterm to compile by doing the following (assuming macada standard install): (1) Set the environment variable CC to /usr/bin/gcc. (2) Set the environment variable CXX to /usr/bin/g++. (3) Run cmake. (4) Run ccmake and enable ADA. (5) Using ccmake, set the following: (it takes a few iterations to get it to show you all these variables) CMAKE_Ada_COMPILER /usr/local/ada-4.3/bin/gcc GNAT_EXECUTABLE_BUILDER /usr/local/ada-4.3/bin/gnatmake GNAT_LIB/usr/local/ada-4.3/lib/gcc/powerpc-apple-darwin8/4.3.0/ adalib/libgnat.dylib I can't get the ADA examples to work though, it looks like the library dependencies are not properly specified: otool -L ./x01a ./x01a: libplplotadad.0.0.0.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/src/ libplplotd.9.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libltdl.3.dylib (compatibility version 5.0.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/lib/ csa/libcsirocsa.0.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/lib/ nn/libcsironn.0.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libqhull.5.dylib (compatibility version 6.0.0, current version 6.0.0) libgnat-4.3.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/ada-4.3/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) otool -L libplplotadad.dylib libplplotadad.dylib: libplplotadad.0.0.0.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/src/ libplplotd.9.dylib (compatibility version 0.0.0, current version 0.0.0) libgnat-4.3.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libltdl.3.dylib (compatibility version 5.0.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/lib/ csa/libcsirocsa.0.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/lib/ nn/libcsironn.0.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libqhull.5.dylib (compatibility version 6.0.0, current version 6.0.0) /usr/local/ada-4.3/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) Note that there is no path for libplplotadad.0.0.0.dylib and libgnat-4.3.dylib. Also libplplotadad is not being copied to /usr/local/bin upon running make install. -Hazen
Re: [Plplot-devel] Need help with OS X compilers
On 2007-07-13 22:10-0400 Hazen Babcock wrote: On Jul 13, 2007, at 1:32 AM, Alan W. Irwin wrote: On 2007-07-13 00:31-0400 Hazen Babcock wrote: I've installed macada and I've managed to get this far on my OS-X box. I was hoping to be able to tell cmake (using the ccmake facility) to use /usr/bin/gcc for the C compiler. However when I set the CMAKE_C_COMPILER = /usr/bin/gcc and then configure it always gets flipped back to /usr/local/ada-4.3/bin/gcc. My suspicion is that we could get both Ada and Aquaterm to work if we could somehow suppress the behavior. Ideas? How do you set CMAKE_C_COMPILER? I was trying to set it using the cmake text GUI interface, ccmake. I have never used that CMake variable, but my interpretation of http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools is you can only set it using a -D option to cmake which will only work if you haven't cached anything before (i.e., you are starting fresh with no CMakeCache.txt file in your build directory). Anyhow, I assume the flipping back to /usr/local/ada-4.3/bin/gcc is cause by a cached value. Another way to set the C compiler (and associated flags) which I know works, is to set the CC environment variable (as also discussed at the above site) before invoking cmake _with no cache file_. Similarly, to set the Ada compiler, specify the ADA environment variable (see the first few lines of cmake/modules/ CMakeDetermineAdaCompiler.cmake). From further along in that file you can see that it is always assumed that the Ada executable builder is going to be called gnatmake, and gnatmake is looked for in the same directory as the specified Ada compiler. Anyhow, I believe that setting the CC and ADA environment variables before running cmake with no CMakeCache.txt file in your build directory should give you full and separate control of the C compiler, the Ada compiler, and the Ada executable builder. Let me know if that is not the case. This worked, thanks! I was able to get both ADA and Aquaterm to compile by doing the following (assuming macada standard install): (1) Set the environment variable CC to /usr/bin/gcc. (2) Set the environment variable CXX to /usr/bin/g++. (3) Run cmake. (4) Run ccmake and enable ADA. (5) Using ccmake, set the following: (it takes a few iterations to get it to show you all these variables) CMAKE_Ada_COMPILER /usr/local/ada-4.3/bin/gcc GNAT_EXECUTABLE_BUILDER /usr/local/ada-4.3/bin/gnatmake GNAT_LIB /usr/local/ada-4.3/lib/gcc/powerpc-apple-darwin8/4.3.0/adalib/libgnat.dylib I am glad you got this to work, but I always feel it is a tricky business to use ccmake to set variables because of caching issues (as indicated by all the retries that were necessary). To make life simpler, why not set the ADA environment variable like I suggested (e.g., in this case to /usr/local/ada-4.3/bin/gcc)? That should automatically give you GNAT_EXECUTABLE_BUILDER as a bonus. I also suggest you set the CMAKE_LIBRARY_PATH environment variable so that GNAT_LIB will automatically be found. In sum, use the environment variables (I have a file that sets this up for me in my case) to make life easy. I can't get the ADA examples to work though, it looks like the library dependencies are not properly specified: otool -L ./x01a ./x01a: libplplotadad.0.0.0.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/src/ libplplotd.9.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libltdl.3.dylib (compatibility version 5.0.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/lib/ csa/libcsirocsa.0.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/lib/ nn/libcsironn.0.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libqhull.5.dylib (compatibility version 6.0.0, current version 6.0.0) libgnat-4.3.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/ada-4.3/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) otool -L libplplotadad.dylib libplplotadad.dylib: libplplotadad.0.0.0.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/src/ libplplotd.9.dylib (compatibility version 0.0.0, current version 0.0.0) libgnat-4.3.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/lib/libltdl.3.dylib (compatibility version 5.0.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10) /Users/hbabcock/Documents/OpenSource/PLplot/plplot-CBS-3/lib/