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

[WIP] fmt: update to 10.2.1, spdlog: update to 1.14.1. #50183

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

Conversation

Calandracas606
Copy link

@Calandracas606 Calandracas606 commented May 3, 2024

Testing the changes

  • I tested the changes in this PR: NO

Build status (x86_64-glibc):

  • spdlog
  • coeurl
  • mtxclient
  • vtk
  • python3-syndom
  • paps
  • opendht
  • nheko
  • mpd
  • mkvtoolnix
  • kodi
  • justbuild
  • imhex
  • gnuradio
  • gerbera
  • furnace
  • easyeffects
  • devilutionX
  • cryfs
  • cherrytree
  • Waybar
  • MangoHud
  • Bear
  • 0ad

[ci-skip]

@Calandracas606 Calandracas606 marked this pull request as draft May 3, 2024 22:40
@sgn
Copy link
Member

sgn commented May 5, 2024

For devilutionX, either use vendored fmt or use a non-free devilutionX #50195

@Calandracas606
Copy link
Author

For devilutionX, either use vendored fmt or use a non-free devilutionX #50195

cherry picked your commit using non-free devilutionX

@Calandracas606 Calandracas606 force-pushed the fmt-and-spdlog-update branch 2 times, most recently from 93922b9 to 39ea611 Compare May 5, 2024 17:09
@Calandracas606
Copy link
Author

all packages patched/updated to build with new fmt on x86_64-glibc

Now doing build tests for all other archs

@Calandracas606
Copy link
Author

everything is building except for imhex which fails on musl and aarch64

@Calandracas606
Copy link
Author

after several hours, i can't figure out how to fix cross compilation for imhex

please help

@meator
Copy link
Contributor

meator commented May 28, 2024

after several hours, i can't figure out how to fix cross compilation for imhex

please help

Worry not, I come to the rescue!

Here's a patch:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,12 @@
 set(CMAKE_MODULE_PATH "${IMHEX_BASE_FOLDER}/cmake/modules")
 include("${IMHEX_BASE_FOLDER}/cmake/build_helpers.cmake")
 
+# Void Linux flags for cross compiling libromfs
+set(NATIVE_CMAKE_C_COMPILER "$ENV{CC_host}")
+set(NATIVE_CMAKE_CXX_COMPILER "$ENV{CXX_host}")
+set(NATIVE_CMAKE_C_FLAGS "$ENV{CFLAGS_host}")
+set(NATIVE_CMAKE_CXX_FLAGS "$ENV{CXXFLAGS_host}")
+
 # Setup project
 loadVersion(IMHEX_VERSION)
 setVariableInParent(IMHEX_VERSION ${IMHEX_VERSION})

This is what's causing problems: https://github.com/WerWolv/libromfs/blob/master/generator/CMakeLists.txt#L5-L12 (libromfs isn't a part of imhex, it gets downloaded during the configure step1)

ld prints warnings about skipping aarch libraries when looking for libs. I believe that these warnings are harmless.

Here are the ld warnings.

...
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
[141/369] Linking CXX executable plugins/builtin/libromfs/generator/generator-builtin
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
[142/369] Linking CXX executable main/gui/main/gui/libromfs/generator/generator-imhex
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/aarch64-linux-gnu/usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
...

These flags could be theoretically set through $configure_args, but the variable expansion gets pretty funky with $CFLAGS_host and $CXXFLAGS_host. libromfs's build system disregards the relevant NATIVE_CMAKE_ variables when set through the environment, so the only two solutions I see is passing -DNATIVE_CMAKE_ to cmake (impossible to do because of parameter expansion) or modifying the build system like my patch does.

Footnotes

  1. This is bad for obvious reasons, I believe that it pulls https://github.com/WerWolv/libromfs directly from master. This should probably be fixed.

@Calandracas606
Copy link
Author

after several hours, i can't figure out how to fix cross compilation for imhex
please help

Worry not, I come to the rescue!

Thanks! the patch works

@Calandracas606 Calandracas606 force-pushed the fmt-and-spdlog-update branch 2 times, most recently from 821ed09 to f3d372e Compare May 28, 2024 22:02
@Calandracas606 Calandracas606 marked this pull request as ready for review May 28, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants