On Fri, Aug 01, 2008 at 12:33:05PM -0700, Alan Irwin wrote: > On 2008-08-01 08:44+0100 Andrew Ross wrote: > > > On Thu, Jul 31, 2008 at 10:32:30PM +0100, Andrew Ross wrote: > >> > >> I've been working on implementing plgfci and plsfci in the fortran > >> bindings, starting with f95. Unfortunately fortran does not support > >> unsigned integers so PLUNICODE has to be cast to an 64 bit integer in > >> fortran. I've created a plunicode type, similar to plflt, to make this > >> transparent in fortran 95. The conversion is done in the C code and > >> current works if C long is 64 bit (ok on most platforms, but not > >> guaranteed). Ideally I would use int64_t but this is none standard. > >> > > > > This should of course read long long. This is an extension to ANSI C, > > although is included in C99. > > > > If it turns out that it is not widely supported we may need some cmake > > magic to determine what the correct type for a compiler is. > > The result does not build for gfortran on my 64-bit Debian testing platform. > > Here is the x23f build error message. > > /home/software/plplot_cvs/HEAD/plplot_cmake/examples/f95/x23f.f90:314.19: > > call plsfci(0) > 1 > Error: Type mismatch in argument 'fci' at (1); passed INTEGER(4) to > INTEGER(16) > make[2]: *** [examples/f95/CMakeFiles/x23f95.dir/x23f.o] Error 1 > > Here is the first line of the result from gfortran --version > GNU Fortran (Debian 4.3.1-2) 4.3.1 > > Andrew, since this svn trunk build issue appears to be specialized to the > -DBUILD_TEST=ON case for 64-bit platforms, there isn't the same degree of > urgency to get it fixed as say for a general svn trunk build issue. > Nevertheless, it would be good to get this figured out (or plsfci disabled > for f95) in a timely manner. Let me know if there are any additional tests > you would like me to try on my platform.
Alan, I've commited a fix to explicitly make the 0 of kind plunicode. Hopefully this should allow the example to build. I am concerned that about the integer(16) though. I was assuming that an integer larger than integer(4) would be integer(8). Is long long also 128 bit on your machine? If not then the bindings may still not work correctly anyway. Can you test again with my fix and see what happens? > > <Other topics brought up by the ctest results> > > * Ada run-time error > > Ada example 19 (either thin or thick) still gives the following error for > me for gnat 4.3.1 on Debian testing > > raised STORAGE_ERROR : stack overflow (or erroneous memory access) > > I got this same error for earlier gnat versions as well. Nobody else has > seen this for any gnat version. Are the Debian testing versions of gnat that > special? The memory access error makes me wonder if this is a 64-bit problem? Most other people are likely to have been testing on 32-bit versions of linux. The 64-bit machine I have accessible doesn't currently have Ada on. I will see if I can get it installed to test. It will probably be an older version, but this might be a useful test. > * CMake-2.6.1 > > CMake-2.6.1 (just released this morning) was used for all the above results. > However, the Ada problems have been occurring consistently for me for some > time, and Andrew recently implemented plsfci for f95 so I don't think the > above problems have anything to do with CMake-2.6.1. > > If I remove examples/f95/x23f from the build, I get a clean build result for > the following cmake options: > > -DBUILD_TEST=ON -DPLD_wxwidgets=ON -DENABLE_ada=ON -DENABLE_ocaml=ON > -DHAVE_PTHREAD=ON > > If I remove Ada example 19 (both thick and thin) and f95 example 23 > from the list of ctested examples, then I also get a clean ctest result. > > Thus, I will use CMake-2.6.1 in my testing from now on, and I also encourage > other developers to use that version as well. > > </Other topics brought up by the ctest results> This is good news! Andrew ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel