SrainApp / srain

Modern IRC client written in GTK

Home Page:https://srain.silverrainz.me/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building on arm64 (macOS)

step21 opened this issue · comments

Has someone built this successfully on arm, either as native, or with compatibility layer?
It seems right now I have some issues where during linking the compiler or the ninja build script expects x86_64 libraries, but some of the libraries are built for arm64 which then does not work leading to an error message such as:

ld: warning: ignoring duplicate libraries: '-lgio-2.0', '-lglib-2.0', '-lgobject-2.0', '-lintl'
ld: warning: ignoring file '/opt/homebrew/Cellar/gtk+3/3.24.42/lib/libgtk-3.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/harfbuzz/8.5.0/lib/libharfbuzz.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/gtk+3/3.24.42/lib/libgdk-3.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/pango/1.52.2/lib/libpango-1.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/pango/1.52.2/lib/libpangocairo-1.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/cairo/1.18.0/lib/libcairo-gobject.2.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/at-spi2-core/2.52.0/lib/libatk-1.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/cairo/1.18.0/lib/libcairo.2.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/gdk-pixbuf/2.42.12/lib/libgdk_pixbuf-2.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/libconfig/1.7.3/lib/libconfig.11.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/glib/2.80.2/lib/libgio-2.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/glib/2.80.2/lib/libglib-2.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/glib/2.80.2/lib/libgmodule-2.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/libsoup/3.4.4/lib/libsoup-3.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/glib/2.80.2/lib/libgobject-2.0.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/libsecret/0.21.4/lib/libsecret-1.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/gettext/0.22.5/lib/libintl.8.dylib': found architecture 'arm64', required architecture 'x86_64'
Undefined symbols for architecture x86_64:
  "_cairo_gobject_surface_get_type", referenced from:
<lots of missing symbols>
      _sui_url_previewer_new_from_cache in sui_sui_url_previewer.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

I have no arm64 macOS device.

But it seems to be a bug in the old version of meson (mesonbuild/meson#9493) and got fixed in 1.2.0, sorry I may have misunderstood this issue. but you can still try a newer meson.

Thanks. The meson version is 1.4.1. It might also be a me problem, in the sense that in principle the device can run both, and there might still be some x86_64 libraries because of that. These shouldn't be used, but I cannot rule out that somehow clang / ld find them.

Hey, I fixed this by making sure that all x86_64 brew libraries were removed. However now I have another problem :)