From afe5cfcb3535da5f9caa13bc2ca1a3449da10502 Mon Sep 17 00:00:00 2001 From: Ken Burtch Date: Mon, 1 Jul 2024 12:16:15 -0400 Subject: [PATCH] fixes for provisioning on Rocky Linux --- ChangeLog | 6 ++++++ TODO | 10 +++------- configure | 7 +++++++ provision.sh | 44 +++++++++++++++++++++++++------------------- 4 files changed, 41 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 919ff0fb..e44ab426 100644 --- a/ChangeLog +++ b/ChangeLog @@ -57,3 +57,9 @@ CHANGES SINCE 2.6.2 20. Fix: first item in an enumerated type no longer gives an undefined error when converting a record to JSON. +21. Fix: SDL support is now removed through the gnat preprocessor when --without-sdl is used. This is a workaround for GCC 13 bug failing on graphics support. + +22. Fix: --without-sdl now requires --without-opengl. + +23. Fix: provision.sh for Rocky Linux and --without-sdl and --without-opengl should work. + diff --git a/TODO b/TODO index 4ba1f45a..add8be49 100644 --- a/TODO +++ b/TODO @@ -25,17 +25,13 @@ Priority Issues (Fix These First) - upgrade SDL - need to upgrade to 2.0 - - net to fix pointer issues to SDL/OpenGL structures - - fix SDL disable - - spar_os.sdl should not be included - - proper error messages should be provided on unavailable - functions - - building with SDL may be giving spar_os.sdl errors + - need to fix pointer issues to SDL/OpenGL structures + - proper error messages should be provided on unavailable + functions - exceptions are not propogating in wash_blocked SSDS script to the main program exception handler. exceptions.exception_info is empty. -- reports that SparForte is failing to build on GCC 13 - test for pragma restriction( no_prompt_history )...may be difficult - universal typeless loses its properties when a custom type or subtype is derived from it diff --git a/configure b/configure index a8afaf15..17d93249 100755 --- a/configure +++ b/configure @@ -1008,6 +1008,13 @@ if [ -z "$NO_SDL" ] ; then else (exec "$CC" sdlversion.c -I/usr/local/include/SDL -L/usr/local/lib -lSDL) fi + if [ $? -ne 0 ] ; then + echo "no" + echo + echo "sdlversion.c test program did not compile" + echo "Do you have libSDL installed?" + exit 192 + fi if [ -f "./a.exe" ] ; then # Cygwin makes Windows executables TMP=`./a.exe` rm ./a.exe diff --git a/provision.sh b/provision.sh index d582fb9b..bc3f0707 100644 --- a/provision.sh +++ b/provision.sh @@ -138,12 +138,16 @@ zypper_install () { RHVERSION="" if test -f "/etc/redhat-release" ; then DISTRO="redhat" - TMP=`fgrep "7." "/etc/redhat-release"` - if [ -z "$TMP" ] ; then + TMP=`fgrep " 7." "/etc/redhat-release"` + if [ -n "$TMP" ] ; then RHVERSION="7" fi - TMP=`fgrep "9." "/etc/redhat-release"` - if [ -z "$TMP" ] ; then + TMP=`fgrep " 8." "/etc/redhat-release"` + if [ -n "$TMP" ] ; then + RHVERSION="8" + fi + TMP=`fgrep " 9." "/etc/redhat-release"` + if [ -n "$TMP" ] ; then RHVERSION="9" fi fi @@ -204,17 +208,17 @@ redhat ) if [ -n "$HAS_SUDO" ] ; then if [ "$RHVERSION" != "7" ] ; then sudo dnf config-manager --set-enabled - sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm - else + sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + else sudo -u root rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-latest-7.noarch.rpm - fi + fi else if [ "$RHVERSION" != "7" ] ; then dnf config-manager --set-enabled - dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm - else + dnf install http://download.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-latest-7.noarch.rpm + else rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-latest-7.noarch.rpm - fi + fi fi fi # Containers may not have these @@ -258,16 +262,18 @@ redhat ) echo "Please provision using --without-sdl. SDL1.2 is not included " echo "with Red Hat 9" exit 1 + yum_install SDL + # Does not exist with Red Hat 9 but is also included with SDL + yum_install SDL-devel + yum_install SDL_image + fi + if [ -z "$NO_OPENGL" ] ; then + # On Red Hat 9, this will error because SDL-devel does not exist + # SparForte will still build but not SDL will not work. + yum_install SDL_image-devel + yum_install mesa-libGL-devel + yum_install mesa-libGLU-devel fi - yum_install SDL - # Does not exist with Red Hat 9 but is also included with SDL - yum_install SDL-devel - yum_install SDL_image - # On Red Hat 9, this will error because SDL-devel does not exist - # SparForte will still build but not SDL will not work. - yum_install SDL_image-devel - yum_install mesa-libGL-devel - yum_install mesa-libGLU-devel fi if [ -z "$NO_MEMCACHED" ] ; then yum_install memcached