In plplot-5.7.3/examples/ada/x12a.adb, the sprintf function is declared and imported as follows:
procedure Sprintf( buffer : out char_array; format : in char_array; variable: in PLFLT ); pragma Import(C, Sprintf, "sprintf" ); This is incorrect because sprintf's declaration is sprintf (char *, const char *, ...) (varargs) not sprintf (char *, const char *, float). This happens to work on i386 because of the ABI happens to be the same. It isn't on x86_64 and so crashes. See https://bugzilla.redhat.com/bugzilla/process_bug.cgi#c1 and the http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Calling-Conventions.html note about varargs for more info. If you really need to use sprintf you'll need to write a write a sprintff(char *, const char *, float) wrapper to sprintf and interface to that. Likewise for any other arguments used (currently just the one). Not sure if any plplot routines use varargs arguments, but if so the current ada imports are probably incorrect. -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA/CoRA Division FAX: 303-415-9702 3380 Mitchell Lane [EMAIL PROTECTED] Boulder, CO 80301 http://www.cora.nwra.com ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel