Skip to content
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

Linux 2025 #8255

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open

Linux 2025 #8255

wants to merge 60 commits into from

Conversation

danoli3
Copy link
Member

@danoli3 danoli3 commented Jan 15, 2025

Linux

  • Updates for GCC14 / GCC13 / GCC12 / GCC11 / GCC10 (from GCC6 std=c++11)
  • C++ now variant to C++23 depending GCC version. 24.04 = GCC14
  • Download Script now updated to download correct GCC based on whats installed.
  • Performance Boost for Linux apps 400% for correct GCC
  • Split Linux64 to -TARGET = Linux - A = 64
  • Split allows for all versions of Linux to fall into correct locations (arm64 etc)
  • Updated Workflow for updated Linux Libraries
  • Fixed Nightly borked

@danoli3
Copy link
Member Author

danoli3 commented Jan 15, 2025

Removed Gold LD for the moment regarding:
#8239

@danoli3 danoli3 added the linux label Jan 15, 2025
@danoli3 danoli3 added this to the 0.12.1 milestone Jan 15, 2025
@danoli3
Copy link
Member Author

danoli3 commented Jan 16, 2025

@ofTheo yeah the library subpath was being used for the targetarch name in for the makefile in the directory! So with linux/64 it was bugging out. I thought it was line spacing tab stuff.

Makefiles are so sensitive though wow. It looks like maybe the streamer issue just reported is a spaces instead of tabs issue if they had run the code.

  ccache g++ -o bin/linux64_debug  obj/linux/64/Debug/src/ofApp.o obj/linux/64/Debug/src/main.o   ../../../libs/openFrameworksCompiled/lib/linux/64/libopenFrameworksDebug.a  -Wl,-rpath=./libs:./bin/libs:./ -Wl,--as-needed -Wl,--gc-sections -fuse-ld=gold ../../../libs/brotli/lib/linux/64/libbrotlienc.a ../../../libs/brotli/lib/linux/64/libbrotlicommon.a ../../../libs/brotli/lib/linux/64/libbrotlidec.a ../../../libs/fmt/lib/linux/64/libfmt.a ../../../libs/glew/lib/linux/64/libGLEW.a ../../../libs/glfw/lib/linux/64/libglfw3.a ../../../libs/tess2/lib/linux/64/libtess2.a ../../../libs/zlib/lib/linux/64/zlib.a -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lssl -lcrypto -lcurl -lrtaudio -lpulse-simple -lpulse -pthread -lasound -L/usr/lib64 -lGLEW -lGL -lX11 -lGLU -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123  -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lpugixml -luriparser
  ../../../libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1009: error: undefined reference to 'kiss_fftr_alloc'
  ../../../libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1020: error: undefined reference to 'kiss_fftr_alloc'
  ../../../libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1065: error: undefined reference to 'kiss_fftr'
  ../../../libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1095: error: undefined reference to 'kiss_fftr'
  collect2: error: ld returned 1 exit status

Linking Kiss is missing! Sweet looking into

@ofTheo
Copy link
Member

ofTheo commented Jan 16, 2025 via email

@danoli3
Copy link
Member Author

danoli3 commented Jan 17, 2025

Complete

Ubuntu
24.04.1
LT
Build Success all GCC targets

Ubuntu
22.04.1
LT
Build Success GCC10 (max GCC for 22.04)

@danoli3
Copy link
Member Author

danoli3 commented Jan 17, 2025

Added a utility pipe to apothecary and just did the same for oF
image

this will make everything a lot easier to update before the gui stuff is done
./of or ./of.sh
usage following our function names: setup, update
of setup runs any setup scripts if applicable, apt gets etc
of update runs any download libs scripts

currently just targeting auto the platform that it is.
macOS will call default macos
Windows will call the default scripts for vs

This will drop clicks / folder clicks and bash running into 1 open repo in terminal: boom run command

@@ -80,7 +80,7 @@ linux:
ADDON_LIBS_EXCLUDE = libs/assimp
ADDON_INCLUDES_EXCLUDE = libs/assimp/%

linux64:
linux/64:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the old linux64 and linuxarmv6l still work for PG etc?

@@ -68,21 +68,21 @@ ios:
ADDON_LIBS = libs/svgtiny/lib/ios/svgtiny.a
ADDON_LIBS += libs/libxml2/lib/ios/xml2.a

linux64:
ADDON_LIBS = libs/svgtiny/lib/linux64/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linux64/libxml2.a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise will libs still get picked up in older addons from lib/linux64

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=linux64
PLATFORM_LIB_SUBPATH=linux/64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like older projects with addons in lib/linux64/ might not work based on this?

scripts/dev/upgrade.sh added upgrade dev commands to find and replace strings from old versions automatically with sed.
@danoli3
Copy link
Member Author

danoli3 commented Jan 18, 2025

Good idea although make file location is a very minimal issue compared to all the std:: upgrades required for older projects... but I've added the beginning on an auto-upgrade script.

this script will automatically replace issue strings in addon_config.mk for Linux.

Called via:
./of upgrade addons
./of upgrade apps

In the future this can also add in std:: replacements. Just requires stop and prompt by user since they need to back up files.
Backup mk files are created and removed only upon user input

@ofTheo
Copy link
Member

ofTheo commented Jan 18, 2025

Upgrade script are always handy, but I think we have to be able to support addons that would be fully compliant up until this PR is merged.

I know its a pain to support two names, but I'd either suggest leaving the current system of linux64, linuxarmv6l or, making sure both linux/64 and linux64 libs get picked up by make files / PG etc.

This feels like the amount it will break, is not worth the conceptual tidiness of having the subfolder approach.

Curious what others think, but I am def nervous as it's the osx / macOS issue again, but with even more platforms.

@danoli3
Copy link
Member Author

danoli3 commented Jan 18, 2025

Actually all those issues were caused by explicit makefile definitions like this one, when we coded not to at all use them! thanks for reminder ~ these are redundant now. Even the exclude code should be removed and just use actual platform defines.

In fact lets just remove these completely as the projectGenerator figures this out automatically.

Here's a test fully removing these .a explicit:
image

Xcode:
image
Make:
image

Let me test this on native linux see if it just works without this

@dimitre
Copy link
Member

dimitre commented Jan 18, 2025

I think the optional subfolders will complicate the regex needed by makefiles.
The best is having only one folder depth. If any improvement / disambiguating is needed I suggest using a target triplet as a single folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants