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

[email protected] does not compile on a fresh install of MacOS 14.4 #922

Open
masom opened this issue Mar 21, 2024 · 12 comments
Open

[email protected] does not compile on a fresh install of MacOS 14.4 #922

masom opened this issue Mar 21, 2024 · 12 comments

Comments

@masom
Copy link

masom commented Mar 21, 2024

Meanwhile, the default Homebrew libgda installs fine.

┃ ==> Applying configure-big_sur.diff
┃
┃ patching file configure
┃
┃ ==> ./configure --disable-silent-rules --disable-binreloc --disable-gtk-doc --wi
┃
┃ ==> make
┃
┃ Last 15 lines from /Users/martinsamson/Library/Logs/Homebrew/libgda@5/02.make:
┃
┃                                                                    NULL, _gda_prepared_estatement_free);
┃
┃                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
┃
┃ /opt/homebrew/Cellar/glib/2.80.0/include/glib-2.0/glib/ghash.h:66:61: note: passing argument to parameter 'value_destroy_func' here
┃
┃                                             GDestroyNotify  value_destroy_func);
┃
┃                                                             ^
┃
┃ 1 error generated.
┃
┃ make[2]: *** [gda-connection.lo] Error 1
┃
┃ make[2]: *** Waiting for unfinished jobs....
rew/Cellar/glib/2.80.0/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/f
fi -DHAVE_GIO   -Wall   -g -O2 -c -o gda-data-select.lo gda-data-select.c
gda-connection.c:6461:18: error: incompatible function pointer types passing 'void (PreparedStatementRef *)' to parameter of type 'GDestroyNotify' (a
ka 'void (*)(void *)') [-Wincompatible-function-pointer-types]
                                                                   NULL, _gda_prepared_estatement_free);
                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/glib/2.80.0/include/glib-2.0/glib/ghash.h:66:61: note: passing argument to parameter 'value_destroy_func' here
                                            GDestroyNotify  value_destroy_func);
@davidstosik
Copy link

davidstosik commented Mar 22, 2024

Same here. ✋🏻

First met the error when trying to run dev up in shopify/shopify on my new M3, but I can also reproduce with brew install shopify/shopify/libgda@5.

@ilikeorangutans
Copy link

Same issue here. brew install shopify/shopify/libgda@5 fails.

@sandor-shopify
Copy link

same, I'm also getting the same problem

@masom
Copy link
Author

masom commented Mar 22, 2024

The short-term solution is downgrading xcode command line tools as the one shipping in XCode on 14.4 does not seem compatible with libgda@5.

% xcode-select -v
xcode-select version 2406.

^ This version seems to work.

@mottallify
Copy link

Can confirm that this is also happening on the M1 machines. My Xcode version is also 2406:

[email protected] does not compile on a fresh install of MacOS 14.4 https://github.com/Shopify/homebrew-shopify/issues/922
┃
┗━━ 💥  Failed! Aborting! The packages: shopify/shopify/libgda@5 =>  aren't available from Homebrew.
➜  shopify git:(main) xcode-select -v
xcode-select version 2406.

@ianks
Copy link

ianks commented Mar 28, 2024

Do we even need to be on a patched libgda??

@olga-mcbfe
Copy link

doesn't work for me on M3 with 2406 xcode version

@laudera
Copy link

laudera commented Apr 8, 2024

Does anyone know if there is a fix for this yet?

@GoodForOneFare
Copy link
Member

dev clang reset && dev up worked for me.

@laudera
Copy link

laudera commented Apr 8, 2024

@GoodForOneFare thank you!!

@ilikeorangutans
Copy link

ilikeorangutans commented Apr 8, 2024

Did dev clang reset and that got me to a different error. Looks like glib is missing/wrong version:

Couldn't find include 'GObject-2.0.gir' (search path: '['.', '/private/tmp/libgdaA5-20240408-50276-wy7ucg/libgda-5.2.10/.brew_home/.local/share/gir-1.0', 'gir-1.0', '/usr/local/share/gir-1.0', '/usr/share/gir-1.0', '/opt/homebrew/Cellar/gobject-introspection/1.80.0/share/gir-1.0', '/opt/homebrew/Cellar/gobject-introspection/1.80.0/share/gir-1.0', '/opt/homebrew/share/gir-1.0']')

I have /opt/homebrew/Cellar/glib/2.80.0_2/share/gir-1.0/GObject-2.0.gir, but turns out glib wasn't linked. brew link glib did the trick and it's successfully finished dev up.

Update: spoke too soon. It did install libgda, however gda.bundle was linked against the wrong version of libgda:

LoadError: dlopen(/Users/jakobkulzer/.gem/ruby/3.3.0/gems/gda-1.1.5/lib/gda.bundle, 0x0009): Library not loaded: /opt/homebrew/opt/libgda/lib/libgda-6.0.6.0.0.dylib (LoadError)
  Referenced from: <22636203-AD1B-385E-BAD4-96C0EFF8AD37> /Users/jakobkulzer/.gem/ruby/3.3.0/gems/gda-1.1.5/lib/gda.bundle
  Reason: tried: '/opt/homebrew/opt/libgda/lib/libgda-6.0.6.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libgda/lib/libgda-6.0.6.0.0.dylib' (no such file),
'/opt/homebrew/opt/libgda/lib/libgda-6.0.6.0.0.dylib' (no such file) - /Users/jakobkulzer/.gem/ruby/3.3.0/gems/gda-1.1.5/lib/gda.bundle

Confirmed with

$ otool -L /Users/jakobkulzer/.gem/ruby/3.3.0/gems/gda-1.1.5/lib/gda.bundle

/Users/jakobkulzer/.gem/ruby/3.3.0/gems/gda-1.1.5/lib/gda.bundle:
        /opt/rubies/3.3.0/lib/libruby.3.3.dylib (compatibility version 3.3.0, current version 3.3.0)
        /opt/homebrew/opt/libgda/lib/libgda-6.0.6.0.0.dylib (compatibility version 6.0.0, current version 6.0.0)
        /opt/homebrew/opt/glib/lib/libgobject-2.0.0.dylib (compatibility version 8001.0.0, current version 8001.0.0)
        /opt/homebrew/opt/glib/lib/libgthread-2.0.0.dylib (compatibility version 8001.0.0, current version 8001.0.0)
        /opt/homebrew/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 8001.0.0, current version 8001.0.0)
        /opt/homebrew/opt/gettext/lib/libintl.8.dylib (compatibility version 13.0.0, current version 13.0.0)
        /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)

Forcing a rebuild: rm -rf ~/.gem/ruby/3.3.0/gems/gda-1.1.5 && dev up links the bundle correctly:

$ otool -L /Users/jakobkulzer/.gem/ruby/3.3.0/gems/gda-1.1.5/lib/gda.bundle

/Users/jakobkulzer/.gem/ruby/3.3.0/gems/gda-1.1.5/lib/gda.bundle:
        /opt/rubies/3.3.0/lib/libruby.3.3.dylib (compatibility version 3.3.0, current version 3.3.0)
        /opt/homebrew/opt/libgda@5/lib/libgda-5.0.4.dylib (compatibility version 6.0.0, current version 6.1.0)
        /opt/homebrew/opt/glib/lib/libgobject-2.0.0.dylib (compatibility version 8001.0.0, current version 8001.0.0)
        /opt/homebrew/opt/glib/lib/libgthread-2.0.0.dylib (compatibility version 8001.0.0, current version 8001.0.0)
        /opt/homebrew/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 8001.0.0, current version 8001.0.0)
        /opt/homebrew/opt/gettext/lib/libintl.8.dylib (compatibility version 13.0.0, current version 13.0.0)
        /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)

Running into an unrelated error now, but it looks like dev up would succeed otherwise.

@metamoni
Copy link

@masom my Xcode version is 2408. How can I downgrade Xcode, seeing as it's all managed through self-service?

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

No branches or pull requests

10 participants