-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Linux 2025 #8255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
danoli3
wants to merge
70
commits into
openframeworks:master
Choose a base branch
from
danoli3:linux2025
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,077
−1,046
Open
Linux 2025 #8255
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
1bfb841
Submodule fixes.
danoli3 e8877e9
Updates nightly
danoli3 0771ced
Download libs [ 2.6.4 ~ 2.7.0] - Added GCC / Linux updates
danoli3 18c0933
remove gold linux binutils ?
danoli3 9270712
Linux Workflow updates / mkfile
danoli3 7a8806c
Script moving oh no
danoli3 cc58ecf
Linux Script Updates
danoli3 43bbc21
Gold LD if found
danoli3 682a8c1
Downloader [2.7.1 ~ 2.7.2] exit error if fail on download of library …
danoli3 bead770
Downloader [2.7.2 ~ 2.7.3]
danoli3 8a91eca
Linux Actions
danoli3 73e9518
download_libs [2.7.3 ~ 2.7.4] fix opt args for downloads Linux
danoli3 d5a29a8
downloader set linux aarch64 to 64 for testing on arm64 linux
danoli3 af321ae
Makefile Linux subpath
danoli3 ddab37a
makefile subpath
danoli3 655092a
Linux subpath
danoli3 d4f5f35
download libs validate downloads before overrwite and 2.8.0. wget2 di…
danoli3 478b762
Makefiles
danoli3 7eba8bf
downloadlibs [2.8.0 ~ 2.8.1] valid bool to int
danoli3 40a6beb
ci linux
danoli3 e75e03c
Workflow ci optimisation VS single ARCH downloads
danoli3 3029efb
Linux 22.04 Test
danoli3 d48af34
VS download optimisation
danoli3 094abb3
VS Download fix
danoli3 c92b886
Makefile fixes / vs arch
danoli3 78217a1
Makefile depth fix
danoli3 8ad6d29
Makefile strict tab
danoli3 8eee1c6
Github Actions Test needs
danoli3 c61d5d2
Addons linux path ofxSvg make
danoli3 74b6993
Actions needs use ubuntu as quick
danoli3 0ef2280
Actions rename Linux-64 to linux
danoli3 887935d
Makefiles spaces to tabs
danoli3 ffcc9d6
Makefile debug
danoli3 688ed3b
Reset file
danoli3 7643dd4
Spaces to Tabs
danoli3 8d7acf5
no debug flags
danoli3 851a70e
Actions
danoli3 daa9bd4
22.04 disabled
danoli3 d870448
ci build 64
danoli3 b10d1f3
Line spaces to tabs
danoli3 19afe0e
gold
danoli3 71f8bf2
Fix Linux string issue
danoli3 14df16f
debug off
danoli3 8d14302
gold linker on command
danoli3 ad32c5f
gold linker comments disabled
danoli3 96fe3c7
Update addon_config
danoli3 35b31dc
Actions Linux 22.04 Enabled
danoli3 4acc8a8
Actions Linux 22.04 GCC 10
danoli3 09bce48
downloader [4.4.0 ~ 4.5.0] - fix close connection for zero urls.
danoli3 3444c51
Actions update
danoli3 7f4e563
Linux script updates
danoli3 6ec622f
osx / ios remove defined .a
danoli3 f94ae80
osx addon mk
danoli3 886d467
binutils-gold to depends
danoli3 0486e20
apothecary d5cb2e24b30e50e908280b99285746e7beaf0ff4
danoli3 3fd42d3
oF script / linux downloader
danoli3 f354351
Linux Wayland support
danoli3 83cf2fb
glfw
danoli3 1ddf619
linux pg downloader
danoli3 4305c34
linux makefile update arm64 / jetson / rpi
danoli3 8855368
Linux rasbian to folder
danoli3 45a60f9
make shell
danoli3 c0e0ee1
makefiles must use tabs
danoli3 3481e8d
Linux arm64 fix
danoli3 887b8a1
Setup GCC.sh
danoli3 70e5cb6
download libs linux minimum gcc 10
danoli3 79feff5
nightly arm64 linux
danoli3 6d12e9b
testing nightly
danoli3 2c2b9b9
Merge branch 'master' into linux2025
danoli3 3021df0
Merge commit '5630d2034d835e81225a225355e97f4144b21179' into linux2025
danoli3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,29 +60,22 @@ common: | |
# a specific platform | ||
# ADDON_LIBS_EXCLUDE = | ||
|
||
osx: | ||
ADDON_LIBS = libs/svgtiny/lib/macos/svgtiny.xcframework/macos-arm64_x86_64/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/macos/libxml2.xcframework/macos-arm64_x86_64/libxml2.a | ||
|
||
ios: | ||
ADDON_LIBS = libs/svgtiny/lib/ios/svgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/ios/xml2.a | ||
linux/64: | ||
ADDON_LIBS = libs/svgtiny/lib/linux/64/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/linux/64/libxml2.a | ||
|
||
linux64: | ||
ADDON_LIBS = libs/svgtiny/lib/linux64/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/linux64/libxml2.a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likewise will libs still get picked up in older addons from |
||
linux/armv6l: | ||
ADDON_LIBS = libs/svgtiny/lib/linux/armv6l/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/linux/armv6l/libxml2.a | ||
|
||
linuxarmv6l: | ||
ADDON_LIBS = libs/svgtiny/lib/linuxarmv6l/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/linuxarmv6l/libxml2.a | ||
linux/armv7l: | ||
ADDON_LIBS = libs/svgtiny/lib/linux/armv7l/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/linux/armv7l/libxml2.a | ||
|
||
linuxarmv7l: | ||
ADDON_LIBS = libs/svgtiny/lib/linuxarmv7l/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/linuxarmv7l/libxml2.a | ||
|
||
linuxaarch64: | ||
ADDON_LIBS = libs/svgtiny/lib/linuxaarch64/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/linuxaarch64/libxml2.a | ||
linux/aarch64: | ||
ADDON_LIBS = libs/svgtiny/lib/linux/aarch64/libsvgtiny.a | ||
ADDON_LIBS += libs/libxml2/lib/linux/aarch64/libxml2.a | ||
|
||
msys2: | ||
ADDON_PKG_CONFIG_LIBRARIES = libxml-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
131 changes: 131 additions & 0 deletions
131
libs/openFrameworksCompiled/project/linux/arm64/config.linuxarm64.default.mk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
28 changes: 0 additions & 28 deletions
28
libs/openFrameworksCompiled/project/linux/config.linux.default.mk
This file was deleted.
Oops, something went wrong.
467 changes: 0 additions & 467 deletions
467
libs/openFrameworksCompiled/project/linux/libopenFrameworks.cbp
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule apothecary
updated
26 files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
scripts/ci/linux64/run_tests.sh → scripts/ci/linux/64/run_tests.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cd $SCRIPT_DIR | ||
if [ ! -z ${BITS+x} ]; then | ||
../dev/download_pg.sh -p linux -a $BITS -n $@ | ||
else | ||
../dev/download_pg.sh -p linux $@ | ||
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the old
linux64
andlinuxarmv6l
still work for PG etc?