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

openpgp plugin fails to build on macOS: Undefined symbols for architecture arm64: :info:build "_gpg_strerror" #1602

Open
barracuda156 opened this issue Jul 1, 2024 · 3 comments

Comments

@barracuda156
Copy link

This was broken in 0.4.3 and still broken in 0.4.4:

:info:build [551/556] Linking C shared library plugins/openpgp.dylib
:info:build FAILED: plugins/openpgp.dylib 
:info:build : && /Library/Developer/CommandLineTools/usr/bin/clang -pipe -Os -Wno-error=implicit-function-declaration -Wno-error=incompatible-function-pointer-types -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -fdiagnostics-color -Wall -Wextra -Werror=format-security -Wno-duplicate-decl-specifier -fno-omit-frame-pointer -g -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -o plugins/openpgp.dylib -install_name @rpath/openpgp.dylib plugins/openpgp/CMakeFiles/openpgp.dir/src/file_transfer/file_decryptor.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/file_transfer/file_encryptor.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/account_settings_entry.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/contact_details_provider.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/database.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/encryption_list_entry.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/manager.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/plugin.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/register_plugin.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/stream_flag.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/stream_module.c.o plugins/openpgp/CMakeFiles/openpgp.dir/src/util.c.o plugins/openpgp/CMakeFiles/openpgp.dir/resources/resources.c.o  -Wl,-rpath,/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_net_dino/dino/work/dino-0.4.4/build  libdino.0.0.dylib  plugins/gpgme-vala/libgpgme-vala.a  libxmpp-vala.0.1.dylib  /opt/local/lib/libicuuc.dylib  /opt/local/lib/libicudata.dylib  libqlite.0.1.dylib  /opt/local/lib/libsqlite3.dylib  -lm  /opt/local/lib/libgpgme.dylib  /opt/local/lib/libgee-0.8.dylib  /opt/local/lib/libgmodule-2.0.dylib  /opt/local/lib/libgtk-4.dylib  /opt/local/lib/libpangocairo-1.0.dylib  /opt/local/lib/libpango-1.0.dylib  /opt/local/lib/libharfbuzz.dylib  /opt/local/lib/libgdk_pixbuf-2.0.dylib  /opt/local/lib/libcairo-gobject.dylib  /opt/local/lib/libcairo.dylib  /opt/local/lib/libgraphene-1.0.dylib  /opt/local/lib/libgio-2.0.dylib  /opt/local/lib/libgobject-2.0.dylib  /opt/local/lib/libglib-2.0.dylib  /opt/local/lib/libintl.dylib && :
:info:build Undefined symbols for architecture arm64:
:info:build   "_gpg_strerror", referenced from:
:info:build       _gpgme_throw_if_error in libgpgme-vala.a[2](gpgme_helper.c.o)
:info:build ld: symbol(s) not found for architecture arm64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
@barracuda156
Copy link
Author

0.4.3 failed a bit differently, but on the same plug-in:

gpgme.vapi: error: no member named 'subkeys_length1' in 'struct _gpgme_key'
account_settings_entry.vala: error: no member named 'uids_length1' in 'struct _gpgme_key'

@mar-v-in
Copy link
Member

mar-v-in commented Jul 1, 2024

The linker seems to not pull in the recursive dependency correctly here (might be specific to dylib and thus not happening on other systems). Can you try if changing gpg_strerror in https://github.com/dino/dino/blob/v0.4.4/plugins/gpgme-vala/vapi/gpg-error.vapi#L445 to gpgme_strerror fixes the build for you?

@barracuda156
Copy link
Author

@mar-v-in Yeah, that actually worked, at least on Sonoma. I will see what is going on with PowerPC build a bit later.

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

2 participants