I recently changed my Ada compiler to the one that is part of gcc 4.3. I had previously been using 4.2. The reason for changing is to get a compiler that is Ada 2005 (aka Ada 2007) compliant, as this provides certain vector and matrix functionality built-in. The Ada PLplot binding is already set up via cmake to work correctly for either Ada 95 (no vector-matrix built-ins) or Ada 2005.
The 4.2 compiler that I was using used kind of a fake method that I bolted on to get the vector-matrix functionality and although all of the required subroutine calls were declared, some of them weren't connected to anything. For example, if you tried to invert a matrix, you would get a message like, "function not implemented." The 4.3 compiler has everything except some of the hard-core linear algebra stuff. I think we can reasonably require a "real" Ada 2005 compiler such as 4.3 for proper building. The Ada 2005 Reference Manual strongly suggests that BLAS (Basic Linear Algebra System) and LAPACK (Linear Algebra Package) do the heavy lifting since they are very good and very mature. So, to get a fully functional Ada 2005 compiler, one needs to link to these two libraries. I work on OS X and they are pre-installed by Apple. I can now write Ada programs (not necessarily PLplot-related) which use these libraries. However, when I try to build PLplot, I get the following output, which is familiar to me because it is what I see whenever the Ada make system, gnatmake, doesn't see the BLAS and LAPACK libraries. Note that the problem appears when compiling Example 1. All of the missing symbols are in one or the other of the two libraries. gnatlink x01a.ali -fPIC -L/usr/local/plplot_build_dir/bindings/ada -L/ usr/local/plplot_build_dir/src -L/usr/local/plplot_build_dir/lib/csa - L/usr/local/ada-4.3/lib/gcc/powerpc-apple-darwin8/4.3.0/adalib - lplplotadad -lplplotd -lltdl -ldl -lcsirocsa -lm -lgnat -lgcc_s.1 /usr/bin/ld: Undefined symbols: _ddot_ _dgemm_ _dgemv_ _dgetrf_ _dgetri_ _dgetrs_ _dnrm2_ _dorgtr_ _dsteqr_ _dsterf_ _dsytrd_ collect2: ld returned 1 exit status gnatlink: error when calling /usr/local/ada-4.3/bin/gcc gnatmake: *** link failed. make[2]: *** [examples/ada/x01a] Error 4 make[1]: *** [examples/ada/CMakeFiles/x01a.dir/all] Error 2 make: *** [all] Error 2 So the PLplot build system needs to be told, if using an Ada 2005 (aka Ada 2007) compiler, where to go to get these libraries. (If not using Ada 2005, the libraries are not needed.) On OS X, they are here: /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/ Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/ A/libBLAS.dylib /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/ Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/ A/libLAPACK.dylib There are also symlinks here: /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libblas.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/liblapack.dylib So I hope someone knows what to do about this. When I compile a non- PLplot program, I do something like this: /usr/local/ada-4.3/bin/gnatmake simple.adb \ -largs /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libblas.dylib \ /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/liblapack.dylib The -largs directs gnatmake to send everything after -largs to the linker. Thus, these two paths are sent to the linker and everything works. The crappy part of this is that all of the paths to BLAS and LAPACK on OS X 10.4 appear to be very fragile, with "10.4" in their paths. Ditto for 10.3: /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/ Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/ A/libBLAS.dylib So it is likely that they will be in still another place on the current OS version, 10.5. Maybe someone who has 10.5 installed can report those paths. Jerry ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel