Menu

#11 64 bit compatibility

open
SDL (6)
5
2008-02-26
2008-01-06
Anonymous
No

sdlutils.pas fails with some pointer conversion errors on 64 bit systems.

Is anyone able to fix this?

Compiling lib/JEDI-SDLv1.0/SDL/Pas/sdlutils.pas
sdlutils.pas(332,14) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(344,14) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(373,16) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(373,61) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(390,16) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(390,61) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(407,21) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(408,21) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(426,16) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(426,65) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(268,3) Note: Local variable "StartTick" not used
sdlutils.pas(452,13) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(453,17) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(466,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(466,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(479,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(479,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(492,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(492,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(505,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(505,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(518,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(518,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(535,13) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(536,17) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(549,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(549,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(562,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(562,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(575,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(575,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(588,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(588,11) Error: Typecast has different size (4 -> 8) in assignment
sdlutils.pas(601,11) Warning: Conversion between ordinals and pointers is not portable
sdlutils.pas(601,11) Error: Typecast has different size (4 -> 8) in assignment

and so on ...

Discussion

  • Mog

    Mog - 2008-01-09

    Logged In: YES
    user_id=1749560
    Originator: NO

    Same problem here, trying to compile UltraStar Deluxe with Lazarus on a AMD64 laptop..

    Google revealed three links, one of them[1] seems to be interesting though:

    - - - - - - - ->8 - - - - - -
    Warning: Conversion between ordinals and pointers is not portable
    If you typecast a pointer to a ordinal type of a different size (or vice-versa), this can cause problems. This is a warning to help finding the 32bit specific code where cardinal/longint is used to typecast pointers to ordinals. A solution is to use the ptrint/ptruint types instead.
    - - - - - - - - 8<- - - - - -

    I'm gonna try that tmr, I just hope that this fixes at least some issues then :)

    Greetings, Mog

    [1] http://freepascal.org/docs-html/user/userse62.html

     
  • Dominique Louis

    Dominique Louis - 2008-02-26
    • assigned_to: nobody --> savage
     
  • Dominique Louis

    Dominique Louis - 2008-02-26

    Logged In: YES
    user_id=12677
    Originator: NO

    I do not have a 64bit system to test it on. If you do, please submit a patch and it will be included in a future JEDI-SDL release.

     
  • Michalis Kamburelis

    Logged In: YES
    user_id=987895
    Originator: NO

    I tested on Debian Linux x86_64, and the bug submitted here was still present. Along with many other 64 compatibility problems. I fixed it all, and tested virtually everything (that could be compiled with bare FPC, didn't test GUI things that would require conversion from Delphi to Lazarus). Yes, this included testing programs in Demos/2D/SDLUtilsTests/, since sdlutils unit was most modified.

    My patch is submitted in patch tracker (I can't attach files to bug reports when I'm not the submitter and not the member of jedi-sdl project), see issue #1902924 ("Fixes for 64-bit compatibility"). There are also comments what exactly is fixed. After applying that patch, you can close this bug report.

     

Log in to post a comment.