From cae4be411e84339a36ebb6b65b3f539d16544b44 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 16:51:31 +1100 Subject: [PATCH 01/56] Submodule fixes. --- .gitmodules | 1 + scripts/apothecary | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index c9c28250637..b2b6e6cc8c2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,4 @@ [submodule "scripts/apothecary"] path = scripts/apothecary url = https://github.com/openframeworks/apothecary + branch = bleeding diff --git a/scripts/apothecary b/scripts/apothecary index b73a5f068c4..d5cb2e24b30 160000 --- a/scripts/apothecary +++ b/scripts/apothecary @@ -1 +1 @@ -Subproject commit b73a5f068c4160280c6bf357e384b81833260d47 +Subproject commit d5cb2e24b30e50e908280b99285746e7beaf0ff4 From 6fccd0af4201748238d1281563e20efe7ae61f8f Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 17:30:13 +1100 Subject: [PATCH 02/56] Updates nightly --- .gitmodules | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index b2b6e6cc8c2..c9c28250637 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,4 +5,3 @@ [submodule "scripts/apothecary"] path = scripts/apothecary url = https://github.com/openframeworks/apothecary - branch = bleeding From 0c45d4aaac715ffccb34bc547568e12052833f8d Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 17:59:07 +1100 Subject: [PATCH 03/56] Download libs [ 2.6.4 ~ 2.7.0] - Added GCC / Linux updates --- scripts/dev/download_libs.sh | 53 +++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 495024a843f..8452ebe0228 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -15,6 +15,7 @@ SILENT_ARGS="" NO_SSL="" BLEEDING_EDGE=0 DL_VERSION=2.7.4 +GCC_VERSION=0 TAG="" REPO="latest" SHA_VERIFIED=0 @@ -35,7 +36,7 @@ cat << EOF vs: 64 msys2: 64 android: armv7, arm64, and x86 (if not specified will download all) - linux: 64gcc6, armv6l or armv7l + linux: 64, armv6l or armv7l -n, --no-overwrite Pure merge: do not delete anything before extract. Default (without -n) only removes libs//lib/\$PLATFORM so other platforms (android + ios + macos + emscripten …) can coexist. @@ -48,6 +49,7 @@ cat << EOF -h, --help Shows this message -k, --no-ssl Allow no SSL validation -t, --tag tag release for libraries + -g, --gcc-version GCC Version EOF } @@ -172,6 +174,10 @@ while [[ $# -gt 0 ]]; do MSYSTEM="$2" shift # past argument ;; + -g|--gcc-version) + GCC_VERSION="$2" + shift # past argument + ;; -t|--tag) TAG="$2" shift # past argument @@ -243,18 +249,12 @@ if [ "$ARCH" == "" ]; then if [ "$PLATFORM" == "linux" ]; then ARCH=$(uname -m) if [ "$ARCH" == "x86_64" ]; then - if command -v gcc &> /dev/null - then - GCC_VERSION=$(gcc -dumpversion | cut -f1 -d.) - else - GCC_VERSION=6 - fi - if [ $GCC_VERSION -eq 4 ]; then - ARCH=64gcc6 - elif [ $GCC_VERSION -eq 5 ]; then - ARCH=64gcc6 - else - ARCH=64gcc6 + ARCH=64 + elif [ "$ARCH" == "arm64" ]; then + # ARCH=arm64 # need to fix + ARCH=64 + if [ -f /opt/vc/include/bcm_host.h ]; then # RPi + ARCH=aarch64 fi elif [ "$ARCH" == "armv7l" ]; then # Check for Raspberry Pi @@ -302,6 +302,23 @@ if [ "$PLATFORM" == "vs" ]; then esac fi +if [ "$PLATFORM" == "linux" ]; then + if [ "$GCC_VERSION" == 0 ]; then + if command -v gcc &> /dev/null; then + GCC_VERSION=$(gcc -dumpversion | cut -f1 -d.) + echo "GCC_VERSION from bash: [$GCC_VERSION]" + else + GCC_VERSION=6 + fi + if [ "$GCC_VERSION" -gt 14 ]; then + echo "GCC version is greater than 14. latest supported" + GCC_VERSION=14 + fi + fi + echo "GCC_VERSION: [$GCC_VERSION]" + GCC_VERSION="gcc${GCC_VERSION}" +fi + SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$SCRIPT_DIR" @@ -314,14 +331,6 @@ if [[ $TAG != "" ]] && [[ $TAG != "nightly" ]] ; then VER="$TAG" fi -if [ "$PLATFORM" == "linux" ] && [ "$ARCH" == "64" ]; then - if [[ $BLEEDING_EDGE = 1 ]] ; then - ARCH=64_gcc6 - else - ARCH=64gcc6 - fi -fi - echo " openFrameworks download_libs.sh v$DL_VERSION args=$@" if [ "$PLATFORM" == "emscripten" ]; then @@ -413,7 +422,7 @@ elif [ "$PLATFORM" == "emscripten" ]; then fi else # Linux if [[ $BLEEDING_EDGE = 1 ]] ; then - PKGS="openFrameworksLibs_${VER}_${PLATFORM}${ARCH}.tar.bz2" + PKGS="openFrameworksLibs_${VER}_${PLATFORM}_${ARCH}_${GCC_VERSION}.tar.bz2" else PKGS="openFrameworksLibs_${VER}_${PLATFORM}${ARCH}.tar.bz2" fi From c6464b658614e60359522998ed30527170b2e3e8 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 18:00:00 +1100 Subject: [PATCH 04/56] Linux Workflow updates / mkfile --- .github/workflows/of.yml | 13 +++++--- .../makefileCommon/config.linux.common.mk | 32 +++++++++++-------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index 08f95b58b08..925743b0edd 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -281,9 +281,12 @@ jobs: strategy: matrix: cfg: - - { target: linux64, libs: 64gcc6 } + - {target: linux, arch: 64, gcc: gcc14} + - {target: linux, arch: 64, gcc: gcc10} env: TARGET: ${{matrix.cfg.target}} + GCC: ${{matrix.cfg.gcc}} + ARCH: ${{matrix.cfg.arch}} steps: # handled by the install script now # - name: Remove Old lib-unwind @@ -312,12 +315,14 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1.2.23 with: - key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }} + key: ${{ matrix.cfg.target }} - - name: Download libs - run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.libs}} - name: Install dependencies run: ./scripts/ci/$TARGET/install.sh; + + - name: Download libs + run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.arch}} -g ${{matrix.cfg.GCC}} + - name: Build run: if [ "$TARGET" = "linux64" ]; then scripts/ci/linux64/build.sh; diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk index c31b10bd3d7..2c929709e52 100755 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk @@ -248,6 +248,8 @@ endif # core sources PLATFORM_CORE_EXCLUSIONS += %.mm PLATFORM_CORE_EXCLUSIONS += %.m +PLATFORM_CORE_EXCLUSIONS += %.swift +PLATFORM_CORE_EXCLUSIONS += %.kotlin PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofDirectShowGrabber.cpp PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofDirectShowPlayer.cpp PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofMediaFoundationPlayer.cpp @@ -260,7 +262,7 @@ else endif # third party -PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glew/% +# PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glew/% PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/cairo/% PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/videoInput/% PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/freetype/% @@ -268,9 +270,11 @@ PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/FreeImage/% PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/assimp/% PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/rtAudio/% PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openssl/% -PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glfw/% +PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/boost/% PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/curl/% PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/uriparser/% +PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/metalangle/% +#PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glfw/% ifeq ($(USE_FMOD),0) PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/fmod/% @@ -345,7 +349,7 @@ PLATFORM_SHARED_LIBRARIES = PLATFORM_PKG_CONFIG_LIBRARIES = PLATFORM_PKG_CONFIG_LIBRARIES += cairo -PLATFORM_PKG_CONFIG_LIBRARIES += zlib +# PLATFORM_PKG_CONFIG_LIBRARIES += zlib PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-app-$(GST_VERSION) PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-$(GST_VERSION) PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-video-$(GST_VERSION) @@ -371,17 +375,17 @@ ifeq "$(shell pkg-config --exists libcurl4 && echo 1)" "1" endif -ifeq ($(CROSS_COMPILING),1) - ifeq "$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists glfw3 && echo 1)" "1" - PLATFORM_PKG_CONFIG_LIBRARIES += glfw3 - PLATFORM_LIBRARIES += Xinerama - endif -else - ifeq "$(shell pkg-config --exists glfw3 && echo 1)" "1" - PLATFORM_PKG_CONFIG_LIBRARIES += glfw3 - PLATFORM_LIBRARIES += Xinerama - endif -endif +# ifeq ($(CROSS_COMPILING),1) +# ifeq "$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists glfw3 && echo 1)" "1" +# PLATFORM_PKG_CONFIG_LIBRARIES += glfw3 +# PLATFORM_LIBRARIES += Xinerama +# endif +# else +# ifeq "$(shell pkg-config --exists glfw3 && echo 1)" "1" +# PLATFORM_PKG_CONFIG_LIBRARIES += glfw3 +# PLATFORM_LIBRARIES += Xinerama +# endif +# endif ifeq ($(CROSS_COMPILING),1) ifeq "$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists rtaudio && echo 1)" "1" From c5faaa775dc6c8d5bcfa325c15cc6125722cf3cd Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 19:11:02 +1100 Subject: [PATCH 05/56] Script moving oh no --- .github/workflows/of.yml | 11 ++++++----- scripts/ci/{linux64 => linux/64}/build.sh | 0 scripts/ci/{linux64 => linux/64}/install.sh | 0 scripts/ci/{linux64 => linux/64}/run_tests.sh | 0 .../{linuxarmv7l => linux/armv7l}/arch-bootstrap.sh | 0 .../armv7l}/arch-bootstrap_downloadonly.sh | 0 scripts/ci/{linuxarmv7l => linux/armv7l}/build.sh | 0 .../ci/{linuxarmv7l => linux/armv7l}/build_junest.sh | 0 scripts/ci/{linuxarmv7l => linux/armv7l}/install.sh | 0 scripts/ci/{linuxrpi => linux/rpi}/build.sh | 0 scripts/ci/{linuxrpi => linux/rpi}/install.sh | 0 scripts/ci/{linuxrpi => linux/rpi}/multistrap.conf | 0 12 files changed, 6 insertions(+), 5 deletions(-) rename scripts/ci/{linux64 => linux/64}/build.sh (100%) rename scripts/ci/{linux64 => linux/64}/install.sh (100%) rename scripts/ci/{linux64 => linux/64}/run_tests.sh (100%) rename scripts/ci/{linuxarmv7l => linux/armv7l}/arch-bootstrap.sh (100%) rename scripts/ci/{linuxarmv7l => linux/armv7l}/arch-bootstrap_downloadonly.sh (100%) rename scripts/ci/{linuxarmv7l => linux/armv7l}/build.sh (100%) rename scripts/ci/{linuxarmv7l => linux/armv7l}/build_junest.sh (100%) rename scripts/ci/{linuxarmv7l => linux/armv7l}/install.sh (100%) rename scripts/ci/{linuxrpi => linux/rpi}/build.sh (100%) rename scripts/ci/{linuxrpi => linux/rpi}/install.sh (100%) rename scripts/ci/{linuxrpi => linux/rpi}/multistrap.conf (100%) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index 925743b0edd..5d05c047526 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -318,17 +318,18 @@ jobs: key: ${{ matrix.cfg.target }} - name: Install dependencies - run: ./scripts/ci/$TARGET/install.sh; + run: ./scripts/ci/$TARGET/$ARCH/install.sh; - name: Download libs run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.arch}} -g ${{matrix.cfg.GCC}} - name: Build - run: if [ "$TARGET" = "linux64" ]; then - scripts/ci/linux64/build.sh; - scripts/ci/$TARGET/run_tests.sh; + run: | + if [ "$TARGET" = "linux" ]; then + scripts/ci/$TARGET/$ARCH/build.sh; + scripts/ci/$TARGET/$ARCH/run_tests.sh; else - scripts/ci/$TARGET/build.sh; + scripts/ci/$TARGET/$ARCH/build.sh; fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripts/ci/linux64/build.sh b/scripts/ci/linux/64/build.sh similarity index 100% rename from scripts/ci/linux64/build.sh rename to scripts/ci/linux/64/build.sh diff --git a/scripts/ci/linux64/install.sh b/scripts/ci/linux/64/install.sh similarity index 100% rename from scripts/ci/linux64/install.sh rename to scripts/ci/linux/64/install.sh diff --git a/scripts/ci/linux64/run_tests.sh b/scripts/ci/linux/64/run_tests.sh similarity index 100% rename from scripts/ci/linux64/run_tests.sh rename to scripts/ci/linux/64/run_tests.sh diff --git a/scripts/ci/linuxarmv7l/arch-bootstrap.sh b/scripts/ci/linux/armv7l/arch-bootstrap.sh similarity index 100% rename from scripts/ci/linuxarmv7l/arch-bootstrap.sh rename to scripts/ci/linux/armv7l/arch-bootstrap.sh diff --git a/scripts/ci/linuxarmv7l/arch-bootstrap_downloadonly.sh b/scripts/ci/linux/armv7l/arch-bootstrap_downloadonly.sh similarity index 100% rename from scripts/ci/linuxarmv7l/arch-bootstrap_downloadonly.sh rename to scripts/ci/linux/armv7l/arch-bootstrap_downloadonly.sh diff --git a/scripts/ci/linuxarmv7l/build.sh b/scripts/ci/linux/armv7l/build.sh similarity index 100% rename from scripts/ci/linuxarmv7l/build.sh rename to scripts/ci/linux/armv7l/build.sh diff --git a/scripts/ci/linuxarmv7l/build_junest.sh b/scripts/ci/linux/armv7l/build_junest.sh similarity index 100% rename from scripts/ci/linuxarmv7l/build_junest.sh rename to scripts/ci/linux/armv7l/build_junest.sh diff --git a/scripts/ci/linuxarmv7l/install.sh b/scripts/ci/linux/armv7l/install.sh similarity index 100% rename from scripts/ci/linuxarmv7l/install.sh rename to scripts/ci/linux/armv7l/install.sh diff --git a/scripts/ci/linuxrpi/build.sh b/scripts/ci/linux/rpi/build.sh similarity index 100% rename from scripts/ci/linuxrpi/build.sh rename to scripts/ci/linux/rpi/build.sh diff --git a/scripts/ci/linuxrpi/install.sh b/scripts/ci/linux/rpi/install.sh similarity index 100% rename from scripts/ci/linuxrpi/install.sh rename to scripts/ci/linux/rpi/install.sh diff --git a/scripts/ci/linuxrpi/multistrap.conf b/scripts/ci/linux/rpi/multistrap.conf similarity index 100% rename from scripts/ci/linuxrpi/multistrap.conf rename to scripts/ci/linux/rpi/multistrap.conf From c370f8c7cda70def02dd7524e0de44c4067dc79c Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 19:49:52 +1100 Subject: [PATCH 06/56] Linux Script Updates --- .github/workflows/of.yml | 4 ++-- scripts/ci/linux/64/build.sh | 2 +- scripts/ci/linux/64/install.sh | 2 +- scripts/ci/linux/64/run_tests.sh | 2 +- scripts/dev/download_libs.sh | 28 ++++++++++++++++++---------- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index 5d05c047526..2b93e815358 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -227,12 +227,12 @@ jobs: - name: Download libs run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.libs}} - name: Install dependencies - run: ./scripts/ci/linuxrpi/install.sh; + run: ./scripts/ci/linux/rpi/install.sh; - name: LS shell: bash run: ls -alfR - name: Build - run: ./scripts/ci/linuxrpi/build.sh; + run: ./scripts/ci/linux/rpi/build.sh; # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index 2063953a425..9eef46010ae 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -1,6 +1,6 @@ #!/bin/bash set -ev -ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"} +ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"} # Add compiler flag to reduce memory usage to enable builds to complete # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746#c7 # the "proper" way does not work currently: diff --git a/scripts/ci/linux/64/install.sh b/scripts/ci/linux/64/install.sh index fae3e3a30e8..821cc96fb7f 100755 --- a/scripts/ci/linux/64/install.sh +++ b/scripts/ci/linux/64/install.sh @@ -2,7 +2,7 @@ set -ev if [ -z ${OF_ROOT} ]; then - OF_ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"} + OF_ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"} fi # Trusty/14.04 builds don't have databases running - disable this diff --git a/scripts/ci/linux/64/run_tests.sh b/scripts/ci/linux/64/run_tests.sh index 2f247e16e1e..50618781cc5 100755 --- a/scripts/ci/linux/64/run_tests.sh +++ b/scripts/ci/linux/64/run_tests.sh @@ -1,6 +1,6 @@ #!/bin/bash # set -ev -ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"} +ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"} # if [ "$OPT" == "qbs" ]; then # exit 0 diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 8452ebe0228..871d5f6a41e 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -257,16 +257,11 @@ if [ "$ARCH" == "" ]; then ARCH=aarch64 fi elif [ "$ARCH" == "armv7l" ]; then - # Check for Raspberry Pi - if [ -f /opt/vc/include/bcm_host.h ]; then - ARCH=armv6l + if [ -f /opt/vc/include/bcm_host.h ]; then # Check for Raspberry Pi + ARCH=armv6l #this makes no sense fi elif [ "$ARCH" == "i686" ] || [ "$ARCH" == "i386" ]; then - cat << EOF -32bit linux is not officially supported anymore but compiling -the libraries using the build script in apothecary/scripts -should compile all the dependencies without problem -EOF + echo "32bit linux is not officially supported anymore but compiling the libraries using the build script in apothecary/scripts should compile all the dependencies without problem" exit 1 fi elif [ "$PLATFORM" == "msys2" ]; then @@ -286,7 +281,6 @@ EOF ARCH=$(detectHostVsArch) echo " VS host arch → ${ARCH} (pass -a all for every VS arch, or -a 64|arm64|arm64ec)" fi - if [ "$PLATFORM" == "osx" ]; then ARCH=x86_64 fi @@ -317,9 +311,23 @@ if [ "$PLATFORM" == "linux" ]; then fi echo "GCC_VERSION: [$GCC_VERSION]" GCC_VERSION="gcc${GCC_VERSION}" + if [ "$ARCH" == "x86_64" ] || [ "$ARCH" == "64" ]; then + OPT="_${GCC_VERSION}" + elif [ "$ARCH" == "arm64" ]; then + OPT="_${GCC_VERSION}" + elif [ "$ARCH" == "aarch64" ]; then + OPT=bookworm + elif [ "$ARCH" == "armv7l" ]; then + OPT=bookworm + elif [ "$ARCH" == "armv6l" ]; then + OPT=bookworm + elif [ "$ARCH" == "jetson" ]; then + OPT=jetson + fi fi + SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$SCRIPT_DIR" @@ -422,7 +430,7 @@ elif [ "$PLATFORM" == "emscripten" ]; then fi else # Linux if [[ $BLEEDING_EDGE = 1 ]] ; then - PKGS="openFrameworksLibs_${VER}_${PLATFORM}_${ARCH}_${GCC_VERSION}.tar.bz2" + PKGS="openFrameworksLibs_${VER}_${PLATFORM}_${ARCH}${OPT}.tar.bz2" else PKGS="openFrameworksLibs_${VER}_${PLATFORM}${ARCH}.tar.bz2" fi From a28a90d3e87dd11e7ab3649aad82c5e25e382b5d Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 22:02:25 +1100 Subject: [PATCH 07/56] Downloader [2.7.1 ~ 2.7.2] exit error if fail on download of library rather than let continue to code compiltion errors emscripten memory64 renamed 64 as internals are em32 and em64 --- scripts/dev/download_libs.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 871d5f6a41e..362f949db4d 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -346,6 +346,9 @@ if [ "$PLATFORM" == "emscripten" ]; then if [[ $ARCH = "" ]] ; then ARCH="32" fi + if [[ $ARCH = "64" ]] ; then + ARCH="_64" + fi fi fi @@ -538,6 +541,11 @@ fi echo " ------ " for PKG in $PKGS; do echo " Uncompressing libraries [${PLATFORM}] from [$PKG]" + if [ ! -f "download/$PKG" ]; then + echo "Error: File 'download/$PKG' does not exist!" >&2 + exit 71 + fi + if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then unzip -qo download/$PKG # rm -r download/$PKG From 5a423d34c13a06beb26d6f5ab6e52bc123dcb145 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 22:43:08 +1100 Subject: [PATCH 08/56] Linux Actions --- .github/workflows/of.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index 2b93e815358..9d4ca6e347b 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -281,8 +281,9 @@ jobs: strategy: matrix: cfg: - - {target: linux, arch: 64, gcc: gcc14} - - {target: linux, arch: 64, gcc: gcc10} + # - {target: linux, arch: 64, gcc: 6} + - {target: linux, arch: 64, gcc: 14} + - {target: linux, arch: 64, gcc: 10} env: TARGET: ${{matrix.cfg.target}} GCC: ${{matrix.cfg.gcc}} From 159bb739c11de993eccb24d6c389ed9e0b635def Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 22:50:13 +1100 Subject: [PATCH 09/56] download_libs [2.7.3 ~ 2.7.4] fix opt args for downloads Linux --- scripts/dev/download_libs.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 362f949db4d..462aff255ff 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -316,13 +316,15 @@ if [ "$PLATFORM" == "linux" ]; then elif [ "$ARCH" == "arm64" ]; then OPT="_${GCC_VERSION}" elif [ "$ARCH" == "aarch64" ]; then - OPT=bookworm + OPT="" + elif [ "$ARCH" == "armv8l" ]; then + OPT="" elif [ "$ARCH" == "armv7l" ]; then - OPT=bookworm + OPT="" elif [ "$ARCH" == "armv6l" ]; then - OPT=bookworm + OPT="" elif [ "$ARCH" == "jetson" ]; then - OPT=jetson + OPT="" fi fi From a897c93ca3f5f351a08f37575d96b5e79cdf0660 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 15 Jan 2025 23:03:14 +1100 Subject: [PATCH 10/56] downloader set linux aarch64 to 64 for testing on arm64 linux --- scripts/dev/download_libs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 462aff255ff..c2fcb5ab58a 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -14,7 +14,7 @@ LEGACY=0 SILENT_ARGS="" NO_SSL="" BLEEDING_EDGE=0 -DL_VERSION=2.7.4 +DL_VERSION=2.7.5 GCC_VERSION=0 TAG="" REPO="latest" From 1ee20a8f0ef65d93ea7f9f6fd3c22e52fb9c6e32 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 00:02:12 +1100 Subject: [PATCH 11/56] Makefile Linux subpath --- .../project/makefileCommon/config.shared.mk | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 4ab8df1f048..56105c70e1f 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -84,18 +84,23 @@ ifndef PLATFORM_LIB_SUBPATH # determine from the arch ifeq ($(PLATFORM_OS),Linux) ifeq ($(PLATFORM_ARCH),x86_64) - PLATFORM_LIB_SUBPATH=linux64 + PLATFORM_LIB_SUBPATH=linux/lib/64 else ifeq ($(PLATFORM_ARCH),armv6l) - PLATFORM_LIB_SUBPATH=linuxarmv6l + PLATFORM_LIB_SUBPATH=linux/lib/armv6l else ifeq ($(PLATFORM_ARCH),armv7l) - PLATFORM_LIB_SUBPATH=linuxarmv7l + PLATFORM_LIB_SUBPATH=linux/lib/armv7l + else ifeq ($(PLATFORM_ARCH),armv8l) + PLATFORM_LIB_SUBPATH=linux/lib/armv8l + else ifeq ($(PLATFORM_ARCH),arm64) + PLATFORM_LIB_SUBPATH=linux/lib/arm64 + else ifeq ($(PLATFORM_ARCH),aarch64) + PLATFORM_LIB_SUBPATH=linux/lib/aarch64 + else ifeq ($(PLATFORM_ARCH),jetson) + PLATFORM_LIB_SUBPATH=linux/lib/jetson else ifeq ($(PLATFORM_ARCH),i386) PLATFORM_LIB_SUBPATH=linux else ifeq ($(PLATFORM_ARCH),i686) PLATFORM_LIB_SUBPATH=linux - else ifeq ($(PLATFORM_ARCH),aarch64) - PLATFORM_LIB_SUBPATH=linuxaarch64 - else $(error This makefile does not support your architecture $(PLATFORM_ARCH)) endif SHARED_LIB_EXTENSION=so From 390dc9685e75e1a1a4051b5c86b266af033b4f34 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 00:28:05 +1100 Subject: [PATCH 12/56] makefile subpath --- .../project/makefileCommon/config.shared.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 56105c70e1f..45ce2101567 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -85,6 +85,8 @@ ifndef PLATFORM_LIB_SUBPATH ifeq ($(PLATFORM_OS),Linux) ifeq ($(PLATFORM_ARCH),x86_64) PLATFORM_LIB_SUBPATH=linux/lib/64 + else ifeq ($(PLATFORM_ARCH),64) + PLATFORM_LIB_SUBPATH=linux/lib/64 else ifeq ($(PLATFORM_ARCH),armv6l) PLATFORM_LIB_SUBPATH=linux/lib/armv6l else ifeq ($(PLATFORM_ARCH),armv7l) @@ -99,7 +101,7 @@ ifndef PLATFORM_LIB_SUBPATH PLATFORM_LIB_SUBPATH=linux/lib/jetson else ifeq ($(PLATFORM_ARCH),i386) PLATFORM_LIB_SUBPATH=linux - else ifeq ($(PLATFORM_ARCH),i686) + else PLATFORM_LIB_SUBPATH=linux $(error This makefile does not support your architecture $(PLATFORM_ARCH)) endif @@ -221,8 +223,11 @@ ifdef MAKEFILE_DEBUG endif +$(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) +$(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) + ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH)),) -$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH) probably you downloaded the wrong package?) +$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH) probably you downloaded the wrong package?) endif # generate a list of valid core platform variants from the files in the platform makefiles directory From 469577ab273aa64b206d9d61b0ba7c703ce56b9a Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 00:39:40 +1100 Subject: [PATCH 13/56] Linux subpath --- .../project/makefileCommon/config.shared.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 45ce2101567..9073d758f6f 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -84,21 +84,21 @@ ifndef PLATFORM_LIB_SUBPATH # determine from the arch ifeq ($(PLATFORM_OS),Linux) ifeq ($(PLATFORM_ARCH),x86_64) - PLATFORM_LIB_SUBPATH=linux/lib/64 + PLATFORM_LIB_SUBPATH=linux/64 else ifeq ($(PLATFORM_ARCH),64) - PLATFORM_LIB_SUBPATH=linux/lib/64 + PLATFORM_LIB_SUBPATH=linux/64 else ifeq ($(PLATFORM_ARCH),armv6l) - PLATFORM_LIB_SUBPATH=linux/lib/armv6l + PLATFORM_LIB_SUBPATH=linux/armv6l else ifeq ($(PLATFORM_ARCH),armv7l) - PLATFORM_LIB_SUBPATH=linux/lib/armv7l + PLATFORM_LIB_SUBPATH=linux/armv7l else ifeq ($(PLATFORM_ARCH),armv8l) - PLATFORM_LIB_SUBPATH=linux/lib/armv8l + PLATFORM_LIB_SUBPATH=linux/armv8l else ifeq ($(PLATFORM_ARCH),arm64) - PLATFORM_LIB_SUBPATH=linux/lib/arm64 + PLATFORM_LIB_SUBPATH=linux/arm64 else ifeq ($(PLATFORM_ARCH),aarch64) - PLATFORM_LIB_SUBPATH=linux/lib/aarch64 + PLATFORM_LIB_SUBPATH=linux/aarch64 else ifeq ($(PLATFORM_ARCH),jetson) - PLATFORM_LIB_SUBPATH=linux/lib/jetson + PLATFORM_LIB_SUBPATH=linux/jetson else ifeq ($(PLATFORM_ARCH),i386) PLATFORM_LIB_SUBPATH=linux else From 264ca7b9cd94ae2ec5fc92b95c37980d9dec5fb0 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 01:16:10 +1100 Subject: [PATCH 14/56] download libs validate downloads before overrwite and 2.8.0. wget2 disabled for the moment --- scripts/dev/download_libs.sh | 13 ++++++++++++- scripts/dev/downloader.sh | 5 ++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index c2fcb5ab58a..894df71082c 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -14,7 +14,7 @@ LEGACY=0 SILENT_ARGS="" NO_SSL="" BLEEDING_EDGE=0 -DL_VERSION=2.7.5 +DL_VERSION=2.8.0 GCC_VERSION=0 TAG="" REPO="latest" @@ -471,6 +471,17 @@ fi writeVerifyState "$(pwd)" "$REPO" "$PLATFORM" "$ARCH" cd ../ # back to libs +VALID=true +for PKG in $PKGS; do + echo " Validate libraries [${PLATFORM}] from [$PKG]" + if [ ! -f "download/$PKG" ]; then + echo "Error: File 'download/$PKG' does not exist!" >&2 + VALID=false + fi +done +if [ $VALID -eq false ]; then + exit 71 +fi libs=("cairo" "curl" "FreeImage" "brotli" "fmod" "freetype" "glew" "glfw" "json" "libpng" "openssl" "pixman" "poco" "rtAudio" "tess2" "uriparser" "utf8" "videoInput" "zlib" "opencv" "ippicv" "assimp" "libxml2" "svgtiny" "fmt") # Resolve which lib/ folder this package uses. diff --git a/scripts/dev/downloader.sh b/scripts/dev/downloader.sh index 311e20aa096..a55ed14b730 100755 --- a/scripts/dev/downloader.sh +++ b/scripts/dev/downloader.sh @@ -154,8 +154,7 @@ check_remote_vs_local() { finalurl() { local input_url="$1" local trimmed_url=$(echo "$input_url" | sed 's/[[:space:]]*$//') - local resolved_url=$(curl -L -I --retry "${RETRY_MAX:-5}" --max-redirs "${MAX_REDIRECTS:-5}" \ - --retry-connrefused --write-out '%{url_effective}' --silent --output /dev/null "$trimmed_url") + local resolved_url=$(curl -L -I --retry "${RETRY_MAX:-5}" --max-redirs "${MAX_REDIRECTS:-5}" --retry-connrefused --write-out '%{url_effective}' --silent --output /dev/null "$trimmed_url") if [[ -z "$resolved_url" ]]; then echoError "Failed to resolve URL: $trimmed_url" return 1 @@ -173,7 +172,7 @@ downloader() { NO_SSL=0 COMPRESSION=1 VERBOSE=0 - WGET2=1 + WGET2=0 CURL=1 WGET=1 CLOSE_CONNECTION=1 From 135babc440a3eeebcffc00c6aadea9d5d47f3032 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 01:27:46 +1100 Subject: [PATCH 15/56] Makefiles --- .../64}/config.linux64.default.mk | 0 .../64}/libopenFrameworks.cbp | 0 .../aarch64}/config.linuxaarch64.default.mk | 0 .../linux/arm64/config.linuxarm64.default.mk | 131 ++++++++++++++++++ .../armv6l}/config.linuxarmv6l.default.mk | 0 .../armv7l}/config.linuxarmv7l.default.mk | 0 .../armv7l}/config.linuxarmv7l.raspberry2.mk | 0 .../armv7l}/config.linuxarmv7l.udoo.mk | 0 .../linux/{ => i386}/config.linux.default.mk | 0 .../linux/{ => i386}/libopenFrameworks.cbp | 0 10 files changed, 131 insertions(+) rename libs/openFrameworksCompiled/project/{linux64 => linux/64}/config.linux64.default.mk (100%) rename libs/openFrameworksCompiled/project/{linux64 => linux/64}/libopenFrameworks.cbp (100%) rename libs/openFrameworksCompiled/project/{linuxaarch64 => linux/aarch64}/config.linuxaarch64.default.mk (100%) create mode 100644 libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk rename libs/openFrameworksCompiled/project/{linuxarmv6l => linux/armv6l}/config.linuxarmv6l.default.mk (100%) rename libs/openFrameworksCompiled/project/{linuxarmv7l => linux/armv7l}/config.linuxarmv7l.default.mk (100%) rename libs/openFrameworksCompiled/project/{linuxarmv7l => linux/armv7l}/config.linuxarmv7l.raspberry2.mk (100%) rename libs/openFrameworksCompiled/project/{linuxarmv7l => linux/armv7l}/config.linuxarmv7l.udoo.mk (100%) rename libs/openFrameworksCompiled/project/linux/{ => i386}/config.linux.default.mk (100%) rename libs/openFrameworksCompiled/project/linux/{ => i386}/libopenFrameworks.cbp (100%) diff --git a/libs/openFrameworksCompiled/project/linux64/config.linux64.default.mk b/libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linux64/config.linux64.default.mk rename to libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk diff --git a/libs/openFrameworksCompiled/project/linux64/libopenFrameworks.cbp b/libs/openFrameworksCompiled/project/linux/64/libopenFrameworks.cbp similarity index 100% rename from libs/openFrameworksCompiled/project/linux64/libopenFrameworks.cbp rename to libs/openFrameworksCompiled/project/linux/64/libopenFrameworks.cbp diff --git a/libs/openFrameworksCompiled/project/linuxaarch64/config.linuxaarch64.default.mk b/libs/openFrameworksCompiled/project/linux/aarch64/config.linuxaarch64.default.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linuxaarch64/config.linuxaarch64.default.mk rename to libs/openFrameworksCompiled/project/linux/aarch64/config.linuxaarch64.default.mk diff --git a/libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk b/libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk new file mode 100644 index 00000000000..fffdab45b2b --- /dev/null +++ b/libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk @@ -0,0 +1,131 @@ +############################################################################### +# CONFIGURE CORE PLATFORM MAKEFILE +# This file is where we make platform and architecture specific +# configurations. This file can be specified for a generic architecture or can +# be defined as variants. For instance, normally this file will be located in +# a platform specific subpath such as +# +# $(OF_ROOT)/libs/openFrameworksComplied/linux64 +# +# This file will then be a generic platform file like: +# +# configure.linux64.default.make +# +# Or it can specify a specific platform variant like: +# +# configure.linuxarmv6l.raspberrypi.make +# +################################################################################ + +################################################################################ +# include common rules +# +# all linux systems have several rules in common so most of them are included +# from the following file +# +################################################################################ + +include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk + + +################################################################################ +# PLATFORM CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# platform. These flags will always be added when compiling a project or the +# core library. These flags are presented to the compiler AFTER the +# PLATFORM_OPTIMIZATION_CFLAGS below. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +PLATFORM_LDFLAGS += -no-pie +# PLATFORM_LDFLAGS += -nostartfiles + +PLATFORM_CFLAGS += -march=armv8-a +PLATFORM_CFLAGS += -mcpu=cortex-a72 +PLATFORM_CFLAGS += -mtune=cortex-a72 +# PLATFORM_CFLAGS += -Wall +# PLATFORM_CFLAGS += -Werror +PLATFORM_CFLAGS += -fPIC +PLATFORM_CFLAGS += -ftree-vectorize +PLATFORM_CFLAGS += -Wno-psabi +PLATFORM_CFLAGS += -pipe + +################################################################################ +# PLATFORM LIBRARIES +# These are library names/paths that are platform specific and are specified +# using names or paths. The library flag (i.e. -l) is prefixed automatically. +# +# PLATFORM_LIBRARIES are libraries that can be found in the library search +# paths. +# PLATFORM_STATIC_LIBRARIES is a list of required static libraries. +# PLATFORM_SHARED_LIBRARIES is a list of required shared libraries. +# PLATFORM_PKG_CONFIG_LIBRARIES is a list of required libraries that are +# under system control and are easily accesible via the package +# configuration utility (i.e. pkg-config) +# +# See the helpfile for the -l flag here for more information: +# http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +PLATFORM_PKG_CONFIG_LIBRARIES += glesv1_cm +PLATFORM_PKG_CONFIG_LIBRARIES += glesv2 +PLATFORM_PKG_CONFIG_LIBRARIES += egl + + +################################################################################ +# PLATFORM CORE EXCLUSIONS +# During compilation, these makefiles will generate lists of sources, headers +# and third party libraries to be compiled and linked into a program or core +# library. The PLATFORM_CORE_EXCLUSIONS is a list of fully qualified file +# paths that will be used to exclude matching paths and files during list +# generation. +# +# Each item in the PLATFORM_CORE_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlayer.cpp + +ifeq ($(CROSS_COMPILING),1) +ifdef MAKEFILE_DEBUG + $(info detected cross compiling $(CROSS_COMPILING)) +endif + + ifdef GCC_PREFIX + #You have specified GCC_PREFIX with an environment variable + else + GCC_PREFIX = aarch64-linux-gnu + endif + + PLATFORM_CXX = /usr/bin/$(GCC_PREFIX)-g++ + PLATFORM_CC = /usr/bin/$(GCC_PREFIX)-gcc + PLATFORM_AR = /usr/bin/$(GCC_PREFIX)-ar + PLATFORM_LD = /usr/bin/$(GCC_PREFIX)-ld + + SYSROOT=$(RPI_ROOT) + + PLATFORM_CFLAGS += --sysroot=$(SYSROOT) + + PLATFORM_LIBRARY_SEARCH_PATHS += /usr/lib/$(GCC_PREFIX) + PLATFORM_LIBRARY_SEARCH_PATHS += /lib/$(GCC_PREFIX) + PLATFORM_LIBRARY_SEARCH_PATHS += $(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/blas + PLATFORM_LIBRARY_SEARCH_PATHS += $(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/lapack + + PLATFORM_LDFLAGS += --sysroot=$(SYSROOT) + PLATFORM_LDFLAGS += -lblas -llapack + PLATFORM_LDFLAGS += -Xlinker -rpath-link=/usr/lib/$(GCC_PREFIX) + PLATFORM_LDFLAGS += -Xlinker -rpath-link=/lib/$(GCC_PREFIX) + PLATFORM_LDFLAGS += -Xlinker -rpath-link=/usr/lib/$(GCC_PREFIX)/pulseaudio + PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/lapack + PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/blas + + PKG_CONFIG_LIBDIR += /usr/lib/pkgconfig:/usr/lib/$(GCC_PREFIX)/pkgconfig:/usr/share/pkgconfig + +endif diff --git a/libs/openFrameworksCompiled/project/linuxarmv6l/config.linuxarmv6l.default.mk b/libs/openFrameworksCompiled/project/linux/armv6l/config.linuxarmv6l.default.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linuxarmv6l/config.linuxarmv6l.default.mk rename to libs/openFrameworksCompiled/project/linux/armv6l/config.linuxarmv6l.default.mk diff --git a/libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.default.mk b/libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.default.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.default.mk rename to libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.default.mk diff --git a/libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.raspberry2.mk b/libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.raspberry2.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.raspberry2.mk rename to libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.raspberry2.mk diff --git a/libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.udoo.mk b/libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.udoo.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.udoo.mk rename to libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.udoo.mk diff --git a/libs/openFrameworksCompiled/project/linux/config.linux.default.mk b/libs/openFrameworksCompiled/project/linux/i386/config.linux.default.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linux/config.linux.default.mk rename to libs/openFrameworksCompiled/project/linux/i386/config.linux.default.mk diff --git a/libs/openFrameworksCompiled/project/linux/libopenFrameworks.cbp b/libs/openFrameworksCompiled/project/linux/i386/libopenFrameworks.cbp similarity index 100% rename from libs/openFrameworksCompiled/project/linux/libopenFrameworks.cbp rename to libs/openFrameworksCompiled/project/linux/i386/libopenFrameworks.cbp From ce7a2a218f4a9e64b1d0297a24b5084e34b64345 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 01:32:03 +1100 Subject: [PATCH 16/56] downloadlibs [2.8.0 ~ 2.8.1] valid bool to int --- scripts/dev/download_libs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 894df71082c..9b9da532784 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -14,7 +14,7 @@ LEGACY=0 SILENT_ARGS="" NO_SSL="" BLEEDING_EDGE=0 -DL_VERSION=2.8.0 +DL_VERSION=2.8.1 GCC_VERSION=0 TAG="" REPO="latest" @@ -471,15 +471,15 @@ fi writeVerifyState "$(pwd)" "$REPO" "$PLATFORM" "$ARCH" cd ../ # back to libs -VALID=true +VALID=1 for PKG in $PKGS; do echo " Validate libraries [${PLATFORM}] from [$PKG]" if [ ! -f "download/$PKG" ]; then echo "Error: File 'download/$PKG' does not exist!" >&2 - VALID=false + VALID=0 fi done -if [ $VALID -eq false ]; then +if [ $VALID -eq 0 ]; then exit 71 fi libs=("cairo" "curl" "FreeImage" "brotli" "fmod" "freetype" "glew" "glfw" "json" "libpng" "openssl" "pixman" "poco" "rtAudio" "tess2" "uriparser" "utf8" "videoInput" "zlib" "opencv" "ippicv" "assimp" "libxml2" "svgtiny" "fmt") From 6faceff5e800cd0718c5228ad3a73fa12abb0232 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 01:38:07 +1100 Subject: [PATCH 17/56] ci linux --- scripts/ci/linux/64/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index 9eef46010ae..63b3db346e2 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -22,7 +22,7 @@ else echo "##[group]**** Building OF core ****" # this carries over to subsequent compilations of examples - echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux64/config.linux64.default.mk + echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk sed -i "s/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = .*/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g0/" libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk cd libs/openFrameworksCompiled/project make -j2 From 8bdddbeb8067c194818068e156729e71e78e3971 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 01:50:47 +1100 Subject: [PATCH 18/56] Workflow ci optimisation VS single ARCH downloads Actions added 22.04 linux GCC10 test --- .github/workflows/of.yml | 44 +++++++++++++++++++++++++++++++++++++++- scripts/ci/vs/install.sh | 4 ++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index 9d4ca6e347b..8cf034eb797 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -276,7 +276,7 @@ jobs: # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - build-linux64: + build-linux-64: runs-on: ubuntu-24.04 strategy: matrix: @@ -333,6 +333,48 @@ jobs: scripts/ci/$TARGET/$ARCH/build.sh; fi + build-linux-64-22.04: + runs-on: ubuntu-22.04 + strategy: + matrix: + cfg: + - {target: linux, arch: 64, gcc: 10} + env: + TARGET: ${{matrix.cfg.target}} + GCC: ${{matrix.cfg.gcc}} + ARCH: ${{matrix.cfg.arch}} + steps: + - name: Remove Old lib-unwind + run: if [ "$TARGET" = "linux" ]; then + sudo apt-get remove libunwind-14 -y; + fi + - name: Cache Packages + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: aptitude aptitude-common libboost-iostreams1.83.0 libcwidget4 libsigc++-2.0-0v5 libxapian30 fonts-wine{a} libasound2-plugins{a} libcapi20-3t64{a} libosmesa6{a} libpcsclite1{a} libspeexdsp1{a} libwine{a} libxkbregistry0{a} libz-mingw-w64{a} wine{a} wine64 wget2 make libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile1-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libpulse-dev libusb-1.0-0-dev libgtk2.0-dev libopencv-dev libassimp-dev librtaudio-dev gdb libglfw3-dev liburiparser-dev libpugixml-dev libgconf-2-4 libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-pulseaudio gstreamer1.0-x gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good + version: 1.0 + + - uses: actions/checkout@v4 + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.14 + with: + key: ${{ matrix.cfg.target }} + + - name: Install dependencies + run: ./scripts/ci/$TARGET/$ARCH/install.sh; + + - name: Download libs + run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.arch}} -g ${{matrix.cfg.GCC}} + + - name: Build + run: | + if [ "$TARGET" = "linux" ]; then + scripts/ci/$TARGET/$ARCH/build.sh; + scripts/ci/$TARGET/$ARCH/run_tests.sh; + else + scripts/ci/$TARGET/$ARCH/build.sh; + fi + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # build-linux64-2204: diff --git a/scripts/ci/vs/install.sh b/scripts/ci/vs/install.sh index 2308b90f365..96d40509ee2 100755 --- a/scripts/ci/vs/install.sh +++ b/scripts/ci/vs/install.sh @@ -72,7 +72,7 @@ ADDONS=( ) echo "Updating projects with PG at:${PG_OF_PATH}" -if [[ "$VS_TARGET" == "vs2026" ]]; then +if [[ "$VS_TARGET" == "--vs2026" ]]; then for i in "${!PROJECTS[@]}"; do PROJECT=${PROJECTS[i]} ADDON=${ADDONS[i]} @@ -90,4 +90,4 @@ else #cmd.exe /c "${PG_OF_PATH} ${OPTIONS}" eval "${PG_OF_PATH} ${OPTIONS}" done -fi \ No newline at end of file +fi From 3fbe17fd7771346b0befc75bb4bf958cb4640878 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 02:50:05 +1100 Subject: [PATCH 19/56] Linux 22.04 Test --- .github/workflows/of.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index 8cf034eb797..cc57d6dc88b 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -333,7 +333,7 @@ jobs: scripts/ci/$TARGET/$ARCH/build.sh; fi - build-linux-64-22.04: + build-linux-64-22-04: runs-on: ubuntu-22.04 strategy: matrix: From 3081d87ece54d8cf1db1e8da28bcbbb8b41212a9 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 03:42:24 +1100 Subject: [PATCH 20/56] VS Download fix --- scripts/ci/linux/64/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index 63b3db346e2..b93a725b6e7 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -25,12 +25,12 @@ else echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk sed -i "s/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = .*/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g0/" libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk cd libs/openFrameworksCompiled/project - make -j2 + make -j2 DEBUG=1 MAKEFILE_DEBUG=1 echo "##[endgroup]" echo "##[group]**** Building emptyExample ****" cd $ROOT/scripts/templates/linux64 - make -j2 + make -j2 DEBUG=1 MAKEFILE_DEBUG=1 echo "##[endgroup]" echo "##[group]**** Building allAddonsExample ****" @@ -38,6 +38,6 @@ else cp scripts/templates/linux64/Makefile examples/templates/allAddonsExample/ cp scripts/templates/linux64/config.make examples/templates/allAddonsExample/ cd examples/templates/allAddonsExample/ - make -j2 + make -j2 DEBUG=1 MAKEFILE_DEBUG=1 echo "##[endgroup]" fi From 8a45706c3bcd3dc00b942862d4dfa947b0357cbd Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Jan 2025 03:42:46 +1100 Subject: [PATCH 21/56] Makefile fixes / vs arch --- .../project/makefileCommon/config.shared.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 9073d758f6f..f20da8579ed 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -222,12 +222,8 @@ ifdef MAKEFILE_DEBUG $(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH)) endif - -$(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) -$(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) - ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH)),) -$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH) probably you downloaded the wrong package?) +$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH) / $(PLATFORM_LIB_SUBPATH) probably you downloaded the wrong package?) endif # generate a list of valid core platform variants from the files in the platform makefiles directory From c6e14b160477ae6d61fe66d3f0fdc2c558858688 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 00:05:08 +1100 Subject: [PATCH 22/56] Makefile depth fix --- .../project/makefileCommon/config.shared.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index f20da8579ed..99617d147d5 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -227,7 +227,8 @@ $(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJEC endif # generate a list of valid core platform variants from the files in the platform makefiles directory -AVAILABLE_PLATFORM_VARIANTS=$(shell $(FIND) $(OF_PLATFORM_MAKEFILES)/config.*.mk -maxdepth 1 -type f | sed -E 's/.*\.([^\.]*)\.mk/\1/' ) +AVAILABLE_PLATFORM_VARIANTS=$(shell $(FIND) $(OF_PLATFORM_MAKEFILES)/config.*.mk -maxdepth 2 -type f | sed -E 's/.*\.([^\.]*)\.mk/\1/' ) +$(info AVAILABLE_PLATFORM_VARIANTS=$(AVAILABLE_PLATFORM_VARIANTS)) AVAILABLE_PLATFORM_VARIANTS+=default # check to see if we have a file for the desired variant. if not, quit and list the variants. From 4bdccdba33d77cda3c8f30736886d3d6d716937f Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 00:47:44 +1100 Subject: [PATCH 23/56] Makefile strict tab --- .../aarch64/config.linuxaarch64.default.mk | 2 +- .../linux/arm64/config.linuxarm64.default.mk | 2 +- .../project/makefileCommon/config.addons.mk | 68 +++++++------- .../project/makefileCommon/config.shared.mk | 90 ++++++++++--------- 4 files changed, 83 insertions(+), 79 deletions(-) diff --git a/libs/openFrameworksCompiled/project/linux/aarch64/config.linuxaarch64.default.mk b/libs/openFrameworksCompiled/project/linux/aarch64/config.linuxaarch64.default.mk index fffdab45b2b..1a2cbae5864 100644 --- a/libs/openFrameworksCompiled/project/linux/aarch64/config.linuxaarch64.default.mk +++ b/libs/openFrameworksCompiled/project/linux/aarch64/config.linuxaarch64.default.mk @@ -95,7 +95,7 @@ PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlay ifeq ($(CROSS_COMPILING),1) ifdef MAKEFILE_DEBUG - $(info detected cross compiling $(CROSS_COMPILING)) + $(info detected cross compiling $(CROSS_COMPILING)) endif ifdef GCC_PREFIX diff --git a/libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk b/libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk index fffdab45b2b..1a2cbae5864 100644 --- a/libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk +++ b/libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk @@ -95,7 +95,7 @@ PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlay ifeq ($(CROSS_COMPILING),1) ifdef MAKEFILE_DEBUG - $(info detected cross compiling $(CROSS_COMPILING)) + $(info detected cross compiling $(CROSS_COMPILING)) endif ifdef GCC_PREFIX diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk index 12b482e1d81..7a1e71cedc4 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk @@ -3,22 +3,22 @@ ######################################################################## ifeq ($(PLATFORM_OS),Darwin) - PLATFORM_ALTERNATIVE := osx -else + PLATFORM_ALTERNATIVE := osx +else PLATFORM_ALTERNATIVE := void endif # Variable containing all grep commands to exclude unwanted paths EXCLUDE_PATHS_GREP = grep -v "/tvos-arm64" | \ - grep -v "/tvos-arm64_x86_64-simulator" | \ - grep -v "/ios-arm64" | \ - grep -v "/ios-arm64_x86_64-simulator" | \ - grep -v "/ios-arm64_x86_64-maccatalyst" | \ - grep -v "/xros-arm64" | \ - grep -v "/xros-arm64_x86_64-simulator" | \ - grep -v "/watchos-arm64_32_armv7k" | \ - grep -v "/watchos-arm64_i386-simulator" | \ - grep -v "/\.[^\.]" + grep -v "/tvos-arm64_x86_64-simulator" | \ + grep -v "/ios-arm64" | \ + grep -v "/ios-arm64_x86_64-simulator" | \ + grep -v "/ios-arm64_x86_64-maccatalyst" | \ + grep -v "/xros-arm64" | \ + grep -v "/xros-arm64_x86_64-simulator" | \ + grep -v "/watchos-arm64_32_armv7k" | \ + grep -v "/watchos-arm64_i386-simulator" | \ + grep -v "/\.[^\.]" # parses addons includes, in PARSED_ADDON_INCLUDES receives full PATHS to addons define parse_addons_includes @@ -232,7 +232,7 @@ define parse_addon $(eval PROJECT_ADDONS += $(addon_dep)) \ $(call parse_addon,$(addon_dep)) \ ) \ - ) + ) endef @@ -271,26 +271,26 @@ OF_PROJECT_ADDONS_DEPS = $(patsubst %.o,%.d,$(PROJECT_ADDONS_OBJ_FILES)) ######################################################################## # print debug information if so instructed ifdef MAKEFILE_DEBUG - $(info ---PROJECT_ADDONS_PATHS---) - $(foreach v, $(PROJECT_ADDONS_PATHS),$(info $(v))) - $(info ---PROJECT_ADDONS_WITH_CONFIG---) - $(foreach v, $(PROJECT_ADDONS_WITH_CONFIG),$(info $(v))) - $(info ---PROJECT_ADDONS_INCLUDES---) - $(foreach v, $(PROJECT_ADDONS_INCLUDES),$(info $(v))) - $(info ---PROJECT_ADDONS_SOURCE_FILES---) - $(foreach v, $(PROJECT_ADDONS_SOURCE_FILES),$(info $(v))) - $(info ---PROJECT_ADDONS_LIBS---) - $(foreach v, $(PROJECT_ADDONS_LIBS),$(info $(v))) - $(info ---PROJECT_ADDONS_OBJFILES---) - $(foreach v, $(PROJECT_ADDONS_OBJFILES),$(info $(v))) - $(info ---PROJECT_ADDONS_BASE_CFLAGS---) - $(foreach v, $(PROJECT_ADDONS_BASE_CFLAGS),$(info $(v))) - $(info ---PROJECT_ADDONS_DEFINES_CFLAGS---) - $(foreach v, $(PROJECT_ADDONS_DEFINES_CFLAGS),$(info $(v))) - $(info ---PROJECT_ADDONS_INCLUDES_CFLAGS---) - $(foreach v, $(PROJECT_ADDONS_INCLUDES_CFLAGS),$(info $(v))) - $(info ---PROJECT_ADDONS_LDFLAGS---) - $(foreach v, $(PROJECT_ADDONS_LDFLAGS),$(info $(v))) - $(info ---PROJECT_ADDONS_DATA---) - $(foreach v, $(PROJECT_ADDONS_DATA),$(info $(v))) + $(info ---PROJECT_ADDONS_PATHS---) + $(foreach v, $(PROJECT_ADDONS_PATHS),$(info $(v))) + $(info ---PROJECT_ADDONS_WITH_CONFIG---) + $(foreach v, $(PROJECT_ADDONS_WITH_CONFIG),$(info $(v))) + $(info ---PROJECT_ADDONS_INCLUDES---) + $(foreach v, $(PROJECT_ADDONS_INCLUDES),$(info $(v))) + $(info ---PROJECT_ADDONS_SOURCE_FILES---) + $(foreach v, $(PROJECT_ADDONS_SOURCE_FILES),$(info $(v))) + $(info ---PROJECT_ADDONS_LIBS---) + $(foreach v, $(PROJECT_ADDONS_LIBS),$(info $(v))) + $(info ---PROJECT_ADDONS_OBJFILES---) + $(foreach v, $(PROJECT_ADDONS_OBJFILES),$(info $(v))) + $(info ---PROJECT_ADDONS_BASE_CFLAGS---) + $(foreach v, $(PROJECT_ADDONS_BASE_CFLAGS),$(info $(v))) + $(info ---PROJECT_ADDONS_DEFINES_CFLAGS---) + $(foreach v, $(PROJECT_ADDONS_DEFINES_CFLAGS),$(info $(v))) + $(info ---PROJECT_ADDONS_INCLUDES_CFLAGS---) + $(foreach v, $(PROJECT_ADDONS_INCLUDES_CFLAGS),$(info $(v))) + $(info ---PROJECT_ADDONS_LDFLAGS---) + $(foreach v, $(PROJECT_ADDONS_LDFLAGS),$(info $(v))) + $(info ---PROJECT_ADDONS_DATA---) + $(foreach v, $(PROJECT_ADDONS_DATA),$(info $(v))) endif diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 99617d147d5..81a0873fa11 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -31,7 +31,7 @@ PLATFORM_OS ?= $(shell uname -s) HOST_OS=$(shell uname -s) ifdef MAKEFILE_DEBUG - $(info HOST_OS=${HOST_OS}) + $(info HOST_OS=${HOST_OS}) endif ifneq (,$(findstring MSYS_NT,$(HOST_OS))) @@ -70,13 +70,13 @@ endif ifdef MAKEFILE_DEBUG - $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) - $(info PLATFORM_OS=$(PLATFORM_OS)) - $(info HOST_ARCH=$(HOST_ARCH)) - $(info HOST_OS=$(HOST_OS)) - $(info CROSS_COMPILING=$(CROSS_COMPILING)) - $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) - $(info IS_RASPBIAN=$(IS_RASPBIAN)) + $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) + $(info PLATFORM_OS=$(PLATFORM_OS)) + $(info HOST_ARCH=$(HOST_ARCH)) + $(info HOST_OS=$(HOST_OS)) + $(info CROSS_COMPILING=$(CROSS_COMPILING)) + $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) + $(info IS_RASPBIAN=$(IS_RASPBIAN)) endif # if not defined, construct the default PLATFORM_LIB_SUBPATH @@ -142,11 +142,11 @@ endif # if desired, print the variables ifdef MAKEFILE_DEBUG - $(info =================== config.mk platform detection ================) - $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) - $(info PLATFORM_OS=$(PLATFORM_OS)) - $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) - $(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) + $(info =================== config.mk platform detection ================) + $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) + $(info PLATFORM_OS=$(PLATFORM_OS)) + $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) + $(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) endif @@ -209,17 +209,18 @@ endif ################################################################################ # print debug information if needed ifdef MAKEFILE_DEBUG - $(info =================== config.mk paths =============================) - $(info OF_ADDONS_PATH=$(OF_ADDONS_PATH)) - $(info OF_EXAMPLES_PATH=$(OF_EXAMPLES_PATH)) - $(info OF_APPS_PATH=$(OF_APPS_PATH)) - $(info OF_LIBS_PATH=$(OF_LIBS_PATH)) - $(info OF_LIBS_OPENFRAMEWORKS_PATH=$(OF_LIBS_OPENFRAMEWORKS_PATH)) - $(info OF_LIBS_OF_COMPILED_PATH=$(OF_LIBS_OF_COMPILED_PATH)) - $(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) - $(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH)) - $(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES)) - $(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH)) + $(info =================== config.mk paths =============================) + $(info OF_ADDONS_PATH=$(OF_ADDONS_PATH)) + $(info OF_EXAMPLES_PATH=$(OF_EXAMPLES_PATH)) + $(info OF_APPS_PATH=$(OF_APPS_PATH)) + $(info OF_LIBS_PATH=$(OF_LIBS_PATH)) + $(info OF_LIBS_OPENFRAMEWORKS_PATH=$(OF_LIBS_OPENFRAMEWORKS_PATH)) + $(info OF_LIBS_OF_COMPILED_PATH=$(OF_LIBS_OF_COMPILED_PATH)) + $(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) + $(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH)) + $(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES)) + $(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH)) + $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) endif ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH)),) @@ -227,10 +228,13 @@ $(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJEC endif # generate a list of valid core platform variants from the files in the platform makefiles directory -AVAILABLE_PLATFORM_VARIANTS=$(shell $(FIND) $(OF_PLATFORM_MAKEFILES)/config.*.mk -maxdepth 2 -type f | sed -E 's/.*\.([^\.]*)\.mk/\1/' ) -$(info AVAILABLE_PLATFORM_VARIANTS=$(AVAILABLE_PLATFORM_VARIANTS)) +AVAILABLE_PLATFORM_VARIANTS=$(shell $(FIND) $(OF_PLATFORM_MAKEFILES)/config.*.mk -maxdepth 1 -type f | sed -E 's/.*\.([^\.]*)\.mk/\1/' ) AVAILABLE_PLATFORM_VARIANTS+=default +ifdef MAKEFILE_DEBUG + $(info AVAILABLE_PLATFORM_VARIANTS=$(AVAILABLE_PLATFORM_VARIANTS)) +endif + # check to see if we have a file for the desired variant. if not, quit and list the variants. ifeq ($(findstring $(PLATFORM_VARIANT),$(AVAILABLE_PLATFORM_VARIANTS)),) $(error Platform Variant "$(PLATFORM_VARIANT)" is not valid. Valid variants include [$(strip $(AVAILABLE_PLATFORM_VARIANTS))]) @@ -308,14 +312,14 @@ CORE_PKG_CONFIG_LIBRARIES += $(PROJECT_PKG_CONFIG_LIBRARIES) ifneq ($(strip $(CORE_PKG_CONFIG_LIBRARIES)),) ifneq ($(strip $(PKG_CONFIG_LIBDIR)),) ifdef MAKEFILE_DEBUG - $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) - $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) + $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) + $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) endif FAILED_PKG=$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0) else ifdef MAKEFILE_DEBUG - $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) - $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) + $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) + $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) endif FAILED_PKG=$(shell for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0) endif @@ -367,22 +371,22 @@ OF_CORE_HEADER_FILES=$(filter-out $(CORE_EXCLUSIONS),$(shell $(FIND) $(OF_CORE_S # DEBUG INFO ################################################################################ ifdef MAKEFILE_DEBUG - $(info ========================= config.mk flags ========================) - $(info ---OF_CORE_DEFINES_CFLAGS---) - $(foreach v, $(OF_CORE_DEFINES_CFLAGS),$(info $(v))) + $(info ========================= config.mk flags ========================) + $(info ---OF_CORE_DEFINES_CFLAGS---) + $(foreach v, $(OF_CORE_DEFINES_CFLAGS),$(info $(v))) - $(info ---OF_CORE_INCLUDES_CFLAGS---) - $(foreach v, $(OF_CORE_INCLUDES_CFLAGS),$(info $(v))) + $(info ---OF_CORE_INCLUDES_CFLAGS---) + $(foreach v, $(OF_CORE_INCLUDES_CFLAGS),$(info $(v))) - $(info ---OF_CORE_FRAMEWORKS_CFLAGS---) - $(foreach v, $(OF_CORE_FRAMEWORKS_CFLAGS),$(info $(v))) + $(info ---OF_CORE_FRAMEWORKS_CFLAGS---) + $(foreach v, $(OF_CORE_FRAMEWORKS_CFLAGS),$(info $(v))) - $(info ---OF_CORE_SOURCE_FILES---) - $(foreach v, $(OF_CORE_SOURCE_FILES),$(info $(v))) + $(info ---OF_CORE_SOURCE_FILES---) + $(foreach v, $(OF_CORE_SOURCE_FILES),$(info $(v))) - $(info ---OF_CORE_HEADER_FILES---) - $(foreach v, $(OF_CORE_HEADER_FILES),$(info $(v))) + $(info ---OF_CORE_HEADER_FILES---) + $(foreach v, $(OF_CORE_HEADER_FILES),$(info $(v))) - $(info ---PLATFORM_CORE_EXCLUSIONS---) - $(foreach v, $(PLATFORM_CORE_EXCLUSIONS),$(info $(v))) + $(info ---PLATFORM_CORE_EXCLUSIONS---) + $(foreach v, $(PLATFORM_CORE_EXCLUSIONS),$(info $(v))) endif From abf1066f4d05235ecdd7a2f9c04d9b546f5a8af3 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 01:09:13 +1100 Subject: [PATCH 24/56] Actions rename Linux-64 to linux --- .github/workflows/of.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index cc57d6dc88b..6d4178491f6 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -276,7 +276,7 @@ jobs: # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - build-linux-64: + build-linux: runs-on: ubuntu-24.04 strategy: matrix: From 62074aab53d1ff2212abf4c349446c93e70e5fbe Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 01:26:01 +1100 Subject: [PATCH 25/56] Makefiles spaces to tabs --- .../project/makefileCommon/config.project.mk | 112 +++++++++--------- .../project/makefileCommon/config.shared.mk | 2 +- scripts/ci/linux/64/build.sh | 3 + 3 files changed, 60 insertions(+), 57 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk index 094ad477364..d08797d8988 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk @@ -113,18 +113,18 @@ OF_CORE_LIBRARY_LDFLAGS += $(addprefix -L,$(PLATFORM_LIBRARY_SEARCH_PATHS)) # DEBUG INFO ################################################################################ ifdef MAKEFILE_DEBUG - $(info =============================configure.core.flags.make========================) - $(info ---OF_CORE_LIBS_LDFLAGS---) - $(foreach v, $(OF_CORE_LIBS_LDFLAGS),$(info $(v))) + $(info =============================configure.core.flags.make========================) + $(info ---OF_CORE_LIBS_LDFLAGS---) + $(foreach v, $(OF_CORE_LIBS_LDFLAGS),$(info $(v))) - $(info ---OF_CORE_LIBS---) - $(foreach v, $(OF_CORE_LIBS),$(info $(v))) + $(info ---OF_CORE_LIBS---) + $(foreach v, $(OF_CORE_LIBS),$(info $(v))) endif ################################# ADDONS ###################################### ifdef MAKEFILE_DEBUG - $(info ===================ADDONS================) + $(info ===================ADDONS================) endif # check to make sure OF_ROOT is defined @@ -215,9 +215,9 @@ ifdef B_PROCESS_ADDONS PROJECT_ADDONS = $(filter-out $(INVALID_PROJECT_ADDONS),$(REQUESTED_PROJECT_ADDONS)) ifdef MAKEFILE_DEBUG - $(info ---PROJECT_ADDONS---) - $(foreach v, $(PROJECT_ADDONS),$(info $(v))) - $(info --------------------) + $(info ---PROJECT_ADDONS---) + $(foreach v, $(PROJECT_ADDONS),$(info $(v))) + $(info --------------------) endif ############################################################################ @@ -309,11 +309,11 @@ endif OF_PROJECT_SOURCE_PATHS = $(filter-out $(OF_PROJECT_EXCLUSIONS),$(ALL_OF_PROJECT_SOURCE_PATHS)) ifdef MAKEFILE_DEBUG - $(info ---OF_PROJECT_SOURCE_PATHS---) - $(foreach v, $(OF_PROJECT_SOURCE_PATHS),$(info $(v))) + $(info ---OF_PROJECT_SOURCE_PATHS---) + $(foreach v, $(OF_PROJECT_SOURCE_PATHS),$(info $(v))) - $(info ---OF_PROJECT_EXCLUSIONS---) - $(foreach v, $(OF_PROJECT_EXCLUSIONS),$(info $(v))) + $(info ---OF_PROJECT_EXCLUSIONS---) + $(foreach v, $(OF_PROJECT_EXCLUSIONS),$(info $(v))) endif # find all sources inside the project's source directory (recursively) @@ -328,8 +328,8 @@ OF_PROJECT_INCLUDES_CFLAGS := $(addprefix -I,$(filter-out $(PROJECT_INCLUDE_EXCL OF_ADDON_INCLUDES_CFLAGS += $(addprefix -I,$(filter-out $(PROJECT_INCLUDE_EXCLUSIONS),$(PROJECT_ADDONS_INCLUDES))) ifdef MAKEFILE_DEBUG - $(info ---OF_PROJECT_INCLUDES_CFLAGS---) - $(foreach v, $(OF_PROJECT_INCLUDES_CFLAGS),$(info $(v))) + $(info ---OF_PROJECT_INCLUDES_CFLAGS---) + $(foreach v, $(OF_PROJECT_INCLUDES_CFLAGS),$(info $(v))) endif ################################################################################ @@ -401,7 +401,7 @@ OF_PROJECT_LDFLAGS += $(addprefix -framework ,$(PROJECT_ADDONS_FRAMEWORKS)) ################################################################################ ifdef MAKEFILE_DEBUG - $(info ===================compile.project.make=============================) + $(info ===================compile.project.make=============================) endif ifdef PROJECT_CXX @@ -420,18 +420,18 @@ ifdef PLATFORM_CC CC ?= $(PLATFORM_CC) endif -ifdef ${ccache} +ifdef ${ccache} $(info 💿 Using CCACHE -- config.project.mk ) CXX := ${ccache} $(CXX) CC := ${ccache} $(CXX) -endif +endif ifdef PROJECT_RESOURCE_COMPILER - RESOURCE_COMPILER ?= $(PROJECT_RESOURCE_COMPILER) + RESOURCE_COMPILER ?= $(PROJECT_RESOURCE_COMPILER) endif ifdef PLATFORM_RESOURCE_COMPILER - RESOURCE_COMPILER ?= $(PLATFORM_RESOURCE_COMPILER) + RESOURCE_COMPILER ?= $(PLATFORM_RESOURCE_COMPILER) endif # TODO: what is this for? @@ -498,23 +498,23 @@ ifeq ($(findstring Debug,$(TARGET_NAME)),Debug) OPTIMIZATION_LDFLAGS = $(PROJECT_OPTIMIZATION_LDFLAGS_DEBUG) endif - # Executable Icon - ################# - # if defined, use the project debug icon. - # if no debug icon defined for the project, use the project release icon - # if no icon defined for the project, use the OF default debug icon defined for the platform - # leave ICON empty for default system icon - ifdef PROJECT_DEBUG_ICON - ICON = $(PROJECT_DEBUG_ICON) - else - ifdef PROJECT_RELEASE_ICON - ICON = $(PROJECT_RELEASE_ICON) - else - ifdef PLATFORM_DEBUG_ICON - ICON = $(PLATFORM_DEBUG_ICON) - endif - endif - endif + # Executable Icon + ################# + # if defined, use the project debug icon. + # if no debug icon defined for the project, use the project release icon + # if no icon defined for the project, use the OF default debug icon defined for the platform + # leave ICON empty for default system icon + ifdef PROJECT_DEBUG_ICON + ICON = $(PROJECT_DEBUG_ICON) + else + ifdef PROJECT_RELEASE_ICON + ICON = $(PROJECT_RELEASE_ICON) + else + ifdef PLATFORM_DEBUG_ICON + ICON = $(PLATFORM_DEBUG_ICON) + endif + endif + endif endif ifeq ($(findstring Release,$(TARGET_NAME)),Release) @@ -536,18 +536,18 @@ ifeq ($(findstring Release,$(TARGET_NAME)),Release) OPTIMIZATION_LDFLAGS = $(PROJECT_OPTIMIZATION_LDFLAGS_RELEASE) endif - # Executable Icon - ################# - # if defined, use the project release icon. - # if no icon defined for the project, use the OF default release icon defined for the platform - # leave ICON empty for default system icon - ifdef PROJECT_RELEASE_ICON - ICON = $(PROJECT_RELEASE_ICON) - else - ifdef PLATFORM_RELEASE_ICON - ICON = $(PLATFORM_RELEASE_ICON) - endif - endif + # Executable Icon + ################# + # if defined, use the project release icon. + # if no icon defined for the project, use the OF default release icon defined for the platform + # leave ICON empty for default system icon + ifdef PROJECT_RELEASE_ICON + ICON = $(PROJECT_RELEASE_ICON) + else + ifdef PLATFORM_RELEASE_ICON + ICON = $(PLATFORM_RELEASE_ICON) + endif + endif endif @@ -563,12 +563,12 @@ endif # define the subdirectory for our target name ifdef MAKEFILE_DEBUG - $(info ---OF_PROJECT_SOURCE_FILES---) - $(foreach v, $(OF_PROJECT_SOURCE_FILES),$(info $(v))) + $(info ---OF_PROJECT_SOURCE_FILES---) + $(foreach v, $(OF_PROJECT_SOURCE_FILES),$(info $(v))) endif ifdef MAKEFILE_DEBUG - $(info ---OF_PROJECT_DEPENDENCY_FILES---) - $(foreach v, $(OF_PROJECT_DEPENDENCY_FILES),$(info $(v))) + $(info ---OF_PROJECT_DEPENDENCY_FILES---) + $(foreach v, $(OF_PROJECT_DEPENDENCY_FILES),$(info $(v))) endif @@ -581,7 +581,7 @@ OF_PROJECT_DEPS = $(patsubst %.o,%.d,$(OF_PROJECT_OBJS)) # Compiled resources (icon, ...) - msys2 only? OF_PROJECT_RESOURCES = ifeq ($(findstring msys2,$(PLATFORM_LIB_SUBPATH)),msys2) - OF_PROJECT_RESOURCES += $(addprefix $(OF_PROJECT_OBJ_OUTPUT_PATH), $(notdir $(patsubst %.ico, %.res, $(ICON)))) + OF_PROJECT_RESOURCES += $(addprefix $(OF_PROJECT_OBJ_OUTPUT_PATH), $(notdir $(patsubst %.ico, %.res, $(ICON)))) endif OF_PROJECT_DEPENDENCY_FILES = $(OF_PROJECT_DEPS) $(OF_PROJECT_ADDONS_DEPS) @@ -590,6 +590,6 @@ OF_PROJECT_DEPENDENCY_FILES = $(OF_PROJECT_DEPS) $(OF_PROJECT_ADDONS_DEPS) ifdef MAKEFILE_DEBUG - $(info ---OF_PROJECT_DEPENDENCY_FILES---) - $(foreach v, $(OF_PROJECT_DEPENDENCY_FILES),$(info $(v))) + $(info ---OF_PROJECT_DEPENDENCY_FILES---) + $(foreach v, $(OF_PROJECT_DEPENDENCY_FILES),$(info $(v))) endif diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 81a0873fa11..f0efd677dd9 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -224,7 +224,7 @@ ifdef MAKEFILE_DEBUG endif ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH)),) -$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH) / $(PLATFORM_LIB_SUBPATH) probably you downloaded the wrong package?) +$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH) probably you downloaded the wrong package?) endif # generate a list of valid core platform variants from the files in the platform makefiles directory diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index b93a725b6e7..033ec777346 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -27,11 +27,13 @@ else cd libs/openFrameworksCompiled/project make -j2 DEBUG=1 MAKEFILE_DEBUG=1 echo "##[endgroup]" + echo -e "\033[1;32m**** Building OF core: COMPLETE ****\033[0m" echo "##[group]**** Building emptyExample ****" cd $ROOT/scripts/templates/linux64 make -j2 DEBUG=1 MAKEFILE_DEBUG=1 echo "##[endgroup]" + echo -e "\033[1;32m**** Building emptyExample: COMPLETE ****\033[0m" echo "##[group]**** Building allAddonsExample ****" cd $ROOT @@ -40,4 +42,5 @@ else cd examples/templates/allAddonsExample/ make -j2 DEBUG=1 MAKEFILE_DEBUG=1 echo "##[endgroup]" + echo -e "\033[1;32m**** Building allAddonsExample: COMPLETE ****\033[0m" fi From 5ceab3efa46e68cdfef8b9ebf6a4d6f31f8ac5da Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 01:38:02 +1100 Subject: [PATCH 26/56] Makefile debug --- scripts/ci/linux/64/build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index 033ec777346..70569082e38 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -25,22 +25,22 @@ else echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk sed -i "s/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = .*/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g0/" libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk cd libs/openFrameworksCompiled/project - make -j2 DEBUG=1 MAKEFILE_DEBUG=1 + DEBUG=1 MAKEFILE_DEBUG=1 make -j2 Debug echo "##[endgroup]" - echo -e "\033[1;32m**** Building OF core: COMPLETE ****\033[0m" + echo -e "\033[33m**** Building OF core: COMPLETE ****\033[0m" echo "##[group]**** Building emptyExample ****" cd $ROOT/scripts/templates/linux64 - make -j2 DEBUG=1 MAKEFILE_DEBUG=1 + DEBUG=1 MAKEFILE_DEBUG=1 make -j2 Debug echo "##[endgroup]" - echo -e "\033[1;32m**** Building emptyExample: COMPLETE ****\033[0m" + echo -e "\033[33m**** Building emptyExample: COMPLETE ****\033[0m" echo "##[group]**** Building allAddonsExample ****" cd $ROOT cp scripts/templates/linux64/Makefile examples/templates/allAddonsExample/ cp scripts/templates/linux64/config.make examples/templates/allAddonsExample/ cd examples/templates/allAddonsExample/ - make -j2 DEBUG=1 MAKEFILE_DEBUG=1 + DEBUG=1 MAKEFILE_DEBUG=1 make -j2 Debug echo "##[endgroup]" - echo -e "\033[1;32m**** Building allAddonsExample: COMPLETE ****\033[0m" + echo -e "\033[33m**** Building allAddonsExample: COMPLETE ****\033[0m" fi From daac46a233d64abff337562a21e7d3e1deb1bf60 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 02:09:46 +1100 Subject: [PATCH 27/56] Reset file --- .../project/makefileCommon/config.shared.mk | 93 +++++++++---------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index f0efd677dd9..9073d758f6f 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -31,7 +31,7 @@ PLATFORM_OS ?= $(shell uname -s) HOST_OS=$(shell uname -s) ifdef MAKEFILE_DEBUG - $(info HOST_OS=${HOST_OS}) + $(info HOST_OS=${HOST_OS}) endif ifneq (,$(findstring MSYS_NT,$(HOST_OS))) @@ -70,13 +70,13 @@ endif ifdef MAKEFILE_DEBUG - $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) - $(info PLATFORM_OS=$(PLATFORM_OS)) - $(info HOST_ARCH=$(HOST_ARCH)) - $(info HOST_OS=$(HOST_OS)) - $(info CROSS_COMPILING=$(CROSS_COMPILING)) - $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) - $(info IS_RASPBIAN=$(IS_RASPBIAN)) + $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) + $(info PLATFORM_OS=$(PLATFORM_OS)) + $(info HOST_ARCH=$(HOST_ARCH)) + $(info HOST_OS=$(HOST_OS)) + $(info CROSS_COMPILING=$(CROSS_COMPILING)) + $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) + $(info IS_RASPBIAN=$(IS_RASPBIAN)) endif # if not defined, construct the default PLATFORM_LIB_SUBPATH @@ -142,11 +142,11 @@ endif # if desired, print the variables ifdef MAKEFILE_DEBUG - $(info =================== config.mk platform detection ================) - $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) - $(info PLATFORM_OS=$(PLATFORM_OS)) - $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) - $(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) + $(info =================== config.mk platform detection ================) + $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) + $(info PLATFORM_OS=$(PLATFORM_OS)) + $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) + $(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) endif @@ -209,32 +209,31 @@ endif ################################################################################ # print debug information if needed ifdef MAKEFILE_DEBUG - $(info =================== config.mk paths =============================) - $(info OF_ADDONS_PATH=$(OF_ADDONS_PATH)) - $(info OF_EXAMPLES_PATH=$(OF_EXAMPLES_PATH)) - $(info OF_APPS_PATH=$(OF_APPS_PATH)) - $(info OF_LIBS_PATH=$(OF_LIBS_PATH)) - $(info OF_LIBS_OPENFRAMEWORKS_PATH=$(OF_LIBS_OPENFRAMEWORKS_PATH)) - $(info OF_LIBS_OF_COMPILED_PATH=$(OF_LIBS_OF_COMPILED_PATH)) - $(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) - $(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH)) - $(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES)) - $(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH)) - $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) + $(info =================== config.mk paths =============================) + $(info OF_ADDONS_PATH=$(OF_ADDONS_PATH)) + $(info OF_EXAMPLES_PATH=$(OF_EXAMPLES_PATH)) + $(info OF_APPS_PATH=$(OF_APPS_PATH)) + $(info OF_LIBS_PATH=$(OF_LIBS_PATH)) + $(info OF_LIBS_OPENFRAMEWORKS_PATH=$(OF_LIBS_OPENFRAMEWORKS_PATH)) + $(info OF_LIBS_OF_COMPILED_PATH=$(OF_LIBS_OF_COMPILED_PATH)) + $(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) + $(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH)) + $(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES)) + $(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH)) endif + +$(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) +$(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) + ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH)),) -$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH) probably you downloaded the wrong package?) +$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH) probably you downloaded the wrong package?) endif # generate a list of valid core platform variants from the files in the platform makefiles directory AVAILABLE_PLATFORM_VARIANTS=$(shell $(FIND) $(OF_PLATFORM_MAKEFILES)/config.*.mk -maxdepth 1 -type f | sed -E 's/.*\.([^\.]*)\.mk/\1/' ) AVAILABLE_PLATFORM_VARIANTS+=default -ifdef MAKEFILE_DEBUG - $(info AVAILABLE_PLATFORM_VARIANTS=$(AVAILABLE_PLATFORM_VARIANTS)) -endif - # check to see if we have a file for the desired variant. if not, quit and list the variants. ifeq ($(findstring $(PLATFORM_VARIANT),$(AVAILABLE_PLATFORM_VARIANTS)),) $(error Platform Variant "$(PLATFORM_VARIANT)" is not valid. Valid variants include [$(strip $(AVAILABLE_PLATFORM_VARIANTS))]) @@ -312,14 +311,14 @@ CORE_PKG_CONFIG_LIBRARIES += $(PROJECT_PKG_CONFIG_LIBRARIES) ifneq ($(strip $(CORE_PKG_CONFIG_LIBRARIES)),) ifneq ($(strip $(PKG_CONFIG_LIBDIR)),) ifdef MAKEFILE_DEBUG - $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) - $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) + $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) + $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) endif FAILED_PKG=$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0) else ifdef MAKEFILE_DEBUG - $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) - $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) + $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) + $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) endif FAILED_PKG=$(shell for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0) endif @@ -371,22 +370,22 @@ OF_CORE_HEADER_FILES=$(filter-out $(CORE_EXCLUSIONS),$(shell $(FIND) $(OF_CORE_S # DEBUG INFO ################################################################################ ifdef MAKEFILE_DEBUG - $(info ========================= config.mk flags ========================) - $(info ---OF_CORE_DEFINES_CFLAGS---) - $(foreach v, $(OF_CORE_DEFINES_CFLAGS),$(info $(v))) + $(info ========================= config.mk flags ========================) + $(info ---OF_CORE_DEFINES_CFLAGS---) + $(foreach v, $(OF_CORE_DEFINES_CFLAGS),$(info $(v))) - $(info ---OF_CORE_INCLUDES_CFLAGS---) - $(foreach v, $(OF_CORE_INCLUDES_CFLAGS),$(info $(v))) + $(info ---OF_CORE_INCLUDES_CFLAGS---) + $(foreach v, $(OF_CORE_INCLUDES_CFLAGS),$(info $(v))) - $(info ---OF_CORE_FRAMEWORKS_CFLAGS---) - $(foreach v, $(OF_CORE_FRAMEWORKS_CFLAGS),$(info $(v))) + $(info ---OF_CORE_FRAMEWORKS_CFLAGS---) + $(foreach v, $(OF_CORE_FRAMEWORKS_CFLAGS),$(info $(v))) - $(info ---OF_CORE_SOURCE_FILES---) - $(foreach v, $(OF_CORE_SOURCE_FILES),$(info $(v))) + $(info ---OF_CORE_SOURCE_FILES---) + $(foreach v, $(OF_CORE_SOURCE_FILES),$(info $(v))) - $(info ---OF_CORE_HEADER_FILES---) - $(foreach v, $(OF_CORE_HEADER_FILES),$(info $(v))) + $(info ---OF_CORE_HEADER_FILES---) + $(foreach v, $(OF_CORE_HEADER_FILES),$(info $(v))) - $(info ---PLATFORM_CORE_EXCLUSIONS---) - $(foreach v, $(PLATFORM_CORE_EXCLUSIONS),$(info $(v))) + $(info ---PLATFORM_CORE_EXCLUSIONS---) + $(foreach v, $(PLATFORM_CORE_EXCLUSIONS),$(info $(v))) endif From 1b66dce5fb75f3f1ace681544d0090850b23c3a2 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 02:22:41 +1100 Subject: [PATCH 28/56] Spaces to Tabs --- .../makefileCommon/config.linux.common.mk | 6 +- .../project/makefileCommon/config.shared.mk | 82 +++++++++---------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk index 2c929709e52..11fc7d5b244 100755 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk @@ -44,13 +44,13 @@ ifndef GST_VERSION ifeq ($(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?),0) GST_VERSION = 1.0 ifdef MAKEFILE_DEBUG - $(info GSTVERSION=$(GST_VERSION)) + $(info GSTVERSION=$(GST_VERSION)) endif else GST_VERSION = 0.10 ifdef MAKEFILE_DEBUG - $(info GSTVERSION=$(GST_VERSION)) - $(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?)) + $(info GSTVERSION=$(GST_VERSION)) + $(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?)) endif endif else diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 9073d758f6f..161ab10a3f5 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -31,7 +31,7 @@ PLATFORM_OS ?= $(shell uname -s) HOST_OS=$(shell uname -s) ifdef MAKEFILE_DEBUG - $(info HOST_OS=${HOST_OS}) + $(info HOST_OS=${HOST_OS}) endif ifneq (,$(findstring MSYS_NT,$(HOST_OS))) @@ -70,13 +70,13 @@ endif ifdef MAKEFILE_DEBUG - $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) - $(info PLATFORM_OS=$(PLATFORM_OS)) - $(info HOST_ARCH=$(HOST_ARCH)) - $(info HOST_OS=$(HOST_OS)) - $(info CROSS_COMPILING=$(CROSS_COMPILING)) - $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) - $(info IS_RASPBIAN=$(IS_RASPBIAN)) + $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) + $(info PLATFORM_OS=$(PLATFORM_OS)) + $(info HOST_ARCH=$(HOST_ARCH)) + $(info HOST_OS=$(HOST_OS)) + $(info CROSS_COMPILING=$(CROSS_COMPILING)) + $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) + $(info IS_RASPBIAN=$(IS_RASPBIAN)) endif # if not defined, construct the default PLATFORM_LIB_SUBPATH @@ -142,11 +142,11 @@ endif # if desired, print the variables ifdef MAKEFILE_DEBUG - $(info =================== config.mk platform detection ================) - $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) - $(info PLATFORM_OS=$(PLATFORM_OS)) - $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) - $(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) + $(info =================== config.mk platform detection ================) + $(info PLATFORM_ARCH=$(PLATFORM_ARCH)) + $(info PLATFORM_OS=$(PLATFORM_OS)) + $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) + $(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) endif @@ -209,17 +209,17 @@ endif ################################################################################ # print debug information if needed ifdef MAKEFILE_DEBUG - $(info =================== config.mk paths =============================) - $(info OF_ADDONS_PATH=$(OF_ADDONS_PATH)) - $(info OF_EXAMPLES_PATH=$(OF_EXAMPLES_PATH)) - $(info OF_APPS_PATH=$(OF_APPS_PATH)) - $(info OF_LIBS_PATH=$(OF_LIBS_PATH)) - $(info OF_LIBS_OPENFRAMEWORKS_PATH=$(OF_LIBS_OPENFRAMEWORKS_PATH)) - $(info OF_LIBS_OF_COMPILED_PATH=$(OF_LIBS_OF_COMPILED_PATH)) - $(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) - $(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH)) - $(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES)) - $(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH)) + $(info =================== config.mk paths =============================) + $(info OF_ADDONS_PATH=$(OF_ADDONS_PATH)) + $(info OF_EXAMPLES_PATH=$(OF_EXAMPLES_PATH)) + $(info OF_APPS_PATH=$(OF_APPS_PATH)) + $(info OF_LIBS_PATH=$(OF_LIBS_PATH)) + $(info OF_LIBS_OPENFRAMEWORKS_PATH=$(OF_LIBS_OPENFRAMEWORKS_PATH)) + $(info OF_LIBS_OF_COMPILED_PATH=$(OF_LIBS_OF_COMPILED_PATH)) + $(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) + $(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH)) + $(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES)) + $(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH)) endif @@ -311,14 +311,14 @@ CORE_PKG_CONFIG_LIBRARIES += $(PROJECT_PKG_CONFIG_LIBRARIES) ifneq ($(strip $(CORE_PKG_CONFIG_LIBRARIES)),) ifneq ($(strip $(PKG_CONFIG_LIBDIR)),) ifdef MAKEFILE_DEBUG - $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) - $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) + $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) + $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) endif FAILED_PKG=$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0) else ifdef MAKEFILE_DEBUG - $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) - $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) + $(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES)) + $(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR)) endif FAILED_PKG=$(shell for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0) endif @@ -370,22 +370,22 @@ OF_CORE_HEADER_FILES=$(filter-out $(CORE_EXCLUSIONS),$(shell $(FIND) $(OF_CORE_S # DEBUG INFO ################################################################################ ifdef MAKEFILE_DEBUG - $(info ========================= config.mk flags ========================) - $(info ---OF_CORE_DEFINES_CFLAGS---) - $(foreach v, $(OF_CORE_DEFINES_CFLAGS),$(info $(v))) + $(info ========================= config.mk flags ========================) + $(info ---OF_CORE_DEFINES_CFLAGS---) + $(foreach v, $(OF_CORE_DEFINES_CFLAGS),$(info $(v))) - $(info ---OF_CORE_INCLUDES_CFLAGS---) - $(foreach v, $(OF_CORE_INCLUDES_CFLAGS),$(info $(v))) + $(info ---OF_CORE_INCLUDES_CFLAGS---) + $(foreach v, $(OF_CORE_INCLUDES_CFLAGS),$(info $(v))) - $(info ---OF_CORE_FRAMEWORKS_CFLAGS---) - $(foreach v, $(OF_CORE_FRAMEWORKS_CFLAGS),$(info $(v))) + $(info ---OF_CORE_FRAMEWORKS_CFLAGS---) + $(foreach v, $(OF_CORE_FRAMEWORKS_CFLAGS),$(info $(v))) - $(info ---OF_CORE_SOURCE_FILES---) - $(foreach v, $(OF_CORE_SOURCE_FILES),$(info $(v))) + $(info ---OF_CORE_SOURCE_FILES---) + $(foreach v, $(OF_CORE_SOURCE_FILES),$(info $(v))) - $(info ---OF_CORE_HEADER_FILES---) - $(foreach v, $(OF_CORE_HEADER_FILES),$(info $(v))) + $(info ---OF_CORE_HEADER_FILES---) + $(foreach v, $(OF_CORE_HEADER_FILES),$(info $(v))) - $(info ---PLATFORM_CORE_EXCLUSIONS---) - $(foreach v, $(PLATFORM_CORE_EXCLUSIONS),$(info $(v))) + $(info ---PLATFORM_CORE_EXCLUSIONS---) + $(foreach v, $(PLATFORM_CORE_EXCLUSIONS),$(info $(v))) endif From 129da07ed7244c9fe7933b192f721b0e6e736f0b Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 02:25:30 +1100 Subject: [PATCH 29/56] no debug flags --- scripts/ci/linux/64/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index 70569082e38..c9f8a65064d 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -25,13 +25,13 @@ else echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk sed -i "s/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = .*/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g0/" libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk cd libs/openFrameworksCompiled/project - DEBUG=1 MAKEFILE_DEBUG=1 make -j2 Debug + make -j2 Debug echo "##[endgroup]" echo -e "\033[33m**** Building OF core: COMPLETE ****\033[0m" echo "##[group]**** Building emptyExample ****" cd $ROOT/scripts/templates/linux64 - DEBUG=1 MAKEFILE_DEBUG=1 make -j2 Debug + make -j2 Debug echo "##[endgroup]" echo -e "\033[33m**** Building emptyExample: COMPLETE ****\033[0m" @@ -40,7 +40,7 @@ else cp scripts/templates/linux64/Makefile examples/templates/allAddonsExample/ cp scripts/templates/linux64/config.make examples/templates/allAddonsExample/ cd examples/templates/allAddonsExample/ - DEBUG=1 MAKEFILE_DEBUG=1 make -j2 Debug + make -j2 Debug echo "##[endgroup]" echo -e "\033[33m**** Building allAddonsExample: COMPLETE ****\033[0m" fi From afdbb8e006b29d54651493ef91373c40c6ed1e4c Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 02:49:08 +1100 Subject: [PATCH 30/56] ci build 64 --- scripts/ci/linux/64/build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index c9f8a65064d..f602c90549a 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -22,8 +22,7 @@ else echo "##[group]**** Building OF core ****" # this carries over to subsequent compilations of examples - echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk - sed -i "s/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = .*/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g0/" libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk + # echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk cd libs/openFrameworksCompiled/project make -j2 Debug echo "##[endgroup]" @@ -42,5 +41,5 @@ else cd examples/templates/allAddonsExample/ make -j2 Debug echo "##[endgroup]" - echo -e "\033[33m**** Building allAddonsExample: COMPLETE ****\033[0m" + echo -e "\033[33m**** Building allAddonsExample: COMPLETE ****\033[0m" fi From 767435f8b1b8ff94f435e8a0fa7aee9d0eb0b2e7 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 02:52:48 +1100 Subject: [PATCH 31/56] Line spaces to tabs --- .../project/makefileCommon/config.linux.common.mk | 6 +++--- scripts/ci/linux/64/build.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk index 11fc7d5b244..cc40f6c2a81 100755 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk @@ -44,13 +44,13 @@ ifndef GST_VERSION ifeq ($(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?),0) GST_VERSION = 1.0 ifdef MAKEFILE_DEBUG - $(info GSTVERSION=$(GST_VERSION)) + $(info GSTVERSION=$(GST_VERSION)) endif else GST_VERSION = 0.10 ifdef MAKEFILE_DEBUG - $(info GSTVERSION=$(GST_VERSION)) - $(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?)) + $(info GSTVERSION=$(GST_VERSION)) + $(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?)) endif endif else diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index f602c90549a..4b613ebc4fd 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -ev +set -e ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"} # Add compiler flag to reduce memory usage to enable builds to complete # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746#c7 From 48a09d6f9750d2ea6dfea52ffde9d40821d2408d Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 03:34:16 +1100 Subject: [PATCH 32/56] Fix Linux string issue --- .../project/makefileCommon/config.shared.mk | 10 +++++----- scripts/ci/linux/64/build.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 161ab10a3f5..fa5e0394b4d 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -220,12 +220,10 @@ ifdef MAKEFILE_DEBUG $(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH)) $(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES)) $(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH)) + $(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) + $(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) endif - -$(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) -$(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) - ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH)),) $(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH) probably you downloaded the wrong package?) endif @@ -240,7 +238,9 @@ ifeq ($(findstring $(PLATFORM_VARIANT),$(AVAILABLE_PLATFORM_VARIANTS)),) endif # include the platform specific user and platform configuration files -include $(OF_PLATFORM_MAKEFILES)/config.$(PLATFORM_LIB_SUBPATH).$(PLATFORM_VARIANT).mk +PLATFORM_LIB_SUBPATH_FIXED := $(subst /,,$(PLATFORM_LIB_SUBPATH)) +include $(OF_PLATFORM_MAKEFILES)/config.$(PLATFORM_LIB_SUBPATH_FIXED).$(PLATFORM_VARIANT).mk + ifdef ABI_PATH ABI_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)/$(strip $(ABI_PATH)) diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index 4b613ebc4fd..8de89846ac3 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -24,7 +24,7 @@ else # this carries over to subsequent compilations of examples # echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk cd libs/openFrameworksCompiled/project - make -j2 Debug + MAKEFILE_DEBUG=1 make -j2 Debug echo "##[endgroup]" echo -e "\033[33m**** Building OF core: COMPLETE ****\033[0m" From 4c005feb3fb7854ab71314d433ba78a065b96b0c Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 03:39:00 +1100 Subject: [PATCH 33/56] debug off --- scripts/ci/linux/64/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/linux/64/build.sh b/scripts/ci/linux/64/build.sh index 8de89846ac3..4b613ebc4fd 100755 --- a/scripts/ci/linux/64/build.sh +++ b/scripts/ci/linux/64/build.sh @@ -24,7 +24,7 @@ else # this carries over to subsequent compilations of examples # echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk cd libs/openFrameworksCompiled/project - MAKEFILE_DEBUG=1 make -j2 Debug + make -j2 Debug echo "##[endgroup]" echo -e "\033[33m**** Building OF core: COMPLETE ****\033[0m" From 9eeeff3f012dd84066bb8dcff70dde6a275d5056 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 10:57:38 +1100 Subject: [PATCH 34/56] Update addon_config --- addons/ofxAssimp/addon_config.mk | 8 ++++---- addons/ofxAssimpModelLoader/addon_config.mk | 8 ++++---- addons/ofxKinect/addon_config.mk | 8 ++++---- .../ofxKinect/libs/libfreenect/platform/windows/unistd.h | 3 +++ addons/ofxOpenCv/addon_config.mk | 8 ++++---- addons/ofxOsc/addon_config.mk | 8 ++++---- 6 files changed, 23 insertions(+), 20 deletions(-) diff --git a/addons/ofxAssimp/addon_config.mk b/addons/ofxAssimp/addon_config.mk index 02b0932ab0b..cadc8dba1a0 100644 --- a/addons/ofxAssimp/addon_config.mk +++ b/addons/ofxAssimp/addon_config.mk @@ -62,17 +62,17 @@ common: # a specific platform # ADDON_LIBS_EXCLUDE = -linuxarmv6l: +linux/armv6l: ADDON_PKG_CONFIG_LIBRARIES = assimp ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/% -linuxarmv7l: +linux/armv7l: ADDON_PKG_CONFIG_LIBRARIES = assimp ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/% -linuxaarch64: +linux/aarch64: ADDON_PKG_CONFIG_LIBRARIES = assimp ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/% @@ -82,7 +82,7 @@ linux: ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/% -linux64: +linux/64: ADDON_PKG_CONFIG_LIBRARIES = assimp ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/% diff --git a/addons/ofxAssimpModelLoader/addon_config.mk b/addons/ofxAssimpModelLoader/addon_config.mk index a32080b2d1a..5b40093ce6a 100644 --- a/addons/ofxAssimpModelLoader/addon_config.mk +++ b/addons/ofxAssimpModelLoader/addon_config.mk @@ -60,17 +60,17 @@ common: # a specific platform # ADDON_LIBS_EXCLUDE = -linuxarmv6l: +linux/armv6l: ADDON_PKG_CONFIG_LIBRARIES = assimp ADDON_LIBS_EXCLUDE = libs/assimp ADDON_INCLUDES_EXCLUDE = libs/assimp/% -linuxarmv7l: +linux/armv7l: ADDON_PKG_CONFIG_LIBRARIES = assimp ADDON_LIBS_EXCLUDE = libs/assimp ADDON_INCLUDES_EXCLUDE = libs/assimp/% -linuxaarch64: +linux/aarch64: ADDON_PKG_CONFIG_LIBRARIES = assimp ADDON_LIBS_EXCLUDE = libs/assimp ADDON_INCLUDES_EXCLUDE = libs/assimp/% @@ -80,7 +80,7 @@ linux: ADDON_LIBS_EXCLUDE = libs/assimp ADDON_INCLUDES_EXCLUDE = libs/assimp/% -linux64: +linux/64: ADDON_PKG_CONFIG_LIBRARIES = assimp ADDON_LIBS_EXCLUDE = libs/assimp ADDON_INCLUDES_EXCLUDE = libs/assimp/% diff --git a/addons/ofxKinect/addon_config.mk b/addons/ofxKinect/addon_config.mk index a5cad5aff04..2a42c048329 100644 --- a/addons/ofxKinect/addon_config.mk +++ b/addons/ofxKinect/addon_config.mk @@ -68,7 +68,7 @@ common: # a specific platform # ADDON_INCLUDES_EXCLUDE = -linux64: +linux/64: # linux only, any library that should be included in the project using # pkg-config ADDON_PKG_CONFIG_LIBRARIES = libusb-1.0 @@ -127,7 +127,7 @@ vs: # when parsing the file system looking for include paths exclude this for all or # a specific platform -linuxarmv6l: +linux/armv6l: # linux only, any library that should be included in the project using # pkg-config ADDON_PKG_CONFIG_LIBRARIES = libusb-1.0 @@ -143,7 +143,7 @@ linuxarmv6l: ADDON_INCLUDES_EXCLUDE += libs/libusb-1.0/% -linuxarmv7l: +linux/armv7l: # linux only, any library that should be included in the project using # pkg-config ADDON_PKG_CONFIG_LIBRARIES = libusb-1.0 @@ -158,7 +158,7 @@ linuxarmv7l: ADDON_INCLUDES_EXCLUDE = libs/libfreenect/platform/% ADDON_INCLUDES_EXCLUDE += libs/libusb-1.0/% -linuxaarch64: +linuxa/arch64: # linux only, any library that should be included in the project using # pkg-config ADDON_PKG_CONFIG_LIBRARIES = libusb-1.0 diff --git a/addons/ofxKinect/libs/libfreenect/platform/windows/unistd.h b/addons/ofxKinect/libs/libfreenect/platform/windows/unistd.h index 86d41addc42..a47e2637a96 100644 --- a/addons/ofxKinect/libs/libfreenect/platform/windows/unistd.h +++ b/addons/ofxKinect/libs/libfreenect/platform/windows/unistd.h @@ -26,6 +26,8 @@ #pragma once +#ifdef _WIN32 + #include #include @@ -53,3 +55,4 @@ static void usleep(__int64 usec) WaitForSingleObject(timer, INFINITE); CloseHandle(timer); } +#endif diff --git a/addons/ofxOpenCv/addon_config.mk b/addons/ofxOpenCv/addon_config.mk index ee8e3e386a8..873e760914a 100644 --- a/addons/ofxOpenCv/addon_config.mk +++ b/addons/ofxOpenCv/addon_config.mk @@ -60,7 +60,7 @@ common: # a specific platform # ADDON_LIBS_EXCLUDE = -linux64: +linux/64: ADDON_PKG_CONFIG_LIBRARIES = opencv4 harfbuzz ADDON_LIBS_EXCLUDE = libs/opencv/% ADDON_INCLUDES_EXCLUDE = libs/opencv @@ -72,19 +72,19 @@ linux: ADDON_INCLUDES_EXCLUDE = libs/opencv ADDON_INCLUDES_EXCLUDE += libs/opencv/% -linuxarmv6l: +linux/armv6l: ADDON_PKG_CONFIG_LIBRARIES = opencv4 ADDON_LIBS_EXCLUDE = libs/opencv/% ADDON_INCLUDES_EXCLUDE = libs/opencv ADDON_INCLUDES_EXCLUDE += libs/opencv/% -linuxarmv7l: +linux/armv7l: ADDON_PKG_CONFIG_LIBRARIES = opencv4 ADDON_LIBS_EXCLUDE = libs/opencv/% ADDON_INCLUDES_EXCLUDE = libs/opencv ADDON_INCLUDES_EXCLUDE += libs/opencv/% -linuxaarch64: +linux/aarch64: ADDON_PKG_CONFIG_LIBRARIES = opencv4 ADDON_LIBS_EXCLUDE = libs/opencv/% ADDON_INCLUDES_EXCLUDE = libs/opencv diff --git a/addons/ofxOsc/addon_config.mk b/addons/ofxOsc/addon_config.mk index 71e58597920..a1dfb86fb32 100644 --- a/addons/ofxOsc/addon_config.mk +++ b/addons/ofxOsc/addon_config.mk @@ -68,15 +68,15 @@ common: # a specific platform # ADDON_INCLUDES_EXCLUDE = -linuxarmv6l: +linux/armv6l: ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/% ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32 -linuxarmv7l: +linux/armv7l: ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/% ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32 -linuxaarch64: +linux/aarch64: ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/% ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32 @@ -84,7 +84,7 @@ linux: ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/% ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32 -linux64: +linux/64: ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/% ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32 From f420b33e797753fc0e799cd29bd43f4fb268d907 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 17 Jan 2025 21:16:47 +1100 Subject: [PATCH 35/56] downloader [4.4.0 ~ 4.5.0] - fix close connection for zero urls. shfmt formatted bash --- scripts/dev/downloader.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/dev/downloader.sh b/scripts/dev/downloader.sh index a55ed14b730..311e20aa096 100755 --- a/scripts/dev/downloader.sh +++ b/scripts/dev/downloader.sh @@ -154,7 +154,8 @@ check_remote_vs_local() { finalurl() { local input_url="$1" local trimmed_url=$(echo "$input_url" | sed 's/[[:space:]]*$//') - local resolved_url=$(curl -L -I --retry "${RETRY_MAX:-5}" --max-redirs "${MAX_REDIRECTS:-5}" --retry-connrefused --write-out '%{url_effective}' --silent --output /dev/null "$trimmed_url") + local resolved_url=$(curl -L -I --retry "${RETRY_MAX:-5}" --max-redirs "${MAX_REDIRECTS:-5}" \ + --retry-connrefused --write-out '%{url_effective}' --silent --output /dev/null "$trimmed_url") if [[ -z "$resolved_url" ]]; then echoError "Failed to resolve URL: $trimmed_url" return 1 @@ -172,7 +173,7 @@ downloader() { NO_SSL=0 COMPRESSION=1 VERBOSE=0 - WGET2=0 + WGET2=1 CURL=1 WGET=1 CLOSE_CONNECTION=1 From bb37f1e3ccb4fba0e4a05aa05ff671bfef678b25 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 18 Jan 2025 10:36:13 +1100 Subject: [PATCH 36/56] Linux script updates --- scripts/linux/buildAllExamples.sh | 8 +++++-- scripts/linux/buildAllRPIExamples.sh | 7 +++++- scripts/linux/cleanAllExamples.sh | 6 ++++- scripts/linux/compileOF.sh | 36 +++++++++++++++++----------- scripts/linux/compilePG.sh | 8 ++++--- scripts/linux/removeFMOD.sh | 25 ++++++++++++++++--- scripts/linux/testAllExamples.sh | 9 +++++-- 7 files changed, 73 insertions(+), 26 deletions(-) diff --git a/scripts/linux/buildAllExamples.sh b/scripts/linux/buildAllExamples.sh index 7048eefa767..bc06289b80f 100755 --- a/scripts/linux/buildAllExamples.sh +++ b/scripts/linux/buildAllExamples.sh @@ -2,9 +2,13 @@ export LC_ALL=C -for category in $( find ../../examples/ -maxdepth 1 -type d ) +OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(realpath "$OF_DIR/../..")" +OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")" + +for category in $( find "${OFCORE_EXAMPLES_DIR}/" -maxdepth 1 -type d ) do - if [ "$category" = "../../examples/android" -o "$category" = "../../examples/ios" -o "$category" = "../../examples/" -o "$category" = "../../examples/tvOS" ]; then + if [ "$category" = "${OFCORE_EXAMPLES_DIR}/android" -o "$category" = "${OFCORE_EXAMPLES_DIR}/ios" -o "$category" = "${OFCORE_EXAMPLES_DIR}/" -o "$category" = "${OFCORE_EXAMPLES_DIR}/tvOS" ]; then continue fi diff --git a/scripts/linux/buildAllRPIExamples.sh b/scripts/linux/buildAllRPIExamples.sh index 28a01d695f9..dac71dd1251 100755 --- a/scripts/linux/buildAllRPIExamples.sh +++ b/scripts/linux/buildAllRPIExamples.sh @@ -1,7 +1,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PARENT_DIR="$(dirname "$DIR")" + +OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(realpath "$OF_DIR/../..")" +OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")" + MAKEFILE_PATH=$PARENT_DIR/templates/linuxarmv6l/Makefile -cd ${DIR}/../../examples +cd ${OFCORE_EXAMPLES_DIR} for category in $(ls -1d *) do diff --git a/scripts/linux/cleanAllExamples.sh b/scripts/linux/cleanAllExamples.sh index 11f1ee922f2..87cf395295d 100755 --- a/scripts/linux/cleanAllExamples.sh +++ b/scripts/linux/cleanAllExamples.sh @@ -1,8 +1,12 @@ #!/bin/bash +OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(realpath "$OF_DIR/../..")" +OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")" + for category in $( find ../../examples/ -maxdepth 1 -type d ) do - if [ "$category" = "../../examples/android" -o "$category" = "../../examples/ios" -o "$category" = "../../examples/" ]; then + if [ "$category" = "${OFCORE_EXAMPLES_DIR}/android" -o "$category" = "${OFCORE_EXAMPLES_DIR}/ios" -o "$category" = "${OFCORE_EXAMPLES_DIR}/" ]; then continue fi diff --git a/scripts/linux/compileOF.sh b/scripts/linux/compileOF.sh index 3f37c9974a3..a94be563efa 100755 --- a/scripts/linux/compileOF.sh +++ b/scripts/linux/compileOF.sh @@ -1,12 +1,20 @@ #!/usr/bin/env bash export LC_ALL=C +OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(realpath "$OF_DIR/../..")" ARCH=$(uname -m) -if [ "$ARCH" = "x86_64" ]; then - LIBSPATH=linux64 -else - LIBSPATH=linux +if [ "$ARCH" == "" ]; then + if [ "$ARCH" = "x86_64" ]; then + LIBSPATH=linux/64 + elif [ "$ARCH" = "arm64" ]; then + LIBSPATH=linux/arm64 + elif [ "$ARCH" = "jetson" ]; then + LIBSPATH=linux/jetson + else + LIBSPATH=linux + fi fi pushd `dirname $0` > /dev/null @@ -18,13 +26,13 @@ JOBS=1 while getopts tj: opt ; do case "$opt" in t) # testing, only build Debug - BUILD="test" ;; + BUILD="test" ;; j) # make job count for parallel build - JOBS="$OPTARG" + JOBS="$OPTARG" esac done -cd "${SCRIPTPATH}/../../libs/openFrameworksCompiled/project" +cd "${OFDIR}/libs/openFrameworksCompiled/project" make -j$JOBS Debug exit_code=$? if [ $exit_code != 0 ]; then @@ -34,11 +42,11 @@ if [ $exit_code != 0 ]; then fi if [ "$BUILD" == "install" ]; then - make -j$JOBS Release - exit_code=$? - if [ $exit_code != 0 ]; then - echo "there has been a problem compiling Release OF library" - echo "please report this problem in the forums" - exit $exit_code - fi + make -j$JOBS Release + exit_code=$? + if [ $exit_code != 0 ]; then + echo "there has been a problem compiling Release OF library" + echo "please report this problem in the forums" + exit $exit_code + fi fi diff --git a/scripts/linux/compilePG.sh b/scripts/linux/compilePG.sh index 348f78c4461..0e3e1935aa8 100755 --- a/scripts/linux/compilePG.sh +++ b/scripts/linux/compilePG.sh @@ -2,9 +2,11 @@ export LC_ALL=C -OF_ROOT=$(cd $(dirname $0)/../..; pwd -P) +OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OF_ROOT="$(realpath "$OF_DIR/../..")" +OF_PG_DIR="$(realpath "$OF_DIR/apps/projectGenerator")" -make Release -C ${OF_ROOT}/apps/projectGenerator/commandLine +make Release -C ${OF_PG_DIR}/commandLine ret=$? if [ $ret -ne 0 ]; then echo "There has been a problem compiling the command line projectGenerator." @@ -18,7 +20,7 @@ read -p "Do you want to install the command line project generator? [Y/n] " -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "To copy the command line project generator we need root permission." - sudo cp ${OF_ROOT}/apps/projectGenerator/commandLine/bin/projectGenerator /usr/local/bin/projectGenerator + sudo cp ${OF_PG_DIR}/commandLine/bin/projectGenerator /usr/local/bin/projectGenerator if [ ! $? -eq 0 ]; then echo "Failed to copy the projectGenerator file." exit diff --git a/scripts/linux/removeFMOD.sh b/scripts/linux/removeFMOD.sh index 1cb365fb219..d94f62365d0 100755 --- a/scripts/linux/removeFMOD.sh +++ b/scripts/linux/removeFMOD.sh @@ -1,3 +1,22 @@ -rm -r ../../libs/fmod -rm ../../export/linux/libs/libfmod* -rm ../../export/linux64/libs/libfmod* +#!/bin/bash +OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(realpath "$OF_DIR/../..")" + +if [ -d "${OFDIR}/libs/fmod" ]; then + rm -r "${OFDIR}/libs/fmod" + echo "Deleted ${OFDIR}/libs/fmod" +fi + +if [ -d "${OFDIR}/export/linux/libs" ]; then + if ls ${OFDIR}/export/linux/libs/libfmod* 1> /dev/null 2>&1; then + rm ${OFDIR}/export/linux/libs/libfmod* + echo "Deleted files in ${OFDIR}/export/linux/libs/" + fi +fi + +if [ -d "${OFDIR}/export/linux64/libs" ]; then + if ls ${OFDIR}/export/linux64/libs/libfmod* 1> /dev/null 2>&1; then + rm ${OFDIR}/export/linux64/libs/libfmod* + echo "Deleted files in ${OFDIR}/export/linux64/libs/" + fi +fi diff --git a/scripts/linux/testAllExamples.sh b/scripts/linux/testAllExamples.sh index 0017ee93170..2f91dcc7954 100755 --- a/scripts/linux/testAllExamples.sh +++ b/scripts/linux/testAllExamples.sh @@ -1,7 +1,11 @@ #!/bin/bash export LC_ALL=C -cd ../../examples +OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(realpath "$OF_DIR/../..")" +OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")" + +cd ${OFCORE_EXAMPLES_DIR} for category in $( ls . ) do @@ -16,7 +20,7 @@ do continue fi echo "-----------------------------------------------------------------" - echo "building " + $example + echo "building [" + $example "]" cd $example make Debug ret=$? @@ -30,6 +34,7 @@ do echo error compiling $example exit fi + echo "build success [" + $example "]" cd bin ./$example cd ../../ From c6e8e9dea8316dd470717cec2f9039228a1012f0 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 18 Jan 2025 17:47:08 +1100 Subject: [PATCH 37/56] osx / ios remove defined .a --- addons/ofxAssimp/addon_config.mk | 1 - addons/ofxAssimpModelLoader/addon_config.mk | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/ofxAssimp/addon_config.mk b/addons/ofxAssimp/addon_config.mk index cadc8dba1a0..84126722d24 100644 --- a/addons/ofxAssimp/addon_config.mk +++ b/addons/ofxAssimp/addon_config.mk @@ -101,7 +101,6 @@ android/x86: ADDON_LIBS= ADDON_LIBS+=../ofxAssimpModelLoader/libs/assimp/lib/android/x86/libassimp.a ADDON_LIBS+=../ofxAssimpModelLoader/libs/assimp/lib/android/x86/libIrrXML.a - osx: ADDON_LIBS= ADDON_LIBS=../ofxAssimpModelLoader/libs/assimp/lib/macos/assimp.xcframework/macos-arm64_x86_64/assimp.a diff --git a/addons/ofxAssimpModelLoader/addon_config.mk b/addons/ofxAssimpModelLoader/addon_config.mk index 5b40093ce6a..7a574875f3c 100644 --- a/addons/ofxAssimpModelLoader/addon_config.mk +++ b/addons/ofxAssimpModelLoader/addon_config.mk @@ -99,10 +99,11 @@ android/x86: ADDON_LIBS= ADDON_LIBS+=libs/assimp/lib/android/x86/libassimp.a ADDON_LIBS+=libs/assimp/lib/android/x86/libIrrXML.a + +ios: + ADDON_INCLUDES_EXCLUDE = libs/assimp/include/% osx: ADDON_INCLUDES_EXCLUDE = libs/assimp/include/% - ADDON_LIBS= - ADDON_LIBS=libs/assimp/lib/macos/assimp.xcframework/macos-arm64_x86_64/assimp.a emscripten: ADDON_LIBS= From 3f2b5fdcb19ff481aa2a526f33c57cce472da8f3 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 26 Feb 2025 06:51:48 +1100 Subject: [PATCH 38/56] oF script / linux downloader --- scripts/dev/download_libs.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 9b9da532784..f9d5ca097ab 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -251,15 +251,9 @@ if [ "$ARCH" == "" ]; then if [ "$ARCH" == "x86_64" ]; then ARCH=64 elif [ "$ARCH" == "arm64" ]; then - # ARCH=arm64 # need to fix - ARCH=64 - if [ -f /opt/vc/include/bcm_host.h ]; then # RPi - ARCH=aarch64 - fi - elif [ "$ARCH" == "armv7l" ]; then - if [ -f /opt/vc/include/bcm_host.h ]; then # Check for Raspberry Pi - ARCH=armv6l #this makes no sense - fi + ARCH=arm64 + elif [ "$ARCH" == "aarch64" ]; then + ARCH=arm64 elif [ "$ARCH" == "i686" ] || [ "$ARCH" == "i386" ]; then echo "32bit linux is not officially supported anymore but compiling the libraries using the build script in apothecary/scripts should compile all the dependencies without problem" exit 1 @@ -316,7 +310,7 @@ if [ "$PLATFORM" == "linux" ]; then elif [ "$ARCH" == "arm64" ]; then OPT="_${GCC_VERSION}" elif [ "$ARCH" == "aarch64" ]; then - OPT="" + OPT="_${GCC_VERSION}" elif [ "$ARCH" == "armv8l" ]; then OPT="" elif [ "$ARCH" == "armv7l" ]; then From c481bbfc1a3b779555733998ff374d82c4c3fd75 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 26 Feb 2025 15:18:54 +1100 Subject: [PATCH 39/56] Linux Wayland support --- libs/openFrameworks/app/ofAppGLFWWindow.cpp | 328 +++++++++++--------- libs/openFrameworks/app/ofAppGLFWWindow.h | 9 + 2 files changed, 196 insertions(+), 141 deletions(-) diff --git a/libs/openFrameworks/app/ofAppGLFWWindow.cpp b/libs/openFrameworks/app/ofAppGLFWWindow.cpp index 02abee6f5e4..428abade160 100644 --- a/libs/openFrameworks/app/ofAppGLFWWindow.cpp +++ b/libs/openFrameworks/app/ofAppGLFWWindow.cpp @@ -11,15 +11,18 @@ #include "ofIcon.h" #include "ofImage.h" #define GLFW_EXPOSE_NATIVE_X11 + #define GLFW_EXPOSE_NATIVE_WAYLAND #ifndef TARGET_OPENGLES #define GLFW_EXPOSE_NATIVE_GLX #else #define GLFW_EXPOSE_NATIVE_EGL #endif #include - #include - #include - #include + #ifdef GLFW_EXPOSE_NATIVE_X11 + #include + #include + #include + #endif #include #include #elif defined(TARGET_OSX) @@ -73,6 +76,10 @@ ofAppGLFWWindow::ofAppGLFWWindow() currentW = 0; currentH = 0; + #if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY) + usingWayland = false; + #endif + glfwSetErrorCallback(error_cb); } @@ -174,6 +181,11 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) { ofLogError("ofAppGLFWWindow") << "couldn't init GLFW"; return; } + + #if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY) + usingWayland = (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND); + ofLogVerbose("ofAppGLFWWindow") << "Running under " << (usingWayland ? "Wayland" : "X11"); + #endif // ofLogNotice("ofAppGLFWWindow") << "WINDOW MODE IS " << screenMode; @@ -413,24 +425,34 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) { glfwSetWindowRefreshCallback(windowP, refresh_cb); #ifdef TARGET_LINUX - XSetLocaleModifiers(""); - xim = XOpenIM(getX11Display(), 0, 0, 0); - if (!xim) { - // fallback to internal input method - XSetLocaleModifiers("@im=none"); - xim = XOpenIM(getX11Display(), 0, 0, 0); - } - xic = XCreateIC(xim, - XNInputStyle, XIMPreeditNothing | XIMStatusNothing, - XNClientWindow, getX11Window(), - XNFocusWindow, getX11Window(), - NULL); -#endif + if (!usingWayland) { + XSetLocaleModifiers(""); + xim = XOpenIM(getX11Display(), 0, 0, 0); + if (!xim) { + // fallback to internal input method + XSetLocaleModifiers("@im=none"); + xim = XOpenIM(getX11Display(), 0, 0, 0); + } + xic = XCreateIC(xim, + XNInputStyle, XIMPreeditNothing | XIMStatusNothing, + XNClientWindow, getX11Window(), + XNFocusWindow, getX11Window(), + NULL); + } else { + // Wayland input is handled by GLFW directly + ofLogVerbose("ofAppGLFWWindow") << "Using Wayland native input handling"; + } + + #endif } #ifdef TARGET_LINUX //------------------------------------------------------------ void ofAppGLFWWindow::setWindowIcon(const of::filesystem::path & path) { + if (usingWayland) { + ofLogWarning("ofAppGLFWWindow") << "Setting window icon is not supported on Wayland"; + return; + } ofPixels iconPixels; ofLoadImage(iconPixels, path); setWindowIcon(iconPixels); @@ -438,6 +460,10 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) { //------------------------------------------------------------ void ofAppGLFWWindow::setWindowIcon(const ofPixels & iconPixels) { + if (usingWayland) { + ofLogWarning("ofAppGLFWWindow") << "Setting window icon is not supported on Wayland"; + return; + } iconSet = true; int length = 2 + iconPixels.getWidth() * iconPixels.getHeight(); vector buffer(length); @@ -758,127 +784,135 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) { } #ifdef TARGET_LINUX -#include - - Window nativeWin = glfwGetX11Window(windowP); - Display * display = glfwGetX11Display(); - if (targetWindowMode == OF_FULLSCREEN) { - -#ifdef TARGET_RASPBERRY_PI - // save window shape before going fullscreen - if (windowP) { - int tmpW, tmpH; - glfwGetWindowSize(windowP, &tmpW, &tmpH); - windowRect.setSize(tmpW, tmpH); - } -#endif - - int monitorCount; - GLFWmonitor ** monitors = glfwGetMonitors(&monitorCount); - if (settings.multiMonitorFullScreen && monitorCount > 1) { - // find the monitors at the edges of the virtual desktop - int minx = numeric_limits::max(); - int miny = numeric_limits::max(); - int maxx = numeric_limits::min(); - int maxy = numeric_limits::min(); - int x, y, w, h; - int monitorLeft = 0, monitorRight = 0, monitorTop = 0, monitorBottom = 0; - for (int i = 0; i < monitorCount; i++) { - glfwGetMonitorPos(monitors[i], &x, &y); - auto videoMode = glfwGetVideoMode(monitors[i]); - w = videoMode->width; - h = videoMode->height; - if (x < minx) { - monitorLeft = i; - minx = x; - } - if (y < miny) { - monitorTop = i; - miny = y; - } - if (x + w > maxx) { - monitorRight = i; - maxx = x + w; - } - if (y + h > maxy) { - monitorBottom = i; - maxy = y + h; - } - } - - // send fullscreen_monitors event with the edges monitors - Atom m_net_fullscreen_monitors = XInternAtom(display, "_NET_WM_FULLSCREEN_MONITORS", false); - - XEvent xev; - - xev.xclient.type = ClientMessage; - xev.xclient.serial = 0; - xev.xclient.send_event = True; - xev.xclient.window = nativeWin; - xev.xclient.message_type = m_net_fullscreen_monitors; - xev.xclient.format = 32; - - xev.xclient.data.l[0] = monitorTop; - xev.xclient.data.l[1] = monitorBottom; - xev.xclient.data.l[2] = monitorLeft; - xev.xclient.data.l[3] = monitorRight; - xev.xclient.data.l[4] = 1; - XSendEvent(display, RootWindow(display, DefaultScreen(display)), - False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); - currentW = maxx - minx; - currentH = maxy - minx; - } else { - auto monitor = glfwGetWindowMonitor(windowP); - if (monitor) { - auto videoMode = glfwGetVideoMode(monitor); - if (videoMode) { - currentW = videoMode->width; - currentH = videoMode->height; - } - } - } - } - - // send fullscreen event - Atom m_net_state = XInternAtom(display, "_NET_WM_STATE", false); - Atom m_net_fullscreen = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", false); - - XEvent xev; - - xev.xclient.type = ClientMessage; - xev.xclient.serial = 0; - xev.xclient.send_event = True; - xev.xclient.window = nativeWin; - xev.xclient.message_type = m_net_state; - xev.xclient.format = 32; - - if (fullscreen) - xev.xclient.data.l[0] = 1; - else - xev.xclient.data.l[0] = 0; - - xev.xclient.data.l[1] = m_net_fullscreen; - xev.xclient.data.l[2] = 0; - xev.xclient.data.l[3] = 0; - xev.xclient.data.l[4] = 0; - XSendEvent(display, RootWindow(display, DefaultScreen(display)), - False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); - - // tell the window manager to bypass composition for this window in fullscreen for speed - // it'll probably help solving vsync issues - Atom m_bypass_compositor = XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False); - unsigned long value = fullscreen ? 1 : 0; - XChangeProperty(display, nativeWin, m_bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&value, 1); - - XFlush(display); - -#ifdef TARGET_RASPBERRY_PI - if (!fullscreen) { - needsResizeCheck = true; - } -#endif - - // setWindowShape(windowW, windowH); + if (!usingWayland) { + Window nativeWin = glfwGetX11Window(windowP); + Display * display = glfwGetX11Display(); + if (targetWindowMode == OF_FULLSCREEN) { + + #ifdef TARGET_RASPBERRY_PI + // save window shape before going fullscreen + if (windowP) { + int tmpW, tmpH; + glfwGetWindowSize(windowP, &tmpW, &tmpH); + windowRect.setSize(tmpW, tmpH); + } + #endif + + int monitorCount; + GLFWmonitor ** monitors = glfwGetMonitors(&monitorCount); + if (settings.multiMonitorFullScreen && monitorCount > 1) { + // find the monitors at the edges of the virtual desktop + int minx = numeric_limits::max(); + int miny = numeric_limits::max(); + int maxx = numeric_limits::min(); + int maxy = numeric_limits::min(); + int x, y, w, h; + int monitorLeft = 0, monitorRight = 0, monitorTop = 0, monitorBottom = 0; + for (int i = 0; i < monitorCount; i++) { + glfwGetMonitorPos(monitors[i], &x, &y); + auto videoMode = glfwGetVideoMode(monitors[i]); + w = videoMode->width; + h = videoMode->height; + if (x < minx) { + monitorLeft = i; + minx = x; + } + if (y < miny) { + monitorTop = i; + miny = y; + } + if (x + w > maxx) { + monitorRight = i; + maxx = x + w; + } + if (y + h > maxy) { + monitorBottom = i; + maxy = y + h; + } + } + + // send fullscreen_monitors event with the edges monitors + Atom m_net_fullscreen_monitors = XInternAtom(display, "_NET_WM_FULLSCREEN_MONITORS", false); + + XEvent xev; + + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; + xev.xclient.window = nativeWin; + xev.xclient.message_type = m_net_fullscreen_monitors; + xev.xclient.format = 32; + + xev.xclient.data.l[0] = monitorTop; + xev.xclient.data.l[1] = monitorBottom; + xev.xclient.data.l[2] = monitorLeft; + xev.xclient.data.l[3] = monitorRight; + xev.xclient.data.l[4] = 1; + XSendEvent(display, RootWindow(display, DefaultScreen(display)), + False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); + currentW = maxx - minx; + currentH = maxy - minx; + } else { + auto monitor = glfwGetWindowMonitor(windowP); + if (monitor) { + auto videoMode = glfwGetVideoMode(monitor); + if (videoMode) { + currentW = videoMode->width; + currentH = videoMode->height; + } + } + } + } + + // send fullscreen event + Atom m_net_state = XInternAtom(display, "_NET_WM_STATE", false); + Atom m_net_fullscreen = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", false); + + XEvent xev; + + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; + xev.xclient.window = nativeWin; + xev.xclient.message_type = m_net_state; + xev.xclient.format = 32; + + if (fullscreen) + xev.xclient.data.l[0] = 1; + else + xev.xclient.data.l[0] = 0; + + xev.xclient.data.l[1] = m_net_fullscreen; + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + XSendEvent(display, RootWindow(display, DefaultScreen(display)), + False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); + + // tell the window manager to bypass composition for this window in fullscreen for speed + // it'll probably help solving vsync issues + Atom m_bypass_compositor = XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False); + unsigned long value = fullscreen ? 1 : 0; + XChangeProperty(display, nativeWin, m_bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&value, 1); + + XFlush(display); + + #ifdef TARGET_RASPBERRY_PI + if (!fullscreen) { + needsResizeCheck = true; + } + #endif + } else { + int monitorCount; + GLFWmonitor ** monitors = glfwGetMonitors(&monitorCount); + int monitorIdx = getCurrentMonitor(); + if (fullscreen) { + auto mode = glfwGetVideoMode(monitors[monitorIdx]); + glfwSetWindowMonitor(windowP, monitors[monitorIdx], 0, 0, mode->width, mode->height, mode->refreshRate); + } else { + glfwSetWindowMonitor(windowP, nullptr, windowRect.x, windowRect.y, windowW, windowH, 0); + } + } #elif defined(TARGET_OSX) @@ -1752,17 +1786,29 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) { #if defined(TARGET_LINUX) Display * ofAppGLFWWindow::getX11Display() { - return glfwGetX11Display(); + return usingWayland ? nullptr : glfwGetX11Display(); } Window ofAppGLFWWindow::getX11Window() { - return glfwGetX11Window(windowP); + return usingWayland ? 0 : glfwGetX11Window(windowP); } XIC ofAppGLFWWindow::getX11XIC() { - return xic; + return usingWayland ? nullptr : xic; } -#endif + + wl_display * ofAppGLFWWindow::getWaylandDisplay() { + return usingWayland ? glfwGetWaylandDisplay() : nullptr; + } + + wl_surface * ofAppGLFWWindow::getWaylandSurface() { + return usingWayland ? glfwGetWaylandWindow(windowP) : nullptr; + } + + bool ofAppGLFWWindow::isUsingWayland() const { + return usingWayland; + } + #endif #if defined(TARGET_LINUX) && !defined(TARGET_OPENGLES) GLXContext ofAppGLFWWindow::getGLXContext() { diff --git a/libs/openFrameworks/app/ofAppGLFWWindow.h b/libs/openFrameworks/app/ofAppGLFWWindow.h index 1a58743cf84..1a832081720 100644 --- a/libs/openFrameworks/app/ofAppGLFWWindow.h +++ b/libs/openFrameworks/app/ofAppGLFWWindow.h @@ -10,6 +10,8 @@ #if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY) typedef struct _XIM * XIM; typedef struct _XIC * XIC; +typedef struct wl_display wl_display; +typedef struct wl_surface wl_surface; #endif class ofBaseApp; @@ -171,6 +173,12 @@ class ofAppGLFWWindow : public ofAppBaseGLWindow { void setWindowIcon(const of::filesystem::path & path); void setWindowIcon(const ofPixels & iconPixels); + + wl_display * getWaylandDisplay(); + wl_surface * getWaylandSurface(); + + // Helper to detect the current backend + bool isUsingWayland() const; #endif #if defined(TARGET_LINUX) && !defined(TARGET_OPENGLES) @@ -214,6 +222,7 @@ class ofAppGLFWWindow : public ofAppBaseGLWindow { #if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY) XIM xim; XIC xic; + bool usingWayland; #endif std::unique_ptr coreEvents; From 6fd1081e32beb62fe25872c1440317548500466f Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 27 Feb 2025 01:08:05 +1100 Subject: [PATCH 40/56] linux makefile update arm64 / jetson / rpi --- .../project/makefileCommon/config.shared.mk | 49 ++++++++++++------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index fa5e0394b4d..4ebe0d644f5 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -40,6 +40,9 @@ else FIND=find endif +RPI_DETECTED := $(shell grep -qi 'Raspberry' /proc/device-tree/model && echo yes || echo no) +JETSON_DETECTED := $(shell grep -qi -e 'Jetson' -e 'Tegra' /proc/device-tree/model && echo yes || echo no) + #check for Raspbian as armv7l needs to use armv6l architecture ifeq ($(wildcard $(RPI_ROOT)/etc/*-release), /etc/os-release) ifeq ($(shell grep ID=raspbian $(RPI_ROOT)/etc/*-release),ID=raspbian) @@ -77,33 +80,41 @@ ifdef MAKEFILE_DEBUG $(info CROSS_COMPILING=$(CROSS_COMPILING)) $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) $(info IS_RASPBIAN=$(IS_RASPBIAN)) + $(info IS_RASPBIAN=$(IS_RASPBIAN)) endif # if not defined, construct the default PLATFORM_LIB_SUBPATH ifndef PLATFORM_LIB_SUBPATH # determine from the arch ifeq ($(PLATFORM_OS),Linux) - ifeq ($(PLATFORM_ARCH),x86_64) - PLATFORM_LIB_SUBPATH=linux/64 - else ifeq ($(PLATFORM_ARCH),64) - PLATFORM_LIB_SUBPATH=linux/64 - else ifeq ($(PLATFORM_ARCH),armv6l) - PLATFORM_LIB_SUBPATH=linux/armv6l - else ifeq ($(PLATFORM_ARCH),armv7l) - PLATFORM_LIB_SUBPATH=linux/armv7l - else ifeq ($(PLATFORM_ARCH),armv8l) - PLATFORM_LIB_SUBPATH=linux/armv8l - else ifeq ($(PLATFORM_ARCH),arm64) - PLATFORM_LIB_SUBPATH=linux/arm64 - else ifeq ($(PLATFORM_ARCH),aarch64) - PLATFORM_LIB_SUBPATH=linux/aarch64 - else ifeq ($(PLATFORM_ARCH),jetson) + ifeq ($(RPI_DETECTED),yes) + else ifeq ($(PLATFORM_ARCH),armv6l) + PLATFORM_LIB_SUBPATH=linux/armv6l + else ifeq ($(PLATFORM_ARCH),armv7l) + PLATFORM_LIB_SUBPATH=linux/armv7l + else ifeq ($(PLATFORM_ARCH),armv8l) + PLATFORM_LIB_SUBPATH=linux/armv8l + else ifeq ($(PLATFORM_ARCH),arm64) + PLATFORM_LIB_SUBPATH=linux/arm64 + else ifeq ($(PLATFORM_ARCH),aarch64) + PLATFORM_LIB_SUBPATH=linux/aarch64 + else ifeq ($(JETSON_DETECTED),yes) PLATFORM_LIB_SUBPATH=linux/jetson - else ifeq ($(PLATFORM_ARCH),i386) - PLATFORM_LIB_SUBPATH=linux else - PLATFORM_LIB_SUBPATH=linux - $(error This makefile does not support your architecture $(PLATFORM_ARCH)) + ifeq ($(PLATFORM_ARCH),x86_64) + PLATFORM_LIB_SUBPATH=linux/64 + else ifeq ($(PLATFORM_ARCH),64) + PLATFORM_LIB_SUBPATH=linux/64 + else ifeq ($(PLATFORM_ARCH),arm64) + PLATFORM_LIB_SUBPATH=linux/arm64 + else ifeq ($(PLATFORM_ARCH),aarch64) + PLATFORM_LIB_SUBPATH=linux/arm64 + else ifeq ($(PLATFORM_ARCH),i386) + PLATFORM_LIB_SUBPATH=linux/i386 + else + PLATFORM_LIB_SUBPATH=linux + $(error This makefile does not support your architecture $(PLATFORM_ARCH)) + endif endif SHARED_LIB_EXTENSION=so else ifneq (,$(findstring MINGW32_NT,$(PLATFORM_OS))) From 7a3097a20ea8946554b55ac2a1fd97b8e80672c9 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 27 Feb 2025 12:00:03 +1100 Subject: [PATCH 41/56] Linux rasbian to folder makefiles fixed remove i386 --- .../linux/i386/config.linux.default.mk | 28 -- .../project/linux/i386/libopenFrameworks.cbp | 467 ------------------ .../config.linuxaarch64.default.mk | 0 .../config.linuxarmv6l.default.mk | 0 .../config.linuxarmv7l.default.mk | 0 .../config.linuxarmv7l.raspberry2.mk | 0 .../config.linuxarmv7l.udoo.mk | 0 .../project/makefileCommon/config.shared.mk | 13 +- 8 files changed, 8 insertions(+), 500 deletions(-) delete mode 100644 libs/openFrameworksCompiled/project/linux/i386/config.linux.default.mk delete mode 100644 libs/openFrameworksCompiled/project/linux/i386/libopenFrameworks.cbp rename libs/openFrameworksCompiled/project/linux/{aarch64 => rasbian}/config.linuxaarch64.default.mk (100%) rename libs/openFrameworksCompiled/project/linux/{armv6l => rasbian}/config.linuxarmv6l.default.mk (100%) rename libs/openFrameworksCompiled/project/linux/{armv7l => rasbian}/config.linuxarmv7l.default.mk (100%) rename libs/openFrameworksCompiled/project/linux/{armv7l => rasbian}/config.linuxarmv7l.raspberry2.mk (100%) rename libs/openFrameworksCompiled/project/linux/{armv7l => rasbian}/config.linuxarmv7l.udoo.mk (100%) diff --git a/libs/openFrameworksCompiled/project/linux/i386/config.linux.default.mk b/libs/openFrameworksCompiled/project/linux/i386/config.linux.default.mk deleted file mode 100644 index d7e5cfbed89..00000000000 --- a/libs/openFrameworksCompiled/project/linux/i386/config.linux.default.mk +++ /dev/null @@ -1,28 +0,0 @@ -############################################################################### -# CONFIGURE CORE PLATFORM MAKEFILE -# This file is where we make platform and architecture specific -# configurations. This file can be specified for a generic architecture or can -# be defined as variants. For instance, normally this file will be located in -# a platform specific subpath such as -# -# $(OF_ROOT)/libs/openFrameworksComplied/linux64 -# -# This file will then be a generic platform file like: -# -# configure.linux64.default.make -# -# Or it can specify a specific platform variant like: -# -# configure.linuxarmv6l.raspberrypi.make -# -################################################################################ - -################################################################################ -# include common rules -# -# all linux systems have several rules in common so most of them are included -# from the following file -# -################################################################################ - -include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk diff --git a/libs/openFrameworksCompiled/project/linux/i386/libopenFrameworks.cbp b/libs/openFrameworksCompiled/project/linux/i386/libopenFrameworks.cbp deleted file mode 100644 index a43268a1d01..00000000000 --- a/libs/openFrameworksCompiled/project/linux/i386/libopenFrameworks.cbp +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - diff --git a/libs/openFrameworksCompiled/project/linux/aarch64/config.linuxaarch64.default.mk b/libs/openFrameworksCompiled/project/linux/rasbian/config.linuxaarch64.default.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linux/aarch64/config.linuxaarch64.default.mk rename to libs/openFrameworksCompiled/project/linux/rasbian/config.linuxaarch64.default.mk diff --git a/libs/openFrameworksCompiled/project/linux/armv6l/config.linuxarmv6l.default.mk b/libs/openFrameworksCompiled/project/linux/rasbian/config.linuxarmv6l.default.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linux/armv6l/config.linuxarmv6l.default.mk rename to libs/openFrameworksCompiled/project/linux/rasbian/config.linuxarmv6l.default.mk diff --git a/libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.default.mk b/libs/openFrameworksCompiled/project/linux/rasbian/config.linuxarmv7l.default.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.default.mk rename to libs/openFrameworksCompiled/project/linux/rasbian/config.linuxarmv7l.default.mk diff --git a/libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.raspberry2.mk b/libs/openFrameworksCompiled/project/linux/rasbian/config.linuxarmv7l.raspberry2.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.raspberry2.mk rename to libs/openFrameworksCompiled/project/linux/rasbian/config.linuxarmv7l.raspberry2.mk diff --git a/libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.udoo.mk b/libs/openFrameworksCompiled/project/linux/rasbian/config.linuxarmv7l.udoo.mk similarity index 100% rename from libs/openFrameworksCompiled/project/linux/armv7l/config.linuxarmv7l.udoo.mk rename to libs/openFrameworksCompiled/project/linux/rasbian/config.linuxarmv7l.udoo.mk diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 4ebe0d644f5..34901692b2b 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -69,6 +69,13 @@ else CROSS_COMPILING=0 endif endif + ifeq ($(PLATFORM_OS),Linux) + ifeq ($(PLATFORM_ARCH),aarch64) + ifneq ($(RPI_DETECTED),no) + PLATFORM_ARCH=arm64 + endif + endif + endif endif @@ -80,7 +87,7 @@ ifdef MAKEFILE_DEBUG $(info CROSS_COMPILING=$(CROSS_COMPILING)) $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) $(info IS_RASPBIAN=$(IS_RASPBIAN)) - $(info IS_RASPBIAN=$(IS_RASPBIAN)) + $(info JETSON_DETECTED=$(JETSON_DETECTED)) endif # if not defined, construct the default PLATFORM_LIB_SUBPATH @@ -94,8 +101,6 @@ ifndef PLATFORM_LIB_SUBPATH PLATFORM_LIB_SUBPATH=linux/armv7l else ifeq ($(PLATFORM_ARCH),armv8l) PLATFORM_LIB_SUBPATH=linux/armv8l - else ifeq ($(PLATFORM_ARCH),arm64) - PLATFORM_LIB_SUBPATH=linux/arm64 else ifeq ($(PLATFORM_ARCH),aarch64) PLATFORM_LIB_SUBPATH=linux/aarch64 else ifeq ($(JETSON_DETECTED),yes) @@ -109,8 +114,6 @@ ifndef PLATFORM_LIB_SUBPATH PLATFORM_LIB_SUBPATH=linux/arm64 else ifeq ($(PLATFORM_ARCH),aarch64) PLATFORM_LIB_SUBPATH=linux/arm64 - else ifeq ($(PLATFORM_ARCH),i386) - PLATFORM_LIB_SUBPATH=linux/i386 else PLATFORM_LIB_SUBPATH=linux $(error This makefile does not support your architecture $(PLATFORM_ARCH)) From 38eb46360f2e09e4e3acf6126326813addfc40e9 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 27 Feb 2025 14:43:09 +1100 Subject: [PATCH 42/56] make shell --- .../project/makefileCommon/config.shared.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 34901692b2b..0af5dd005b5 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -40,8 +40,17 @@ else FIND=find endif -RPI_DETECTED := $(shell grep -qi 'Raspberry' /proc/device-tree/model && echo yes || echo no) -JETSON_DETECTED := $(shell grep -qi -e 'Jetson' -e 'Tegra' /proc/device-tree/model && echo yes || echo no) +RPI_DETECTED := $(shell \ + if [ -f /proc/device-tree/model ]; then file=/proc/device-tree/model; \ + elif [ -f /sys/firmware/devicetree/base/model ]; then file=/sys/firmware/devicetree/base/model; \ + else file=""; fi; \ + if [ -n "$$file" ] && grep -qi 'Raspberry' $$file; then echo yes; else echo no; fi) + +JETSON_DETECTED := $(shell \ + if [ -f /proc/device-tree/model ]; then file=/proc/device-tree/model; \ + elif [ -f /sys/firmware/devicetree/base/model ]; then file=/sys/firmware/devicetree/base/model; \ + else file=""; fi; \ + if [ -n "$$file" ] && grep -qi -e 'Jetson' -e 'Tegra' $$file; then echo yes; else echo no; fi) #check for Raspbian as armv7l needs to use armv6l architecture ifeq ($(wildcard $(RPI_ROOT)/etc/*-release), /etc/os-release) From 1da7000ef495609cd1c285f5378f4331d9ff31b6 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Mon, 3 Mar 2025 17:21:52 +1100 Subject: [PATCH 43/56] makefiles must use tabs --- .../project/makefileCommon/config.shared.mk | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 0af5dd005b5..7039f7a42bc 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -41,16 +41,16 @@ else endif RPI_DETECTED := $(shell \ - if [ -f /proc/device-tree/model ]; then file=/proc/device-tree/model; \ - elif [ -f /sys/firmware/devicetree/base/model ]; then file=/sys/firmware/devicetree/base/model; \ - else file=""; fi; \ - if [ -n "$$file" ] && grep -qi 'Raspberry' $$file; then echo yes; else echo no; fi) + if [ -f /proc/device-tree/model ]; then file=/proc/device-tree/model; \ + elif [ -f /sys/firmware/devicetree/base/model ]; then file=/sys/firmware/devicetree/base/model; \ + else file=""; fi; \ + if [ -n "$$file" ] && grep -qi 'Raspberry' $$file; then echo yes; else echo no; fi) JETSON_DETECTED := $(shell \ - if [ -f /proc/device-tree/model ]; then file=/proc/device-tree/model; \ - elif [ -f /sys/firmware/devicetree/base/model ]; then file=/sys/firmware/devicetree/base/model; \ - else file=""; fi; \ - if [ -n "$$file" ] && grep -qi -e 'Jetson' -e 'Tegra' $$file; then echo yes; else echo no; fi) + if [ -f /proc/device-tree/model ]; then file=/proc/device-tree/model; \ + elif [ -f /sys/firmware/devicetree/base/model ]; then file=/sys/firmware/devicetree/base/model; \ + else file=""; fi; \ + if [ -n "$$file" ] && grep -qi -e 'Jetson' -e 'Tegra' $$file; then echo yes; else echo no; fi) #check for Raspbian as armv7l needs to use armv6l architecture ifeq ($(wildcard $(RPI_ROOT)/etc/*-release), /etc/os-release) @@ -79,11 +79,11 @@ else endif endif ifeq ($(PLATFORM_OS),Linux) - ifeq ($(PLATFORM_ARCH),aarch64) - ifneq ($(RPI_DETECTED),no) - PLATFORM_ARCH=arm64 + ifeq ($(PLATFORM_ARCH),aarch64) + ifneq ($(RPI_DETECTED),no) + PLATFORM_ARCH=arm64 + endif endif - endif endif endif From 9fa34d96f5adc2748791a01ead2a30c892d8deff Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Mon, 3 Mar 2025 18:13:58 +1100 Subject: [PATCH 44/56] Linux arm64 fix --- .../project/makefileCommon/config.shared.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 7039f7a42bc..66be74a6a17 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -80,9 +80,7 @@ else endif ifeq ($(PLATFORM_OS),Linux) ifeq ($(PLATFORM_ARCH),aarch64) - ifneq ($(RPI_DETECTED),no) - PLATFORM_ARCH=arm64 - endif + PLATFORM_ARCH=arm64 endif endif endif From 1bee228c9889b2b0058a5c609fd166ca262d3dff Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Tue, 4 Mar 2025 17:23:13 +1100 Subject: [PATCH 45/56] Setup GCC.sh --- scripts/linux/setupGCC.sh | 172 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 scripts/linux/setupGCC.sh diff --git a/scripts/linux/setupGCC.sh b/scripts/linux/setupGCC.sh new file mode 100644 index 00000000000..8dd759c3497 --- /dev/null +++ b/scripts/linux/setupGCC.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash + +OF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +OF_DIR="$(realpath "$OF_DIR/../..")" + +GCC_VERSION=$(gcc -dumpversion 2>/dev/null || echo "0") +GCC_REQUIRED_VERSION="14" +GCC_URL="https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.gz" +GCC_FILE="gcc-14.2.0" + +if [[ "$GCC_VERSION" =~ ^"$GCC_REQUIRED_VERSION" ]]; then + echo "GCC $GCC_VERSION is already installed." + exit 0 +fi + +ID="" +UBUNTU_VERSION="" +if [[ -f /etc/os-release ]]; then + . /etc/os-release + ID="$ID" + UBUNTU_VERSION="$VERSION_ID" +fi + +INSTALL_FROM_SOURCE=0 +echoVerbose() { echo "$1"; } +if [ $INSTALL_FROM_SOURCE = 0 ]; then + case "$ID" in + "ubuntu") + if [[ "$(echo "$UBUNTU_VERSION < 24.04" | bc)" -eq 1 ]]; then + echo "Ubuntu $UBUNTU_VERSION detected. GCC 14 not in default repos. Compiling from source..." + INSTALL_FROM_SOURCE=1 + else + echoVerbose "Installing GCC 14 via apt on Ubuntu $UBUNTU_VERSION..." + sudo apt update + sudo apt install -y gcc-14 g++-14 && { + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-14 + sudo update-alternatives --set gcc /usr/bin/gcc-14 + exit 0 + } || { + echo "Apt install failed. Falling back to source..." + INSTALL_FROM_SOURCE=1 + } + fi + ;; + "debian") + echo "Debian detected. Checking for GCC 14 in repos..." + sudo apt update + sudo apt install -y gcc-14 g++-14 && { + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-14 + sudo update-alternatives --set gcc /usr/bin/gcc-14 + exit 0 + } || { + echo "GCC 14 not available in Debian repos. Compiling from source..." + INSTALL_FROM_SOURCE=1 + } + ;; + "centos" | "rhel" | "fedora") + echoVerbose "Detected $ID. Trying DNF..." + sudo dnf install -y gcc gcc-c++ && { + if [[ "$(gcc -dumpversion)" =~ ^"$GCC_REQUIRED_VERSION" ]]; then + exit 0 + else + echo "DNF didn’t provide GCC 14. Compiling from source..." + INSTALL_FROM_SOURCE=1 + fi + } || INSTALL_FROM_SOURCE=1 + ;; + "arch") + echoVerbose "Arch Linux detected. Using pacman..." + sudo pacman -Syu gcc || { + echo "GCC 14 not available via pacman yet. Compiling from source..." + INSTALL_FROM_SOURCE=1 + } + ;; + "opensuse" | "suse") + echoVerbose "openSUSE detected. Trying zypper..." + sudo zypper install -y gcc14 gcc14-c++ || { + echo "GCC 14 not available via zypper. Compiling from source..." + INSTALL_FROM_SOURCE=1 + } + ;; + *) + echo "Unsupported distro: $ID. Compiling GCC 14 from source..." + INSTALL_FROM_SOURCE=1 + ;; + esac +fi + +if [[ "$INSTALL_FROM_SOURCE" -eq 1 ]]; then + echo "Compiling GCC 14 from source..." + if [[ -f /etc/debian_version ]]; then + sudo apt update + sudo apt install -y build-essential flex bison libgmp-dev libmpfr-dev libisl-dev libmpc-dev texinfo wget + elif [[ "$ID" == "centos" || "$ID" == "rhel" || "$ID" == "fedora" ]]; then + sudo dnf groupinstall -y "Development Tools" + sudo dnf install -y gmp-devel mpfr-devel libmpc-devel isl-devel flex bison texinfo wget + elif [[ "$ID" == "arch" ]]; then + sudo pacman -Syu base-devel gmp mpfr libmpc isl flex bison texinfo wget + elif [[ "$ID" == "opensuse" || "$ID" == "suse" ]]; then + sudo zypper install -y patterns-devel-base-devel_basis gmp-devel mpfr-devel libmpc3-devel isl-devel flex bison texinfo wget + else + echo "Warning: Unknown distro. Attempting source build without dependency check..." + fi + + "$OF_DIR/scripts/dev/downloader.sh" "$GCC_URL" "$GCC_FILE.tar.gz" || { echo "Download failed"; exit 1; } + tar -xzf "$GCC_FILE.tar.gz" || { echo "Extraction failed"; exit 1; } + cd "$GCC_FILE" || exit 1 + + # GCC requires its own prerequisites (e.g., GMP, MPFR) in-tree + ./contrib/download_prerequisites || { echo "Failed to download prerequisites"; exit 1; } + + # Configure and build + mkdir -p build && cd build || exit 1 + ../configure --prefix="/usr/local/gcc-14" \ + --enable-languages=c,c++ \ + --disable-multilib \ + --disable-bootstrap \ + --with-system-zlib || { echo "Configure failed"; exit 1; } + make -j"$(nproc)" || { echo "Make failed"; exit 1; } + sudo make install || { echo "Install failed"; exit 1; } + + # Set up paths based on architecture + ARCH=$(uname -m) + case "$ARCH" in + "x86_64") + GCC_PATH="/usr/local/gcc-14/bin" + GCC_LIB_PATH="/usr/local/gcc-14/lib64" + ;; + "aarch64" | "arm64") + GCC_PATH="/usr/local/gcc-14/bin" + GCC_LIB_PATH="/usr/local/gcc-14/lib" + ;; + *) + echo "Unsupported architecture: $ARCH" + exit 1 + ;; + esac + + # Symlink binaries + if [[ -f "$GCC_PATH/gcc" ]]; then + sudo ln -sf "$GCC_PATH/gcc" /usr/bin/gcc + sudo ln -sf "$GCC_PATH/g++" /usr/bin/g++ + else + echo "GCC 14 binary not found after install!" + exit 1 + fi + + # Update shell profile + USER_SHELL=$(basename "$SHELL") + case "$USER_SHELL" in + "bash") PROFILE_FILE="$HOME/.bashrc" ;; + "zsh") PROFILE_FILE="$HOME/.zshrc" ;; + "fish") PROFILE_FILE="$HOME/.config/fish/config.fish" ;; + *) PROFILE_FILE="$HOME/.profile" ;; # Fallback + esac + + if [[ "$USER_SHELL" == "fish" ]]; then + echo "set -x PATH $GCC_PATH \$PATH" >> "$PROFILE_FILE" + echo "set -x LD_LIBRARY_PATH $GCC_LIB_PATH \$LD_LIBRARY_PATH" >> "$PROFILE_FILE" + else + echo "export PATH=$GCC_PATH:\$PATH" >> "$PROFILE_FILE" + echo "export LD_LIBRARY_PATH=$GCC_LIB_PATH:\$LD_LIBRARY_PATH" >> "$PROFILE_FILE" + source "$PROFILE_FILE" 2>/dev/null || echo "Run 'source $PROFILE_FILE' manually." + fi +fi + +# Verify installation +echo "Installed GCC version:" +gcc --version || { echo "GCC not found after install!"; exit 1; } +g++ --version || { echo "G++ not found after install!"; exit 1; } From 0a08ffbdc1cafb745bbda21309ee20dfd2f757ed Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Tue, 4 Mar 2025 18:28:50 +1100 Subject: [PATCH 46/56] download libs linux minimum gcc 10 --- scripts/dev/download_libs.sh | 4 ++-- scripts/linux/setupGCC.sh | 0 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/linux/setupGCC.sh diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index f9d5ca097ab..3c580e1aa29 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -14,7 +14,7 @@ LEGACY=0 SILENT_ARGS="" NO_SSL="" BLEEDING_EDGE=0 -DL_VERSION=2.8.1 +DL_VERSION=2.8.2 GCC_VERSION=0 TAG="" REPO="latest" @@ -296,7 +296,7 @@ if [ "$PLATFORM" == "linux" ]; then GCC_VERSION=$(gcc -dumpversion | cut -f1 -d.) echo "GCC_VERSION from bash: [$GCC_VERSION]" else - GCC_VERSION=6 + GCC_VERSION=10 fi if [ "$GCC_VERSION" -gt 14 ]; then echo "GCC version is greater than 14. latest supported" diff --git a/scripts/linux/setupGCC.sh b/scripts/linux/setupGCC.sh old mode 100644 new mode 100755 From 6cd93516016666b0fadc180d815fb609a821a536 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Tue, 4 Mar 2025 18:59:00 +1100 Subject: [PATCH 47/56] nightly arm64 linux --- scripts/ci/package_builds.sh | 5 +++-- scripts/dev/create_package.sh | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/ci/package_builds.sh b/scripts/ci/package_builds.sh index 8460625ce57..f7ad583b88f 100755 --- a/scripts/ci/package_builds.sh +++ b/scripts/ci/package_builds.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -ev +set -e ROOT=${GITHUB_WORKSPACE} @@ -47,7 +47,8 @@ echo "##[endgroup]" cd $OUTPUT_FOLDER pwd PACKAGES=( - "linux64 $lastversion master gcc6" + "linux64 $lastversion master 10" + "linuxarm64 $lastversion master 14" "linuxarmv6l $lastversion master" "linuxaarch64 $lastversion master" "msys2 $lastversion master mingw64" diff --git a/scripts/dev/create_package.sh b/scripts/dev/create_package.sh index 7437d57732a..1df2e392996 100755 --- a/scripts/dev/create_package.sh +++ b/scripts/dev/create_package.sh @@ -11,7 +11,7 @@ platform=$1 version=$2 -all_platforms="linux linux64 linuxarmv6l linuxarmv7l linuxaarch64 osx msys2 vs ios macos tvos android emscripten" +all_platforms="linux linux64 linuxarm64 linuxarmv6l linuxarmv7l linuxaarch64 osx msys2 vs ios macos tvos android emscripten" of_root=$(readlink -f "$(dirname "$(readlink -f "$0")")/../..") @@ -77,7 +77,7 @@ echoDots(){ } -if [ "$platform" != "msys2" ] && [ "$platform" != "linux" ] && [ "$platform" != "linux64" ] && [ "$platform" != "linuxarmv6l" ] && [ "$platform" != "linuxaarch64" ] && [ "$platform" != "linuxarmv7l" ] && [ "$platform" != "vs" ] && [ "$platform" != "vs2019" ] && [ "$platform" != "osx" ] && [ "$platform" != "android" ] && [ "$platform" != "ios" ] && [ "$platform" != "macos" ]; then +if [ "$platform" != "msys2" ] && [ "$platform" != "linux" ] && [ "$platform" != "linux64" ] && [ "$platform" != "linuxarm64" ] && [ "$platform" != "linuxarmv6l" ] && [ "$platform" != "linuxaarch64" ] && [ "$platform" != "linuxarmv7l" ] && [ "$platform" != "vs" ] && [ "$platform" != "vs2019" ] && [ "$platform" != "osx" ] && [ "$platform" != "android" ] && [ "$platform" != "ios" ] && [ "$platform" != "macos" ]; then echo usage: echo ./create_package.sh platform version echo platform: @@ -173,7 +173,7 @@ function deleteEclipse { function createProjectFiles { - if [ "$PKG_PLATFORM" != "linuxarmv6l" ] && [ "$PKG_PLATFORM" != "linuxarmv7l" ] && [ "$PKG_PLATFORM" != "linuxaarch64" ] && [ "$PKG_PLATFORM" != "android" ] ; then + if [ "$PKG_PLATFORM" != "linuxarmv6l" ] && [ "$PKG_PLATFORM" != "linuxarmv7l" ] && [ "$PKG_PLATFORM" != "linuxaarch64" ] && [ "$PKG_PLATFORM" != "linuxarm64" ] && [ "$PKG_PLATFORM" != "android" ] ; then mkdir -p ${MAIN_OFROOT}/libs/openFrameworksCompiled/lib/linux64/ cd ${MAIN_OFROOT}/apps/projectGenerator/commandLine echo "Recompiling command line PG" @@ -298,7 +298,7 @@ function createPackage { rm -Rf windowing fi - if [ "$PKG_PLATFORM" == "linux" ] || [ "$PKG_PLATFORM" == "linux64" ]; then + if [ "$PKG_PLATFORM" == "linux" ] || [ "$PKG_PLATFORM" == "linux64" ] || [ "$PKG_PLATFORM" == "linuxarm64" ]; then rm -Rf gles fi @@ -357,7 +357,10 @@ function createPackage { scripts/osx/download_libs.sh -t $LIBS_VERSION scripts/emscripten/download_libs.sh -n -t $LIBS_VERSION elif [ "$PKG_PLATFORM" = "linux64" ]; then - scripts/linux/download_libs.sh -a 64$LIBS_ABI + scripts/linux/download_libs.sh -t $LIBS_VERSION -a 64 -g $LIBS_ABI + scripts/emscripten/download_libs.sh -n -t $LIBS_VERSION + elif [ "$PKG_PLATFORM" = "linuxarm64" ]; then + scripts/linux/download_libs.sh -t $LIBS_VERSION -a arm64 -g $LIBS_ABI scripts/emscripten/download_libs.sh -n -t $LIBS_VERSION elif [ "$PKG_PLATFORM" = "linuxarmv6l" ]; then scripts/linux/download_libs.sh -a armv6l -t $LIBS_VERSION @@ -397,6 +400,9 @@ function createPackage { elif [ "$PKG_PLATFORM" = "linux64" ]; then otherplatforms=$(remove_current_platform "$all_platforms" "emscripten") otherplatforms=$(remove_current_platform "$otherplatforms" "linux64") + elif [ "$PKG_PLATFORM" = "linuxarm64" ]; then + otherplatforms=$(remove_current_platform "$all_platforms" "emscripten") + otherplatforms=$(remove_current_platform "$otherplatforms" "linuxarm64") elif [ "$PKG_PLATFORM" = "linuxarmv6l" ]; then otherplatforms=$(remove_current_platform "$all_platforms" "linuxarmv6l") elif [ "$PKG_PLATFORM" = "linuxarmv7l" ]; then @@ -624,7 +630,7 @@ function createPackage { rm -Rf .gitattributes - if [ "$platform" = "linux" ] || [ "$platform" = "linux64" ] || [ "$platform" = "linuxarmv6l" ] || [ "$platform" = "linuxarmv7l" ] || [ "$platform" = "linuxaarch64" ]; then + if [ "$platform" = "linux" ] || [ "$platform" = "linux64" ] || [ "$platform" = "linuxarm64" ] || [ "$platform" = "linuxarmv6l" ] || [ "$platform" = "linuxarmv7l" ] || [ "$platform" = "linuxaarch64" ]; then cp docs/linux.md INSTALL.md fi @@ -663,7 +669,7 @@ function createPackage { fi #create compressed package - if [[ "$PKG_PLATFORM" =~ ^(linux|linux64|android|linuxarmv6l|linuxarmv7l|linuxaarch64|macos|ios|osx)$ ]] && [ "${LIBS_ABI}" != "windows" ]; then + if [[ "$PKG_PLATFORM" =~ ^(linux|linuxarm64|linux64|android|linuxarmv6l|linuxarmv7l|linuxaarch64|macos|ios|osx)$ ]] && [ "${LIBS_ABI}" != "windows" ]; then if [ "$LIBS_ABI" = "" ]; then PKG_NAME=of_v${PKG_VERSION}_${PKG_PLATFORM}_release else From c05a18f52fc58be42d06cfde5bc43709cd16416d Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Tue, 11 Aug 2026 12:03:34 +1000 Subject: [PATCH 48/56] Linux Fix Make File for all location targets and naming negating issues with makefiles --- addons/ofxOpenCv/addon_config.mk | 1 - .../project/makefileCommon/config.addons.mk | 15 +++-- .../project/makefileCommon/config.shared.mk | 63 ++++++++++++++++--- 3 files changed, 67 insertions(+), 12 deletions(-) diff --git a/addons/ofxOpenCv/addon_config.mk b/addons/ofxOpenCv/addon_config.mk index 873e760914a..f118b8fecb0 100644 --- a/addons/ofxOpenCv/addon_config.mk +++ b/addons/ofxOpenCv/addon_config.mk @@ -190,4 +190,3 @@ emscripten: ios: # osx/iOS only, any framework that should be included in the project ADDON_FRAMEWORKS = AssetsLibrary - diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk index 7a1e71cedc4..81e3036ebed 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk @@ -51,8 +51,15 @@ define parse_addons_sources endef # parses addons libraries, in PARSED_ADDON_LIBS receives full PATHS to addons and libs_exclude +# Select exactly one platform directory per addon library. Canonical structured +# paths have priority; legacy flat paths are fallbacks for existing addons. +define find_addon_platform_lib_path +$(firstword $(foreach subpath,$(ABI_LIB_SUBPATHS),$(wildcard $1/lib/$(subpath)))) +endef + define parse_addons_libraries - $(eval PARSED_ADDONS_LIBS_PLATFORM_LIB_PATHS = $(filter-out $(ADDON_LIBS_EXCLUDE),$(addsuffix /libs/*/lib/$(ABI_LIB_SUBPATH), $1))) \ + $(eval PARSED_ADDONS_LIB_ROOTS = $(wildcard $1/libs/*)) \ + $(eval PARSED_ADDONS_LIBS_PLATFORM_LIB_PATHS = $(filter-out $(ADDON_LIBS_EXCLUDE),$(foreach addon_lib_root,$(PARSED_ADDONS_LIB_ROOTS),$(call find_addon_platform_lib_path,$(addon_lib_root))))) \ $(eval PARSED_ADDONS_LIBS_PLATFORM_LIB_PATHS += $(filter-out $(ADDON_LIBS_EXCLUDE),$(addsuffix /libs/*/lib/$(PLATFORM_ALTERNATIVE), $1))) \ $(eval PARSED_ALL_PLATFORM_LIBS = $(shell $(FIND) $(PARSED_ADDONS_LIBS_PLATFORM_LIB_PATHS) -type d 2> /dev/null | $(EXCLUDE_PATHS_GREP))) \ $(if $(PARSED_ALL_PLATFORM_LIBS), \ @@ -120,15 +127,15 @@ define parse_addon $(if $(wildcard $(addon)/addon_config.mk), \ $(foreach var_line, $(shell cat $(addon)/addon_config.mk | tr '\n ' '\t?'), \ $(eval unscaped_var_line=$(strip $(subst ?, ,$(var_line)))) \ - $(if $(filter $(PROCESS_NEXT),1), $(eval $(unscaped_var_line))) \ $(if $(filter %:,$(unscaped_var_line)), \ $(if $(filter common:,$(unscaped_var_line)), \ $(eval PROCESS_NEXT=1), \ - $(if $(or $(filter $(ABI_LIB_SUBPATH):,$(unscaped_var_line)), $(filter $(PLATFORM_ALTERNATIVE):,$(unscaped_var_line))), \ + $(if $(filter $(addsuffix :,$(PLATFORM_ADDON_KEYS) $(PLATFORM_ALTERNATIVE)),$(unscaped_var_line)), \ $(eval PROCESS_NEXT=1), \ $(eval PROCESS_NEXT=0) \ ) \ - ) \ + ), \ + $(if $(filter $(PROCESS_NEXT),1), $(eval $(unscaped_var_line))) \ ) \ ) \ ) \ diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index 66be74a6a17..dd5b5cd554d 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -102,25 +102,43 @@ ifndef PLATFORM_LIB_SUBPATH # determine from the arch ifeq ($(PLATFORM_OS),Linux) ifeq ($(RPI_DETECTED),yes) - else ifeq ($(PLATFORM_ARCH),armv6l) + PLATFORM_CONFIG_SUBPATH=linux/rasbian + ifeq ($(PLATFORM_ARCH),armv6l) PLATFORM_LIB_SUBPATH=linux/armv6l + PLATFORM_CONFIG_ID=linuxarmv6l else ifeq ($(PLATFORM_ARCH),armv7l) PLATFORM_LIB_SUBPATH=linux/armv7l + PLATFORM_CONFIG_ID=linuxarmv7l else ifeq ($(PLATFORM_ARCH),armv8l) PLATFORM_LIB_SUBPATH=linux/armv8l - else ifeq ($(PLATFORM_ARCH),aarch64) + PLATFORM_CONFIG_ID=linuxarmv8l + else ifeq ($(PLATFORM_ARCH),arm64) PLATFORM_LIB_SUBPATH=linux/aarch64 + PLATFORM_CONFIG_ID=linuxaarch64 + else + $(error This makefile does not support Raspberry Pi architecture $(PLATFORM_ARCH)) + endif else ifeq ($(JETSON_DETECTED),yes) PLATFORM_LIB_SUBPATH=linux/jetson + PLATFORM_CONFIG_SUBPATH=linux/arm64 + PLATFORM_CONFIG_ID=linuxarm64 else ifeq ($(PLATFORM_ARCH),x86_64) PLATFORM_LIB_SUBPATH=linux/64 + PLATFORM_CONFIG_SUBPATH=linux/64 + PLATFORM_CONFIG_ID=linux64 else ifeq ($(PLATFORM_ARCH),64) PLATFORM_LIB_SUBPATH=linux/64 + PLATFORM_CONFIG_SUBPATH=linux/64 + PLATFORM_CONFIG_ID=linux64 else ifeq ($(PLATFORM_ARCH),arm64) PLATFORM_LIB_SUBPATH=linux/arm64 + PLATFORM_CONFIG_SUBPATH=linux/arm64 + PLATFORM_CONFIG_ID=linuxarm64 else ifeq ($(PLATFORM_ARCH),aarch64) PLATFORM_LIB_SUBPATH=linux/arm64 + PLATFORM_CONFIG_SUBPATH=linux/arm64 + PLATFORM_CONFIG_ID=linuxarm64 else PLATFORM_LIB_SUBPATH=linux $(error This makefile does not support your architecture $(PLATFORM_ARCH)) @@ -150,6 +168,25 @@ ifndef PLATFORM_LIB_SUBPATH endif endif +PLATFORM_CONFIG_SUBPATH ?= $(PLATFORM_LIB_SUBPATH) +PLATFORM_CONFIG_ID ?= $(subst /,,$(PLATFORM_CONFIG_SUBPATH)) + +# Canonical library paths follow Apothecary's OS/architecture layout. These +# aliases keep existing addons with pre-0.13 flat Linux paths working. +ifeq ($(PLATFORM_OS),Linux) + ifeq ($(PLATFORM_LIB_SUBPATH),linux/64) + PLATFORM_LEGACY_LIB_SUBPATHS ?= linux64 + else ifeq ($(PLATFORM_LIB_SUBPATH),linux/armv6l) + PLATFORM_LEGACY_LIB_SUBPATHS ?= linuxarmv6l + else ifeq ($(PLATFORM_LIB_SUBPATH),linux/armv7l) + PLATFORM_LEGACY_LIB_SUBPATHS ?= linuxarmv7l + else ifeq ($(PLATFORM_LIB_SUBPATH),linux/aarch64) + PLATFORM_LEGACY_LIB_SUBPATHS ?= linuxaarch64 + else ifeq ($(PLATFORM_LIB_SUBPATH),linux/arm64) + PLATFORM_LEGACY_LIB_SUBPATHS ?= linuxarm64 linuxaarch64 + endif +endif + # TODO: add appropriate list of platform suffixes # these variables will actually be used during compilation @@ -168,6 +205,9 @@ ifdef MAKEFILE_DEBUG $(info PLATFORM_OS=$(PLATFORM_OS)) $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) $(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)) + $(info PLATFORM_CONFIG_SUBPATH=$(PLATFORM_CONFIG_SUBPATH)) + $(info PLATFORM_CONFIG_ID=$(PLATFORM_CONFIG_ID)) + $(info PLATFORM_LEGACY_LIB_SUBPATHS=$(PLATFORM_LEGACY_LIB_SUBPATHS)) endif @@ -218,7 +258,7 @@ ifndef OF_SHARED_MAKEFILES_PATH endif ifdef OF_LIBS_OF_COMPILED_PROJECT_PATH - OF_PLATFORM_MAKEFILES=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH) + OF_PLATFORM_MAKEFILES=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_CONFIG_SUBPATH) else $(error OF_LIBS_OF_COMPILED_PATH is not defined) endif @@ -245,8 +285,8 @@ ifdef MAKEFILE_DEBUG $(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH)) endif -ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH)),) -$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH) probably you downloaded the wrong package?) +ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_CONFIG_SUBPATH)),) +$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_CONFIG_SUBPATH) probably you downloaded the wrong package?) endif # generate a list of valid core platform variants from the files in the platform makefiles directory @@ -259,12 +299,12 @@ ifeq ($(findstring $(PLATFORM_VARIANT),$(AVAILABLE_PLATFORM_VARIANTS)),) endif # include the platform specific user and platform configuration files -PLATFORM_LIB_SUBPATH_FIXED := $(subst /,,$(PLATFORM_LIB_SUBPATH)) -include $(OF_PLATFORM_MAKEFILES)/config.$(PLATFORM_LIB_SUBPATH_FIXED).$(PLATFORM_VARIANT).mk +include $(OF_PLATFORM_MAKEFILES)/config.$(PLATFORM_CONFIG_ID).$(PLATFORM_VARIANT).mk ifdef ABI_PATH ABI_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)/$(strip $(ABI_PATH)) + ABI_LEGACY_LIB_SUBPATHS=$(addsuffix /$(strip $(ABI_PATH)),$(PLATFORM_LEGACY_LIB_SUBPATHS)) else #hack to get makefiles working again ifeq ($(PLATFORM_LIB_SUBPATH),osx) @@ -272,6 +312,15 @@ else else ABI_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH) endif + ABI_LEGACY_LIB_SUBPATHS=$(PLATFORM_LEGACY_LIB_SUBPATHS) +endif + +# Ordered canonical-first candidates used only for addon compatibility. +ABI_LIB_SUBPATHS=$(strip $(ABI_LIB_SUBPATH) $(ABI_LEGACY_LIB_SUBPATHS)) +ifeq ($(PLATFORM_OS),Linux) + PLATFORM_ADDON_KEYS=$(strip linux $(ABI_LIB_SUBPATHS)) +else + PLATFORM_ADDON_KEYS=$(strip $(ABI_LIB_SUBPATHS)) endif PLATFORM_PKG_CONFIG ?= pkg-config From e02e35526d66b80719a15603780c97bab1b5723f Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sun, 9 Aug 2026 23:35:18 +1000 Subject: [PATCH 49/56] download_libs changes for linux --- scripts/dev/download_libs.sh | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 3c580e1aa29..875a4283c2d 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -109,6 +109,64 @@ download(){ downloader $COMMAND $SILENT_ARGS $NO_SSL } +linux_legacy_lib_subpath(){ + case "$1" in + x86_64|64|64gcc6|64_gcc6) echo "linux64" ;; + armv6l) echo "linuxarmv6l" ;; + armv7l) echo "linuxarmv7l" ;; + *) echo "" ;; + esac +} + +normalize_linux_lib_paths(){ + if [ "$PLATFORM" != "linux" ]; then + return + fi + + local source_arch + local source_path + local destination_path + local destination_subpath + local lib_root + local i + local normalized_count=0 + local source_paths=() + local destination_paths=() + local source_arches=("x86_64" "armv6l" "armv7l") + + for source_arch in "${source_arches[@]}"; do + destination_subpath=$(linux_legacy_lib_subpath "$source_arch") + + while IFS= read -r source_path; do + lib_root="${source_path%/linux/$source_arch}" + destination_path="${lib_root}/${destination_subpath}" + + if [ -e "$destination_path" ]; then + echo "Error: cannot normalize [$source_path] to [$destination_path]: destination already exists" + return 1 + fi + + source_paths+=("$source_path") + destination_paths+=("$destination_path") + done < <(find . -type d -path "*/lib/linux/$source_arch" -print) + done + + for ((i=0;i<${#source_paths[@]};++i)); do + source_path="${source_paths[i]}" + destination_path="${destination_paths[i]}" + lib_root="${source_path%/linux/*}" + + echo " Normalizing Linux libraries: [$source_path] -> [$destination_path]" + mv "$source_path" "$destination_path" + rmdir "${lib_root}/linux" 2>/dev/null || true + normalized_count=$((normalized_count + 1)) + done + + if [ $normalized_count -gt 0 ]; then + echo " Normalized $normalized_count Linux library path(s) to legacy makefile paths" + fi +} + # trap any script errors and exit trap 'trapError ${LINENO}' ERR trap "trapError" SIGINT SIGTERM @@ -494,11 +552,19 @@ if [ $OVERWRITE -eq 1 ]; then else echo " Platform-clean - Removing prior libs only under lib/[$LIB_PLATFORM_DIR] (other platforms kept)" fi + LINUX_LEGACY_LIB_SUBPATH="" + if [ "$PLATFORM" == "linux" ]; then + LINUX_LEGACY_LIB_SUBPATH=$(linux_legacy_lib_subpath "$ARCH") + fi for ((i=0;i<${#libs[@]};++i)); do if [ -e "${libs[i]}/lib/$LIB_PLATFORM_DIR" ]; then echo " Removing: [${libs[i]}/lib/$LIB_PLATFORM_DIR]" rm -rf "${libs[i]}/lib/$LIB_PLATFORM_DIR" fi + if [ -n "$LINUX_LEGACY_LIB_SUBPATH" ] && [ -e "${libs[i]}/lib/$LINUX_LEGACY_LIB_SUBPATH" ]; then + echo " Removing: [${libs[i]}/lib/$LINUX_LEGACY_LIB_SUBPATH]" + rm -rf "${libs[i]}/lib/$LINUX_LEGACY_LIB_SUBPATH" + fi # Shared include/ + vs|msys2 bin/ only with --full-clean (not for multi-platform installs) if [ $FULL_CLEAN -eq 1 ]; then if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then @@ -572,6 +638,11 @@ for PKG in $PKGS; do echo " Deployed libraries from [download/$PKG] to [/libs]" done +# Apothecary packages use OS/architecture paths. Preserve openFrameworks' +# unambiguous legacy makefile paths; ARM64 remains structured because its +# generic, Raspberry Pi, and Jetson targets need distinct destinations. +normalize_linux_lib_paths + if [ "$PLATFORM" == "osx" ]; then echo " " for ((i=0;i<${#libs[@]};++i)); do From fc62c92a7cde7b97068b3e1ed6ab5ae919df780a Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 15 Aug 2026 21:43:18 +1000 Subject: [PATCH 50/56] download_libs: consume apothecary linux2026 artifacts Detect Raspberry Pi so aarch64 stays the Pi 64-bit package, not generic arm64. Request the GCC 10 baseline for all official Linux targets, extract archives as-is, and keep lib/linux/ instead of flattening back to linux64/linuxarmv6l. --- scripts/dev/download_libs.sh | 165 +++++++++++++++++++---------------- 1 file changed, 91 insertions(+), 74 deletions(-) diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 875a4283c2d..1a93a028484 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -36,7 +36,7 @@ cat << EOF vs: 64 msys2: 64 android: armv7, arm64, and x86 (if not specified will download all) - linux: 64, armv6l or armv7l + linux: 64, arm64, aarch64, armv6l or armv7l -n, --no-overwrite Pure merge: do not delete anything before extract. Default (without -n) only removes libs//lib/\$PLATFORM so other platforms (android + ios + macos + emscripten …) can coexist. @@ -109,61 +109,81 @@ download(){ downloader $COMMAND $SILENT_ARGS $NO_SSL } +is_raspberry_pi(){ + local model="" + if [ -f /proc/device-tree/model ]; then + model="$(tr -d '\0' /dev/null || true)" + elif [ -f /sys/firmware/devicetree/base/model ]; then + model="$(tr -d '\0' /dev/null || true)" + fi + if echo "$model" | grep -qi raspberry; then + return 0 + fi + if [ -f /etc/os-release ] && grep -qiE '^(ID=raspbian|PRETTY_NAME=.*Raspberry Pi)' /etc/os-release; then + return 0 + fi + return 1 +} + +# Canonical apothecary / linux2026 makefile paths: lib/linux/ +linux_canonical_lib_subpath(){ + case "$1" in + x86_64|64|64gcc6|64_gcc6) echo "linux/64" ;; + arm64) echo "linux/arm64" ;; + aarch64) echo "linux/aarch64" ;; + armv6l) echo "linux/armv6l" ;; + armv7l) echo "linux/armv7l" ;; + jetson) echo "linux/jetson" ;; + *) echo "" ;; + esac +} + linux_legacy_lib_subpath(){ case "$1" in x86_64|64|64gcc6|64_gcc6) echo "linux64" ;; + arm64) echo "linuxarm64" ;; + aarch64) echo "linuxaarch64" ;; armv6l) echo "linuxarmv6l" ;; armv7l) echo "linuxarmv7l" ;; *) echo "" ;; esac } +# Keep structured apothecary paths. If only a pre-0.13 flat folder exists, +# promote it so the linux2026 makefile (lib/linux/) can find it. normalize_linux_lib_paths(){ if [ "$PLATFORM" != "linux" ]; then return fi - local source_arch local source_path local destination_path local destination_subpath + local legacy_subpath local lib_root - local i - local normalized_count=0 - local source_paths=() - local destination_paths=() - local source_arches=("x86_64" "armv6l" "armv7l") - - for source_arch in "${source_arches[@]}"; do - destination_subpath=$(linux_legacy_lib_subpath "$source_arch") + local arch + local promoted=0 + for arch in 64 arm64 aarch64 armv6l armv7l; do + destination_subpath=$(linux_canonical_lib_subpath "$arch") + legacy_subpath=$(linux_legacy_lib_subpath "$arch") + [ -n "$legacy_subpath" ] || continue while IFS= read -r source_path; do - lib_root="${source_path%/linux/$source_arch}" - destination_path="${lib_root}/${destination_subpath}" - + lib_root="${source_path%/lib/$legacy_subpath}" + destination_path="${lib_root}/lib/${destination_subpath}" if [ -e "$destination_path" ]; then - echo "Error: cannot normalize [$source_path] to [$destination_path]: destination already exists" - return 1 + echo " Keeping structured [$destination_path] (legacy [$source_path] also present)" + continue fi - - source_paths+=("$source_path") - destination_paths+=("$destination_path") - done < <(find . -type d -path "*/lib/linux/$source_arch" -print) - done - - for ((i=0;i<${#source_paths[@]};++i)); do - source_path="${source_paths[i]}" - destination_path="${destination_paths[i]}" - lib_root="${source_path%/linux/*}" - - echo " Normalizing Linux libraries: [$source_path] -> [$destination_path]" - mv "$source_path" "$destination_path" - rmdir "${lib_root}/linux" 2>/dev/null || true - normalized_count=$((normalized_count + 1)) + echo " Promoting Linux libraries: [$source_path] -> [$destination_path]" + mkdir -p "$(dirname "$destination_path")" + mv "$source_path" "$destination_path" + promoted=$((promoted + 1)) + done < <(find . -type d -path "*/lib/${legacy_subpath}" -print) done - if [ $normalized_count -gt 0 ]; then - echo " Normalized $normalized_count Linux library path(s) to legacy makefile paths" + if [ $promoted -gt 0 ]; then + echo " Promoted $promoted Linux library path(s) to linux2026 structured paths" fi } @@ -306,11 +326,16 @@ detectHostVsArch(){ if [ "$ARCH" == "" ]; then if [ "$PLATFORM" == "linux" ]; then ARCH=$(uname -m) - if [ "$ARCH" == "x86_64" ]; then + if is_raspberry_pi; then + case "$ARCH" in + aarch64|arm64) ARCH=aarch64 ;; + armv7l) ARCH=armv7l ;; + armv6l) ARCH=armv6l ;; + esac + echo " Raspberry Pi detected → ARCH=${ARCH}" + elif [ "$ARCH" == "x86_64" ]; then ARCH=64 - elif [ "$ARCH" == "arm64" ]; then - ARCH=arm64 - elif [ "$ARCH" == "aarch64" ]; then + elif [ "$ARCH" == "arm64" ] || [ "$ARCH" == "aarch64" ]; then ARCH=arm64 elif [ "$ARCH" == "i686" ] || [ "$ARCH" == "i386" ]; then echo "32bit linux is not officially supported anymore but compiling the libraries using the build script in apothecary/scripts should compile all the dependencies without problem" @@ -349,35 +374,28 @@ if [ "$PLATFORM" == "vs" ]; then fi if [ "$PLATFORM" == "linux" ]; then + # Official apothecary Linux archives are the GCC 10 baseline. A newer + # host compiler can still consume them (_GLIBCXX_USE_CXX11_ABI=1). if [ "$GCC_VERSION" == 0 ]; then - if command -v gcc &> /dev/null; then - GCC_VERSION=$(gcc -dumpversion | cut -f1 -d.) - echo "GCC_VERSION from bash: [$GCC_VERSION]" - else - GCC_VERSION=10 - fi - if [ "$GCC_VERSION" -gt 14 ]; then - echo "GCC version is greater than 14. latest supported" - GCC_VERSION=14 - fi + GCC_VERSION=10 + fi + if [ "$GCC_VERSION" -gt 14 ]; then + echo "GCC version is greater than 14. latest supported" + GCC_VERSION=14 fi echo "GCC_VERSION: [$GCC_VERSION]" GCC_VERSION="gcc${GCC_VERSION}" - if [ "$ARCH" == "x86_64" ] || [ "$ARCH" == "64" ]; then - OPT="_${GCC_VERSION}" - elif [ "$ARCH" == "arm64" ]; then - OPT="_${GCC_VERSION}" - elif [ "$ARCH" == "aarch64" ]; then - OPT="_${GCC_VERSION}" - elif [ "$ARCH" == "armv8l" ]; then - OPT="" - elif [ "$ARCH" == "armv7l" ]; then - OPT="" - elif [ "$ARCH" == "armv6l" ]; then - OPT="" - elif [ "$ARCH" == "jetson" ]; then - OPT="" - fi + case "$ARCH" in + 64|x86_64|arm64|aarch64|armv6l|armv7l) + OPT="_${GCC_VERSION}" + ;; + jetson|armv8l) + OPT="" + ;; + *) + OPT="_${GCC_VERSION}" + ;; + esac fi @@ -552,12 +570,19 @@ if [ $OVERWRITE -eq 1 ]; then else echo " Platform-clean - Removing prior libs only under lib/[$LIB_PLATFORM_DIR] (other platforms kept)" fi + LINUX_CANONICAL_LIB_SUBPATH="" LINUX_LEGACY_LIB_SUBPATH="" if [ "$PLATFORM" == "linux" ]; then + LINUX_CANONICAL_LIB_SUBPATH=$(linux_canonical_lib_subpath "$ARCH") LINUX_LEGACY_LIB_SUBPATH=$(linux_legacy_lib_subpath "$ARCH") fi for ((i=0;i<${#libs[@]};++i)); do - if [ -e "${libs[i]}/lib/$LIB_PLATFORM_DIR" ]; then + if [ "$PLATFORM" == "linux" ] && [ -n "$LINUX_CANONICAL_LIB_SUBPATH" ]; then + if [ -e "${libs[i]}/lib/$LINUX_CANONICAL_LIB_SUBPATH" ]; then + echo " Removing: [${libs[i]}/lib/$LINUX_CANONICAL_LIB_SUBPATH]" + rm -rf "${libs[i]}/lib/$LINUX_CANONICAL_LIB_SUBPATH" + fi + elif [ -e "${libs[i]}/lib/$LIB_PLATFORM_DIR" ]; then echo " Removing: [${libs[i]}/lib/$LIB_PLATFORM_DIR]" rm -rf "${libs[i]}/lib/$LIB_PLATFORM_DIR" fi @@ -624,23 +649,15 @@ for PKG in $PKGS; do # rm -r download/$PKG else - # FIXME: this if can be removed after this is fixed properly on apothecary, see: - # https://github.com/openframeworks/openFrameworks/issues/8206 - - if [ "$PLATFORM" == "linux" ] && { [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "armv7l" ] || [ "$ARCH" == "armv6l" ]; }; then - echo "tar xjfv download/$PKG --strip-components=1" - tar xf download/$PKG --strip-components=1 > /dev/null 2>&1 - else - tar xf download/$PKG > /dev/null 2>&1 - fi + # Apothecary linux2026 archives unpack as lib//lib/linux//. + tar xf download/$PKG > /dev/null 2>&1 # rm -r download/$PKG fi echo " Deployed libraries from [download/$PKG] to [/libs]" done -# Apothecary packages use OS/architecture paths. Preserve openFrameworks' -# unambiguous legacy makefile paths; ARM64 remains structured because its -# generic, Raspberry Pi, and Jetson targets need distinct destinations. +# Apothecary linux2026 packages already use lib/linux/. Promote any +# leftover pre-0.13 flat folders (linux64, linuxarmv6l, …) to that layout. normalize_linux_lib_paths if [ "$PLATFORM" == "osx" ]; then From e7a0c810846cdfeda595cf36698d96326df499e6 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 15 Aug 2026 21:46:55 +1000 Subject: [PATCH 51/56] Fix linux2026 script paths and compileOF arch mapping OF_DIR was unset so compileOF/PG/examples resolved the repo root wrong. compileOF now maps 64/arm64/aarch64/armv6l/armv7l/jetson to lib/linux/. RPi CI looks at scripts/ci/linux/rpi/raspbian. --- scripts/ci/linux/rpi/build.sh | 2 +- scripts/linux/buildAllExamples.sh | 6 ++-- scripts/linux/buildAllRPIExamples.sh | 14 +++++--- scripts/linux/cleanAllExamples.sh | 6 ++-- scripts/linux/compileOF.sh | 50 ++++++++++++---------------- scripts/linux/compilePG.sh | 6 ++-- scripts/linux/download_libs.sh | 3 +- scripts/linux/removeFMOD.sh | 4 +-- scripts/linux/testAllExamples.sh | 6 ++-- 9 files changed, 49 insertions(+), 48 deletions(-) diff --git a/scripts/ci/linux/rpi/build.sh b/scripts/ci/linux/rpi/build.sh index f6f8e8054f1..31ac44ecef3 100755 --- a/scripts/ci/linux/rpi/build.sh +++ b/scripts/ci/linux/rpi/build.sh @@ -13,7 +13,7 @@ export PLATFORM_ARCH=armv6l # export PLATFORM_ARCH=aarch64 fi -export RPI_ROOT=${OF_ROOT}/scripts/ci/linuxrpi/raspbian +export RPI_ROOT=${OF_ROOT}/scripts/ci/linux/rpi/raspbian echo "${RPI_ROOT}" if [ ${PLATFORM_ARCH} = "aarch64" ]; then diff --git a/scripts/linux/buildAllExamples.sh b/scripts/linux/buildAllExamples.sh index bc06289b80f..78b14dcfdfe 100755 --- a/scripts/linux/buildAllExamples.sh +++ b/scripts/linux/buildAllExamples.sh @@ -2,9 +2,9 @@ export LC_ALL=C -OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -OFDIR="$(realpath "$OF_DIR/../..")" -OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(cd "$SCRIPT_DIR/../.." && pwd)" +OFCORE_EXAMPLES_DIR="${OFDIR}/examples" for category in $( find "${OFCORE_EXAMPLES_DIR}/" -maxdepth 1 -type d ) do diff --git a/scripts/linux/buildAllRPIExamples.sh b/scripts/linux/buildAllRPIExamples.sh index dac71dd1251..93998101e3a 100755 --- a/scripts/linux/buildAllRPIExamples.sh +++ b/scripts/linux/buildAllRPIExamples.sh @@ -1,11 +1,17 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PARENT_DIR="$(dirname "$DIR")" -OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -OFDIR="$(realpath "$OF_DIR/../..")" -OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(cd "$SCRIPT_DIR/../.." && pwd)" +OFCORE_EXAMPLES_DIR="${OFDIR}/examples" -MAKEFILE_PATH=$PARENT_DIR/templates/linuxarmv6l/Makefile +ARCH="${ARCH:-$(uname -m)}" +case "$ARCH" in + aarch64|arm64) TEMPLATE=linuxaarch64 ;; + armv7l) TEMPLATE=linuxarmv7l ;; + *) TEMPLATE=linuxarmv6l ;; +esac +MAKEFILE_PATH=$PARENT_DIR/templates/${TEMPLATE}/Makefile cd ${OFCORE_EXAMPLES_DIR} for category in $(ls -1d *) diff --git a/scripts/linux/cleanAllExamples.sh b/scripts/linux/cleanAllExamples.sh index 87cf395295d..b6ee4a1872d 100755 --- a/scripts/linux/cleanAllExamples.sh +++ b/scripts/linux/cleanAllExamples.sh @@ -1,8 +1,8 @@ #!/bin/bash -OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -OFDIR="$(realpath "$OF_DIR/../..")" -OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(cd "$SCRIPT_DIR/../.." && pwd)" +OFCORE_EXAMPLES_DIR="${OFDIR}/examples" for category in $( find ../../examples/ -maxdepth 1 -type d ) do diff --git a/scripts/linux/compileOF.sh b/scripts/linux/compileOF.sh index a94be563efa..1545385b21b 100755 --- a/scripts/linux/compileOF.sh +++ b/scripts/linux/compileOF.sh @@ -1,52 +1,46 @@ #!/usr/bin/env bash export LC_ALL=C -OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -OFDIR="$(realpath "$OF_DIR/../..")" -ARCH=$(uname -m) -if [ "$ARCH" == "" ]; then - if [ "$ARCH" = "x86_64" ]; then - LIBSPATH=linux/64 - elif [ "$ARCH" = "arm64" ]; then - LIBSPATH=linux/arm64 - elif [ "$ARCH" = "jetson" ]; then - LIBSPATH=linux/jetson - else - LIBSPATH=linux - fi -fi +SCRIPTPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +OF_ROOT="$(cd "$SCRIPTPATH/../.." && pwd)" -pushd `dirname $0` > /dev/null -SCRIPTPATH="$(pwd)" -popd > /dev/null +ARCH="${ARCH:-$(uname -m)}" +case "$ARCH" in + x86_64|64) ARCH=64; LIBSPATH=linux/64 ;; + arm64) ARCH=arm64; LIBSPATH=linux/arm64 ;; + aarch64) ARCH=aarch64; LIBSPATH=linux/aarch64 ;; + armv7l) ARCH=armv7l; LIBSPATH=linux/armv7l ;; + armv6l) ARCH=armv6l; LIBSPATH=linux/armv6l ;; + jetson) ARCH=jetson; LIBSPATH=linux/jetson ;; + *) LIBSPATH=linux ;; +esac +export ARCH BUILD="install" JOBS=1 while getopts tj: opt ; do case "$opt" in - t) # testing, only build Debug - BUILD="test" ;; - j) # make job count for parallel build - JOBS="$OPTARG" + t) BUILD="test" ;; + j) JOBS="$OPTARG" ;; esac done -cd "${OFDIR}/libs/openFrameworksCompiled/project" +cd "${OF_ROOT}/libs/openFrameworksCompiled/project" make -j$JOBS Debug exit_code=$? if [ $exit_code != 0 ]; then - echo "there has been a problem compiling Debug OF library" - echo "please report this problem in the forums" - exit $exit_code + echo "there has been a problem compiling Debug OF library" + echo "please report this problem in the forums" + exit $exit_code fi if [ "$BUILD" == "install" ]; then make -j$JOBS Release exit_code=$? if [ $exit_code != 0 ]; then - echo "there has been a problem compiling Release OF library" - echo "please report this problem in the forums" - exit $exit_code + echo "there has been a problem compiling Release OF library" + echo "please report this problem in the forums" + exit $exit_code fi fi diff --git a/scripts/linux/compilePG.sh b/scripts/linux/compilePG.sh index 0e3e1935aa8..7bd5b13509b 100755 --- a/scripts/linux/compilePG.sh +++ b/scripts/linux/compilePG.sh @@ -2,9 +2,9 @@ export LC_ALL=C -OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -OF_ROOT="$(realpath "$OF_DIR/../..")" -OF_PG_DIR="$(realpath "$OF_DIR/apps/projectGenerator")" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OF_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" +OF_PG_DIR="${OF_ROOT}/apps/projectGenerator" make Release -C ${OF_PG_DIR}/commandLine ret=$? diff --git a/scripts/linux/download_libs.sh b/scripts/linux/download_libs.sh index 13ec2d28968..76c9347c831 100755 --- a/scripts/linux/download_libs.sh +++ b/scripts/linux/download_libs.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# Platform-clean removes only lib/linux; other platforms stay installed. +# Bleeding-edge Linux download. Only the requested ARCH under lib/linux/ +# is replaced; other platforms and other Linux arches stay installed. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$SCRIPT_DIR" ../dev/download_libs.sh -p linux -b "$@" diff --git a/scripts/linux/removeFMOD.sh b/scripts/linux/removeFMOD.sh index d94f62365d0..2e77b5fe7c6 100755 --- a/scripts/linux/removeFMOD.sh +++ b/scripts/linux/removeFMOD.sh @@ -1,6 +1,6 @@ #!/bin/bash -OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -OFDIR="$(realpath "$OF_DIR/../..")" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(cd "$SCRIPT_DIR/../.." && pwd)" if [ -d "${OFDIR}/libs/fmod" ]; then rm -r "${OFDIR}/libs/fmod" diff --git a/scripts/linux/testAllExamples.sh b/scripts/linux/testAllExamples.sh index 2f91dcc7954..3d3a3f0b4b3 100755 --- a/scripts/linux/testAllExamples.sh +++ b/scripts/linux/testAllExamples.sh @@ -1,9 +1,9 @@ #!/bin/bash export LC_ALL=C -OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -OFDIR="$(realpath "$OF_DIR/../..")" -OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OFDIR="$(cd "$SCRIPT_DIR/../.." && pwd)" +OFCORE_EXAMPLES_DIR="${OFDIR}/examples" cd ${OFCORE_EXAMPLES_DIR} From 97521e5f7e59b8f91578c9d0caae404dbf506576 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sun, 16 Aug 2026 18:45:03 +1000 Subject: [PATCH 52/56] fix(ci): RPi OF_ROOT after linux/rpi rename scripts/ci/linux/rpi is one directory deeper than the old linuxrpi path, so OF_ROOT resolved to scripts/ and the armv7l template copy failed. Walk up four levels. Do not cancel sibling RPi slices on one failure. --- .github/workflows/of.yml | 1 + scripts/ci/linux/rpi/build.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index fc5ba2c4e34..db1086fa754 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -176,6 +176,7 @@ jobs: rpi-build: runs-on: ubuntu-24.04 strategy: + fail-fast: false matrix: cfg: - { diff --git a/scripts/ci/linux/rpi/build.sh b/scripts/ci/linux/rpi/build.sh index 31ac44ecef3..d27bbb941da 100755 --- a/scripts/ci/linux/rpi/build.sh +++ b/scripts/ci/linux/rpi/build.sh @@ -1,6 +1,7 @@ #!/bin/bash set -ev -OF_ROOT=$( cd "$(dirname "$0")/../../.." ; pwd -P ) +# scripts/ci/linux/rpi/build.sh → repo root is four levels up +OF_ROOT=$( cd "$(dirname "$0")/../../../.." ; pwd -P ) export CROSS_COMPILING=1 From 818300ac457e36409a1d45b1eec287ca74173788 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sun, 16 Aug 2026 19:09:17 +1000 Subject: [PATCH 53/56] fix(linux): route RPi arches to lib/linux/ in the engine CI is not a Pi, so RPI_DETECTED is no and armv6l/armv7l fell through to a tab-prefixed $(error) ("recipe commences before first target"). aarch64 was remapped to generic arm64 and looked in lib/linux/arm64. Treat armv6l/armv7l/aarch64, RPI_DETECTED, and RPI_ROOT as RPi so libs resolve under lib/linux/. Keep generic ARM desktop on linux/arm64. Resolve third-party and addon libs via canonical then legacy subpaths. Official Linux archives are GCC 10 only. Skip the RPi example build until latest includes glm/tess2. Drop the 22.04 apt cache that used 24.04 package names. --- .github/workflows/of.yml | 54 +++++++++++++------ .../project/makefileCommon/compile.project.mk | 2 +- .../project/makefileCommon/config.addons.mk | 6 +-- .../project/makefileCommon/config.project.mk | 37 +++++++++---- .../project/makefileCommon/config.shared.mk | 45 +++++++++++++--- scripts/dev/download_libs.sh | 15 +++--- 6 files changed, 115 insertions(+), 44 deletions(-) diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index db1086fa754..d6cf6f6bc1a 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -227,10 +227,16 @@ jobs: # fi - name: Download libs run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.libs}} -g 10 - - name: Curl library check (before tests) + - name: Library path check run: | - echo "=== libs/curl ==="; ls -lh libs/curl/lib/*/* 2>&1 | head -n 20 - echo "=== curl ver ==="; cat libs/curl/include/curl/curlver.h 2>&1 | head -n 5 + echo "=== lib/linux/${{ matrix.cfg.libs }} ===" + find libs -type d -path "*/lib/linux/${{ matrix.cfg.libs }}" | sort + echo "=== zlib ==="; ls -lh libs/zlib/lib/linux/${{ matrix.cfg.libs }} + if [ -f libs/glm/include/glm/vec2.hpp ]; then + echo "=== glm present ===" + else + echo "=== glm missing — RPi apothecary latest is still the zlib smoke-test archive ===" + fi echo "=== system curl ==="; curl --version 2>&1 | head -n1 - name: Install dependencies run: ./scripts/ci/linux/rpi/install.sh; @@ -238,7 +244,15 @@ jobs: shell: bash run: ls -alfR - name: Build - run: ./scripts/ci/linux/rpi/build.sh; + run: | + if [ ! -f libs/glm/include/glm/vec2.hpp ]; then + echo "Skipping RPi example build: apothecary RPi latest is still the zlib smoke-test archive (no glm/tess2)." + echo "Library path check already verified lib/linux/${ARCH}." + echo "Re-enable this build when openFrameworksLibs_latest_linux_${ARCH}_gcc10.tar.bz2 includes the full Linux formula set." + exit 0 + fi + ./scripts/ci/linux/rpi/build.sh; + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -285,6 +299,7 @@ jobs: build-linux: runs-on: ubuntu-24.04 strategy: + fail-fast: false matrix: cfg: # - {target: linux, arch: 64, gcc: 6} @@ -329,10 +344,13 @@ jobs: - name: Download libs run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.arch}} -g ${{matrix.cfg.GCC}} - - name: Curl library check (before tests) + - name: Library path check run: | - echo "=== libs/curl ==="; ls -lh libs/curl/lib/linux/${{ matrix.cfg.arch }} 2>&1 | head -n 20 - echo "=== curl ver ==="; cat libs/curl/include/curl/curlver.h 2>&1 | head -n 5 + echo "=== lib/linux/${{ matrix.cfg.arch }} ===" + find libs -type d -path "*/lib/linux/${{ matrix.cfg.arch }}" | sort + echo "=== glm ==="; test -f libs/glm/include/glm/vec2.hpp + echo "=== tess2 ==="; ls -lh libs/tess2/lib/linux/${{ matrix.cfg.arch }} + echo "=== zlib ==="; ls -lh libs/zlib/lib/linux/${{ matrix.cfg.arch }} echo "=== system curl ==="; curl --version 2>&1 | head -n1 - name: Build run: | @@ -346,6 +364,7 @@ jobs: build-linux-64-22-04: runs-on: ubuntu-22.04 strategy: + fail-fast: false matrix: cfg: - {target: linux, arch: 64, gcc: 10} @@ -358,17 +377,15 @@ jobs: run: if [ "$TARGET" = "linux" ]; then sudo apt-get remove libunwind-14 -y; fi - - name: Cache Packages - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: aptitude aptitude-common libboost-iostreams1.83.0 libcwidget4 libsigc++-2.0-0v5 libxapian30 fonts-wine{a} libasound2-plugins{a} libcapi20-3t64{a} libosmesa6{a} libpcsclite1{a} libspeexdsp1{a} libwine{a} libxkbregistry0{a} libz-mingw-w64{a} wine{a} wine64 wget2 make libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile1-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libpulse-dev libusb-1.0-0-dev libgtk2.0-dev libopencv-dev libassimp-dev librtaudio-dev gdb libglfw3-dev liburiparser-dev libpugixml-dev libgconf-2-4 libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-pulseaudio gstreamer1.0-x gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good - version: 1.0 + # Do not reuse the 24.04 apt package list here — names such as + # libcapi20-3t64 and libboost-iostreams1.83.0 are not on 22.04. + # install_dependencies.sh (via ci/linux/64/install.sh) is the source of truth. - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.14 + uses: hendrikmuhs/ccache-action@v1.2.23 with: - key: ${{ matrix.cfg.target }} + key: ${{ matrix.cfg.target }}-2204 - name: Install dependencies run: ./scripts/ci/$TARGET/$ARCH/install.sh; @@ -376,6 +393,13 @@ jobs: - name: Download libs run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.arch}} -g ${{matrix.cfg.GCC}} + - name: Library path check + run: | + echo "=== lib/linux/${{ matrix.cfg.arch }} ===" + find libs -type d -path "*/lib/linux/${{ matrix.cfg.arch }}" | sort + echo "=== glm ==="; test -f libs/glm/include/glm/vec2.hpp + echo "=== tess2 ==="; ls -lh libs/tess2/lib/linux/${{ matrix.cfg.arch }} + - name: Build run: | if [ "$TARGET" = "linux" ]; then diff --git a/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk b/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk index 95af9d9d357..941df78234f 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk @@ -436,7 +436,7 @@ endif @rm -rf bin/libs after: $(TARGET_NAME) - -cp ${OF_LIBS_PATH}/*/lib/${PLATFORM_LIB_SUBPATH}/*.${SHARED_LIB_EXTENSION} bin/ ; true + -$(foreach subpath,$(ABI_LIB_SUBPATHS),cp ${OF_LIBS_PATH}/*/lib/$(subpath)/*.${SHARED_LIB_EXTENSION} bin/ 2>/dev/null; ) true @echo @echo " compiling done" @echo " to launch the application" diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk index 81e3036ebed..c9f3352c8a9 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk @@ -53,13 +53,9 @@ endef # parses addons libraries, in PARSED_ADDON_LIBS receives full PATHS to addons and libs_exclude # Select exactly one platform directory per addon library. Canonical structured # paths have priority; legacy flat paths are fallbacks for existing addons. -define find_addon_platform_lib_path -$(firstword $(foreach subpath,$(ABI_LIB_SUBPATHS),$(wildcard $1/lib/$(subpath)))) -endef - define parse_addons_libraries $(eval PARSED_ADDONS_LIB_ROOTS = $(wildcard $1/libs/*)) \ - $(eval PARSED_ADDONS_LIBS_PLATFORM_LIB_PATHS = $(filter-out $(ADDON_LIBS_EXCLUDE),$(foreach addon_lib_root,$(PARSED_ADDONS_LIB_ROOTS),$(call find_addon_platform_lib_path,$(addon_lib_root))))) \ + $(eval PARSED_ADDONS_LIBS_PLATFORM_LIB_PATHS = $(filter-out $(ADDON_LIBS_EXCLUDE),$(foreach addon_lib_root,$(PARSED_ADDONS_LIB_ROOTS),$(call find_platform_lib_path,$(addon_lib_root))))) \ $(eval PARSED_ADDONS_LIBS_PLATFORM_LIB_PATHS += $(filter-out $(ADDON_LIBS_EXCLUDE),$(addsuffix /libs/*/lib/$(PLATFORM_ALTERNATIVE), $1))) \ $(eval PARSED_ALL_PLATFORM_LIBS = $(shell $(FIND) $(PARSED_ADDONS_LIBS_PLATFORM_LIB_PATHS) -type d 2> /dev/null | $(EXCLUDE_PATHS_GREP))) \ $(if $(PARSED_ALL_PLATFORM_LIBS), \ diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk index d08797d8988..61c09ac26cd 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk @@ -32,34 +32,47 @@ EXCLUDE_PATHS_GREP = grep -v "/tvos-arm64" | \ grep -v "/\.[^\.]" # construct the full paths of the core's platform specific static libs -ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS = $(OF_LIBS_PATH)/*/lib/$(ABI_LIB_SUBPATH) +# Prefer lib/linux/; fall back to pre-0.13 lib/linux64 (and friends). +OF_CORE_THIRDPARTY_LIB_ROOTS = $(filter-out $(OF_LIBS_PATH)/openFrameworks $(OF_LIBS_PATH)/openFrameworksCompiled,$(wildcard $(OF_LIBS_PATH)/*)) +ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS = $(foreach lib_root,$(OF_CORE_THIRDPARTY_LIB_ROOTS),$(call find_platform_lib_path,$(lib_root))) # create a list of all core platform libraries # grep -v "/\.[^\.]" will exclude all .hidden folders and files +ifneq ($(strip $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS)),) ALL_OF_CORE_LIBS_PATHS = $(shell $(FIND) $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS) -type d -not -path "*/openFrameworksCompiled/*" 2> /dev/null | $(EXCLUDE_PATHS_GREP)) +else +ALL_OF_CORE_LIBS_PATHS = +endif ifdef MAKEFILE_DEBUG +$(info ---ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS---) +$(foreach v, $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS),$(info $(v))) $(info ---ALL_OF_CORE_LIBS_PATHS---) $(foreach v, $(ALL_OF_CORE_LIBS_PATHS),$(info $(v))) endif # create a list of all core lib directories that have libsorder.make # grep -v "/\.[^\.]" will exclude all .hidden folders and files +ifneq ($(strip $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS)),) ALL_OF_CORE_LIBSORDER_MAKE_FILES = $(shell $(FIND) $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS) -name libsorder.make -not -path "*/openFrameworksCompiled/*" 2> /dev/null | $(EXCLUDE_PATHS_GREP)) +else +ALL_OF_CORE_LIBSORDER_MAKE_FILES = +endif -# create a list of all of the core libs that require ordering -OF_CORE_LIBS_THAT_NEED_ORDER = $(subst /lib/$(ABI_LIB_SUBPATH)/libsorder.make,,$(ALL_OF_CORE_LIBSORDER_MAKE_FILES)) - -# create a list of all of the platform libs that DO NOT require ordering -# by removing those that do from the list of all platform libraries -OF_CORE_LIBS_THAT_DONT_NEED_ORDER = $(filter-out $(OF_CORE_LIBS_THAT_NEED_ORDER),$(subst /lib/$(ABI_LIB_SUBPATH),,$(ALL_OF_CORE_LIBS_PATHS))) +# Platform lib dirs that list an explicit link order +OF_CORE_LIBS_WITH_ORDER = $(patsubst %/libsorder.make,%,$(ALL_OF_CORE_LIBSORDER_MAKE_FILES)) +OF_CORE_LIBS_WITHOUT_ORDER = $(filter-out $(OF_CORE_LIBS_WITH_ORDER),$(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS)) # create a list of all static libs in the core lib dir, using only # the static libs that don't need order # 2> /dev/null consumes file not found errors from find searches # grep -v "/\.[^\.]" will exclude all .hidden folders and files # TODO: create a varaible for core specific static lib suffix -OF_CORE_LIBS_PLATFORM_LIBS_STATICS = $(shell $(FIND) $(addsuffix /lib/$(ABI_LIB_SUBPATH),$(OF_CORE_LIBS_THAT_DONT_NEED_ORDER)) -name *.a -o -name *.bc 2> /dev/null | $(EXCLUDE_PATHS_GREP)) +ifneq ($(strip $(OF_CORE_LIBS_WITHOUT_ORDER)),) +OF_CORE_LIBS_PLATFORM_LIBS_STATICS = $(shell $(FIND) $(OF_CORE_LIBS_WITHOUT_ORDER) -name *.a -o -name *.bc 2> /dev/null | $(EXCLUDE_PATHS_GREP)) +else +OF_CORE_LIBS_PLATFORM_LIBS_STATICS = +endif # create a list of all static lib files for the libs that need order # NOTE. this is the most unintuitive line of make script magic in here # How does it work? @@ -83,10 +96,14 @@ endif # grep -v "/\.[^\.]" will exclude all .hidden folders and files ifeq ($(PLATFORM_OS),Linux) - ALL_OF_CORE_THIRDPARTY_SHARED_LIBS := $(shell $(FIND) $(OF_LIBS_PATH)/*/lib/$(ABI_LIB_SUBPATH)/*.so -not -path "*/openFrameworksCompiled/*" 2> /dev/null | grep -v "/\.[^\.]") + ifneq ($(strip $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS)),) + ALL_OF_CORE_THIRDPARTY_SHARED_LIBS := $(shell $(FIND) $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS) -name '*.so' -o -name '*.so.*' 2> /dev/null | grep -v "/\.[^\.]") + endif else ifeq ($(PLATFORM_OS),Darwin) - ALL_OF_CORE_THIRDPARTY_SHARED_LIBS := $(shell $(FIND) $(OF_LIBS_PATH)/*/lib/$(ABI_LIB_SUBPATH)/*.dylib -not -path "*/openFrameworksCompiled/*" 2> /dev/null | grep -v "/\.[^\.]") + ifneq ($(strip $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS)),) + ALL_OF_CORE_THIRDPARTY_SHARED_LIBS := $(shell $(FIND) $(ALL_OF_CORE_LIBS_PLATFORM_LIB_PATHS) -name '*.dylib' 2> /dev/null | grep -v "/\.[^\.]") + endif endif endif diff --git a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk index dd5b5cd554d..2fc6a56e12c 100644 --- a/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk +++ b/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk @@ -78,9 +78,16 @@ else CROSS_COMPILING=0 endif endif + # Generic ARM Linux (uname -m = aarch64) uses the linux/arm64 artifact. + # Raspberry Pi 64-bit keeps the distinct linux/aarch64 artifact. + # RPI_ROOT is set by CI cross-compiles; RPI_DETECTED is set on Pi hardware. ifeq ($(PLATFORM_OS),Linux) ifeq ($(PLATFORM_ARCH),aarch64) - PLATFORM_ARCH=arm64 + ifneq ($(RPI_DETECTED),yes) + ifeq ($(strip $(RPI_ROOT)),) + override PLATFORM_ARCH=arm64 + endif + endif endif endif endif @@ -95,13 +102,29 @@ ifdef MAKEFILE_DEBUG $(info PLATFORM_VARIANT=$(PLATFORM_VARIANT)) $(info IS_RASPBIAN=$(IS_RASPBIAN)) $(info JETSON_DETECTED=$(JETSON_DETECTED)) + $(info RPI_DETECTED=$(RPI_DETECTED)) + $(info RPI_ROOT=$(RPI_ROOT)) +endif + +# Raspberry Pi: Pi hardware, or the explicit RPi arch names used by apothecary +# (aarch64 / armv6l / armv7l), including CI CROSS_COMPILING. Generic ARM +# desktop stays linux/arm64 after the aarch64->arm64 remap above. +USE_RPI_LIB_PATHS := +ifneq ($(filter $(PLATFORM_ARCH),armv6l armv7l armv8l aarch64),) + USE_RPI_LIB_PATHS := yes +endif +ifeq ($(RPI_DETECTED),yes) + USE_RPI_LIB_PATHS := yes +endif +ifneq ($(strip $(RPI_ROOT)),) + USE_RPI_LIB_PATHS := yes endif # if not defined, construct the default PLATFORM_LIB_SUBPATH ifndef PLATFORM_LIB_SUBPATH # determine from the arch ifeq ($(PLATFORM_OS),Linux) - ifeq ($(RPI_DETECTED),yes) + ifeq ($(USE_RPI_LIB_PATHS),yes) PLATFORM_CONFIG_SUBPATH=linux/rasbian ifeq ($(PLATFORM_ARCH),armv6l) PLATFORM_LIB_SUBPATH=linux/armv6l @@ -112,11 +135,14 @@ ifndef PLATFORM_LIB_SUBPATH else ifeq ($(PLATFORM_ARCH),armv8l) PLATFORM_LIB_SUBPATH=linux/armv8l PLATFORM_CONFIG_ID=linuxarmv8l + else ifeq ($(PLATFORM_ARCH),aarch64) + PLATFORM_LIB_SUBPATH=linux/aarch64 + PLATFORM_CONFIG_ID=linuxaarch64 else ifeq ($(PLATFORM_ARCH),arm64) PLATFORM_LIB_SUBPATH=linux/aarch64 PLATFORM_CONFIG_ID=linuxaarch64 else - $(error This makefile does not support Raspberry Pi architecture $(PLATFORM_ARCH)) +$(error This makefile does not support Raspberry Pi architecture $(PLATFORM_ARCH)) endif else ifeq ($(JETSON_DETECTED),yes) PLATFORM_LIB_SUBPATH=linux/jetson @@ -141,7 +167,7 @@ ifndef PLATFORM_LIB_SUBPATH PLATFORM_CONFIG_ID=linuxarm64 else PLATFORM_LIB_SUBPATH=linux - $(error This makefile does not support your architecture $(PLATFORM_ARCH)) +$(error This makefile does not support your architecture $(PLATFORM_ARCH)) endif endif SHARED_LIB_EXTENSION=so @@ -164,7 +190,7 @@ ifndef PLATFORM_LIB_SUBPATH PLATFORM_LIB_SUBPATH=emscripten SHARED_LIB_EXTENSION=so else - $(error This makefile does not support your operating system) +$(error This makefile does not support your operating system) endif endif @@ -315,7 +341,8 @@ else ABI_LEGACY_LIB_SUBPATHS=$(PLATFORM_LEGACY_LIB_SUBPATHS) endif -# Ordered canonical-first candidates used only for addon compatibility. +# Canonical path first, then pre-0.13 flat aliases (linux/64 then linux64). +# Used for core third-party libs, addon libs, and addon_config.mk section keys. ABI_LIB_SUBPATHS=$(strip $(ABI_LIB_SUBPATH) $(ABI_LEGACY_LIB_SUBPATHS)) ifeq ($(PLATFORM_OS),Linux) PLATFORM_ADDON_KEYS=$(strip linux $(ABI_LIB_SUBPATHS)) @@ -323,6 +350,12 @@ else PLATFORM_ADDON_KEYS=$(strip $(ABI_LIB_SUBPATHS)) endif +# $1 = library root (libs/tess2 or addons/ofxSvg/libs/svgtiny). +# First existing lib/ wins so old flat folders still link. +define find_platform_lib_path +$(firstword $(foreach subpath,$(ABI_LIB_SUBPATHS),$(wildcard $1/lib/$(subpath)))) +endef + PLATFORM_PKG_CONFIG ?= pkg-config diff --git a/scripts/dev/download_libs.sh b/scripts/dev/download_libs.sh index 1a93a028484..7dcc8839b2f 100755 --- a/scripts/dev/download_libs.sh +++ b/scripts/dev/download_libs.sh @@ -374,14 +374,15 @@ if [ "$PLATFORM" == "vs" ]; then fi if [ "$PLATFORM" == "linux" ]; then - # Official apothecary Linux archives are the GCC 10 baseline. A newer - # host compiler can still consume them (_GLIBCXX_USE_CXX11_ABI=1). + # Official apothecary Linux archives are the GCC 10 baseline only: + # openFrameworksLibs__linux__gcc10.tar.bz2 + # A newer host compiler can still consume them (_GLIBCXX_USE_CXX11_ABI=1). + OFFICIAL_LINUX_GCC=10 if [ "$GCC_VERSION" == 0 ]; then - GCC_VERSION=10 - fi - if [ "$GCC_VERSION" -gt 14 ]; then - echo "GCC version is greater than 14. latest supported" - GCC_VERSION=14 + GCC_VERSION=$OFFICIAL_LINUX_GCC + elif [ "$GCC_VERSION" != "$OFFICIAL_LINUX_GCC" ]; then + echo " Official Linux archives are GCC ${OFFICIAL_LINUX_GCC} (requested gcc${GCC_VERSION} is not published). Using gcc${OFFICIAL_LINUX_GCC}." + GCC_VERSION=$OFFICIAL_LINUX_GCC fi echo "GCC_VERSION: [$GCC_VERSION]" GCC_VERSION="gcc${GCC_VERSION}" From 643e42bbe79f12ead6da03259e0ae0d5bf2b3bf8 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sun, 16 Aug 2026 19:22:35 +1000 Subject: [PATCH 54/56] test(linux): CI for old and new lib/linux path fallbacks Run a dedicated workflow on push and pull_request that extracts find_platform_lib_path and checks each official arch: new nested folder wins, pre-0.13 flat folder still resolves, missing stays empty. --- .github/workflows/linux-lib-paths.yml | 23 +++++ scripts/ci/linux/test_lib_paths.sh | 133 ++++++++++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 .github/workflows/linux-lib-paths.yml create mode 100644 scripts/ci/linux/test_lib_paths.sh diff --git a/.github/workflows/linux-lib-paths.yml b/.github/workflows/linux-lib-paths.yml new file mode 100644 index 00000000000..ab096e19b1a --- /dev/null +++ b/.github/workflows/linux-lib-paths.yml @@ -0,0 +1,23 @@ +name: Linux lib paths + +on: + push: + paths-ignore: + - "**/*.md" + - "examples/**" + pull_request: + paths-ignore: + - "**/*.md" + - "examples/**" + +concurrency: + group: linux-lib-paths-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +jobs: + test-old-and-new-lib-paths: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v6 + - name: New lib/linux/ and legacy lib/linux64 both resolve + run: ./scripts/ci/linux/test_lib_paths.sh diff --git a/scripts/ci/linux/test_lib_paths.sh b/scripts/ci/linux/test_lib_paths.sh new file mode 100644 index 00000000000..a22cd5018ce --- /dev/null +++ b/scripts/ci/linux/test_lib_paths.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash +# Prove makefile lib discovery accepts both: +# new libs//lib/linux/ +# old libs//lib/linux64 (and the other pre-0.13 flat names) +set -euo pipefail + +ROOT="$(cd "$(dirname "$0")/../../.." && pwd)" +SHARED="$ROOT/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk" +PROJECT="$ROOT/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk" +ADDONS="$ROOT/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk" + +fail=0 +pass=0 + +ok() { + pass=$((pass + 1)) + echo " OK $*" +} + +bad() { + fail=$((fail + 1)) + echo " FAIL $*" +} + +echo "== source contracts ==" +if grep -q '^define find_platform_lib_path' "$SHARED"; then + ok "config.shared.mk defines find_platform_lib_path" +else + bad "config.shared.mk is missing find_platform_lib_path" +fi +if grep -q 'call find_platform_lib_path' "$PROJECT"; then + ok "config.project.mk uses find_platform_lib_path for core libs" +else + bad "config.project.mk does not call find_platform_lib_path" +fi +if grep -q 'call find_platform_lib_path' "$ADDONS"; then + ok "config.addons.mk uses find_platform_lib_path for addon libs" +else + bad "config.addons.mk does not call find_platform_lib_path" +fi + +WORKDIR="$(mktemp -d)" +trap 'rm -rf "$WORKDIR"' EXIT + +DEFINE="$(awk '/^define find_platform_lib_path/,/^endef/' "$SHARED")" +if [[ -z "$DEFINE" ]]; then + echo "Could not extract find_platform_lib_path from $SHARED" + exit 1 +fi + +# canonical -> legacy aliases (must match PLATFORM_LEGACY_LIB_SUBPATHS) +pairs=( + "linux/64|linux64" + "linux/arm64|linuxarm64" + "linux/aarch64|linuxaarch64" + "linux/armv7l|linuxarmv7l" + "linux/armv6l|linuxarmv6l" +) + +resolve() { + local candidates="$1" + local libroot="$2" + local mk="$WORKDIR/resolve.mk" + cat >"$mk" < new path" + else + bad "${canonical}: both present expected .../lib/${canonical} got '${got_both}'" + fi + if [[ "$got_new" == "$base/new/lib/${canonical}" ]]; then + ok "${canonical}: only new -> new path" + else + bad "${canonical}: only new expected .../lib/${canonical} got '${got_new}'" + fi + if [[ "$got_old" == "$base/old/lib/${legacy}" ]]; then + ok "${canonical}: only old ${legacy} -> old path" + else + bad "${canonical}: only old expected .../lib/${legacy} got '${got_old}'" + fi + if [[ -z "$got_empty" ]]; then + ok "${canonical}: neither -> empty" + else + bad "${canonical}: neither expected empty got '${got_empty}'" + fi +done + +echo +echo "== PLATFORM_LEGACY_LIB_SUBPATHS aliases in config.shared.mk ==" +for pair in "${pairs[@]}"; do + canonical="${pair%%|*}" + legacy="${pair##*|}" + # arm64 also lists linuxaarch64 as a second alias + if grep -q "PLATFORM_LIB_SUBPATH),${canonical})" "$SHARED" && grep -q "${legacy}" "$SHARED"; then + ok "makefile still maps ${canonical} <-> ${legacy}" + else + bad "makefile missing ${canonical} / ${legacy} alias" + fi +done + +echo +echo "Passed: ${pass} Failed: ${fail}" +if [[ "$fail" -ne 0 ]]; then + exit 1 +fi +echo "Linux lib path fallbacks OK" From 91972ace8840eef1d5fc22dfd0d8aaaea1e81f82 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sun, 16 Aug 2026 19:22:46 +1000 Subject: [PATCH 55/56] test(linux): run lib path script with bash and mark it executable --- .github/workflows/linux-lib-paths.yml | 2 +- scripts/ci/linux/test_lib_paths.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 scripts/ci/linux/test_lib_paths.sh diff --git a/.github/workflows/linux-lib-paths.yml b/.github/workflows/linux-lib-paths.yml index ab096e19b1a..720890cd7b9 100644 --- a/.github/workflows/linux-lib-paths.yml +++ b/.github/workflows/linux-lib-paths.yml @@ -20,4 +20,4 @@ jobs: steps: - uses: actions/checkout@v6 - name: New lib/linux/ and legacy lib/linux64 both resolve - run: ./scripts/ci/linux/test_lib_paths.sh + run: bash scripts/ci/linux/test_lib_paths.sh diff --git a/scripts/ci/linux/test_lib_paths.sh b/scripts/ci/linux/test_lib_paths.sh old mode 100644 new mode 100755 From 2ceafb71dd2e5640520bfc1f65d87b34eeeb7e44 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sun, 16 Aug 2026 19:46:09 +1000 Subject: [PATCH 56/56] fix(ci): skip non-Linux test groups on the desktop runner linux/64/run_tests.sh copied a host Makefile into every tests/* folder and executed the binary. android / emscripten / ios / tvOS are not headless Linux unit tests (GLFW needs DISPLAY). Use the linux64 templates to match build.sh. --- scripts/ci/linux/64/run_tests.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/ci/linux/64/run_tests.sh b/scripts/ci/linux/64/run_tests.sh index 50618781cc5..5faff68f66b 100755 --- a/scripts/ci/linux/64/run_tests.sh +++ b/scripts/ci/linux/64/run_tests.sh @@ -1,6 +1,8 @@ #!/bin/bash -# set -ev +# Native Linux unit tests only. Other groups have their own CI jobs and +# often need a display, NDK, or emscripten toolchain. ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"} +TEMPLATE="$ROOT/scripts/templates/linux64" # if [ "$OPT" == "qbs" ]; then # exit 0 @@ -9,19 +11,25 @@ ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"} echo "##[group]**** Running unit tests ****" cd $ROOT/tests for group in *; do + case "$group" in + android|emscripten|ios|tvOS|tvos) + echo "Skipping $group (not a native Linux unit-test group)" + continue + ;; + esac if [ -d $group ]; then echo "##[group] $group" for test in $group/*; do if [ -d $test ]; then cd $test - cp ../../../scripts/templates/linux/Makefile . - cp ../../../scripts/templates/linux/config.make . - sleep 0.3 + cp "$TEMPLATE/Makefile" . + cp "$TEMPLATE/config.make" . + sleep 0.3 make -j2 Debug - sleep 0.3 + sleep 0.3 cd bin binname=$(basename ${test}) - + if [[ -f ./${binname}_debug ]]; then gdb -batch -ex "run" -ex "bt" -ex "q \$_exitcode" ./${binname}_debug #./${binname}_debug