Menu

#107 [ltris] cross-compiling broken again with aarch64-buildroot-linux-gnu-gcc

None
closed-fixed
nobody
None
5
2024-07-16
2024-04-25
No

Last year I opened a ticket (https://sourceforge.net/p/lgames/bugs/101/) concerning a cross-compilation bug that you corrected in 1.2.7 release. It seems like you re-introduce this bug in following commit: https://sourceforge.net/p/lgames/code/635/#diff-3

Is it an error or intentional ? (SDL_CONFIG shouldn't have been reverted to sdl_config)

Thanks !
Regards,
Julien

Discussion

  • Michael Speck

    Michael Speck - 2024-04-26

    I reverted it because SDL_CONFIG is not defined and it won't compile for me with it. I had to remove sdl.m4 since it was outdated. If I'm right that macro defined SDL_CONFIG. So how to properly get SDL_CONFIG defined?

     
  • Julien B aka Artemys

    What about this modification ? ->

    --- ltris-1.3.1.org/configure.ac 2024-04-21 11:54:31.000000000 +0200
    +++ ltris-1.3.1/configure.ac 2024-04-29 17:26:39.491389127 +0200
    @@ -15,6 +15,9 @@
    AC_CHECK_LIB(SDL, main,, AC_MSG_ERROR(lib SDL is needed))

    CFLAGS="$CFLAGS -Wall -Wno-int-conversion -Wno-format -Wno-implicit-function-declaration"
    +if test x${SDL_CONFIG+set} != xset ; then
    + SDL_CONFIG="sdl-config"
    +fi

    dnl Check Zarus install
    AC_ARG_ENABLE( zaurus,
    @@ -32,8 +35,8 @@

    else

    • CFLAGS="$CFLAGS $(sdl-config --cflags)"
    • LIBS="$LIBS $(sdl-config --libs)"
    • CFLAGS="$CFLAGS $($SDL_CONFIG --cflags)"
    • LIBS="$LIBS $($SDL_CONFIG --libs)"

    fi

    Is it working for you ?

    By the way why do you provide ltris/configure in the release files ?

    Regards,
    Julien

     
  • Julien B aka Artemys

    Hello, did you had time to test it ?

     
  • Michael Speck

    Michael Speck - 2024-05-16

    Not yet, but it should work. The question for me is why does the AM_PATH_SDL macro does not work anymore? Because that is supposed to set this variable, also for cross compiling. I tested it on a different computer with a new sdl.m4 but same result... Or do you set SDL_CONFIG via command line? I think in two weeks from now I have some time to look into it. If possible I would like to get AM_PATH_SDL to work again otherwise I will apply your workaround. Thanks, Michael

     
  • Julien B aka Artemys

    Buildroot (http://www.buildroot.org, the tool I use to build my rootfs for ARM) pass the following variable when calling configure: SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config"
    STAGING_DIR points to the directory where libraries are temporary installed when cross-building.
    I you find another way of passing sdl-config location, I can adapt Buildroot accordingly.

     
  • Michael Speck

    Michael Speck - 2024-05-28
    • status: open --> closed-fixed
    • Group: -->
     
  • Michael Speck

    Michael Speck - 2024-05-28

    Well, I don't know what the issue was but now it works again. AM_PATH_SDL invokes AM_PATH_PROG for sdl-config and sets SDL_CONFIG properly. The actual sdl.m4 was missing so maybe this caused the issue. I've added it. If there are any troubles in the future I'll just use your workaround and remove the macro. But I guess I just made some mistake... So please test the latest commit. Thanks!

     
  • Julien B aka Artemys

    Cool, is it possible for you to tag a new ltris release ? (Buildroot scripts use official tarball and not SVN tree)

     
  • Michael Speck

    Michael Speck - 2024-06-08

    Sure, I just released 1.3.2.

     
  • Julien B aka Artemys

    Thank you, it is working great.

     

Log in to post a comment.