Lots of errors during the installation of Gnucash by macports after upgrading to macports 2.10 and macOS 15.0 Sequoia
TLDR
- Wait until https://github.com/macports/macports-ports/pull/25835 merged or
- Before merged, manually apply above PR to /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/gnome/at-spi2-core/Portfile
and use below command to install GnuCash in macOS 15.0 by macports 2.10
sudo port install gnucash build_arch=x86_64 configure.cflags="-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types -Wimplicit-function-declaration -Wno-error=implicit-function-declaration"
You may also need to manually install netpbm and libvpx, rarian, gstreamer1-gst-plugins-bad and libgcc14. Check below content for details.
To manually install, gstreamer1-gst-plugins-bad
sudo port clean gstreamer1-gst-plugins-bad && sudo port install gstreamer1-gst-plugins-bad build_arch=x86_64
Content
I was using macports because I needed to use macports to install GnuCash in mac so that I could use GnuCash python bindings.
After upgrading to macports 2.10, things went broken. First, dependency gstreamer1-gst-plugins-bad
failed
Error: Failed to build libffi: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libffi/libffi/main.log for details.
Error: Unable to execute port gstreamer1-gst-plugins-bad: upgrade gtk-doc failed
I checked logs and found that installation failed because macports built x86_64
but tried to link arm64
. I cannot force macports to build all in arm64
because GnuCash depends on rust
which only supports x86_64
in mac.
I then tried
sudo port clean libdbi-drivers && sudo port install libdbi-drivers build_arch=x86_64
but then logs indicated that
error: incompatible integer to pointer conversion passing 'intptr_t' (aka 'long') to parameter of type 'const void *' [-Wint-conversion]
and
error: incompatible function pointer types passing ..... [-Wincompatible-function-pointer-types]
I then tried below and finally got libdbi-drivers installed.
sudo port clean libdbi-drivers && sudo port install libdbi-drivers build_arch=x86_64 configure.cflags="-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types"
To avoid possible errors, I tried to install GnuCash with below command
sudo port install gnucash build_arch=x86_64 configure.cflags="-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types"
I still see errors
Error: Failed to build at-spi2-core: command execution failed
Checking logs I find
:info:build In file included from ../at-spi2-core-2.38.0/registryd/deviceeventcontroller-x11.c:46:
:info:build In file included from /opt/local/include/glib-2.0/glib.h:34:
:info:build In file included from /opt/local/include/glib-2.0/glib/gasyncqueue.h:34:
:info:build In file included from /opt/local/include/glib-2.0/glib/gthread.h:36:
:info:build In file included from /opt/local/include/glib-2.0/glib/gutils.h:426:
:info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdlib.h:58:
:info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdlib.h:66:
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:207:19: error: duplicate member 'w_Filler'
:info:build 207 | unsigned int w_Filler:16, /* upper bits filler */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:204:7: note: previous declaration is here
:info:build 204 | w_Filler:16; /* upper bits filler */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:208:7: error: duplicate member 'w_Retcode'
:info:build 208 | w_Retcode:8, /* exit code if w_termsig==0 */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:203:7: note: previous declaration is here
:info:build 203 | w_Retcode:8, /* exit code if w_termsig==0 */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:209:7: error: duplicate member 'w_Coredump'
:info:build 209 | w_Coredump:1, /* core dump indicator */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:202:7: note: previous declaration is here
:info:build 202 | w_Coredump:1, /* core dump indicator */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:210:7: error: duplicate member 'w_Termsig'
:info:build 210 | w_Termsig:7; /* termination signal */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:201:19: note: previous declaration is here
:info:build 201 | unsigned int w_Termsig:7, /* termination signal */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:225:19: error: duplicate member 'w_Filler'
:info:build 225 | unsigned int w_Filler:16, /* upper bits filler */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:222:7: note: previous declaration is here
:info:build 222 | w_Filler:16; /* upper bits filler */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:226:7: error: duplicate member 'w_Stopsig'
:info:build 226 | w_Stopsig:8, /* signal that stopped us */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:221:7: note: previous declaration is here
:info:build 221 | w_Stopsig:8, /* signal that stopped us */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:227:7: error: duplicate member 'w_Stopval'
:info:build 227 | w_Stopval:8; /* == W_STOPPED if stopped */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:220:19: note: previous declaration is here
:info:build 220 | unsigned int w_Stopval:8, /* == W_STOPPED if stopped */
Then I find this https://trac.macports.org/ticket/70776
#70776 assigned defect at-spi2-core @2.38.0_0 fails to build on MacOS 15 Sequoia
and
Changed 3 days ago by slewsys (Andrew L. Moore) Patch submitted as: https://github.com/macports/macports-ports/pull/25835
This PR was open on Sep 19 2024 at 2:16 AM PDT. Looks like I need to wait until this PR merged
I also encountered below error ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
installing libnetpbm
:info:build /usr/bin/clang -c -I. -Iimportinc -Iimportinc/netpbm -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_netpbm/libnetpbm/work/advanced-r4925/lib/util -DNDEBUG -Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types -I/opt/local/include -arch x86_64 -Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types -I/opt/local/include -arch x86_64 -o runlength.o runlength.c
:info:build nstring.c:60:30: error: call to undeclared library function 'strdup' with type 'char *(const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
:info:build 60 | const char * const dup = strdup(arg);
:info:build | ^
:info:build nstring.c:60:30: note: include the header <string.h> or explicitly provide a declaration for 'strdup'
:info:build nstring.c:78:10: error: call to undeclared function 'vasprintf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
:info:build 78 | rc = vasprintf((char **)&result, fmt, varargs);
:info:build | ^
:info:build nstring.c:78:10: note: did you mean 'vsprintf'?
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdio.h:295:6: note: 'vsprintf' declared here
:info:build 295 | int vsprintf(char * __restrict, const char * __restrict, va_list) __printflike(2, 0);
I need to use below command to install libnetpbm
sudo port clean libnetpbm && sudo port install libnetpbm build_arch=x86_64 configure.cflags="-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types -Wimplicit-function-declaration -std=gnu89 -Wno-error=implicit-function-declaration"
I then retried installing GnuCash, and errors occured when installing dependency netpbm
. These errors also occured when installing at-spi2-core
:info:build gnumake[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_netpbm/netpbm/work/advanced-r4925/lib'
:info:build pamx.c:303:17: warning: call to undeclared library function 'strdup' with type 'char *(const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
:info:build 303 | title = strdup(cmdline.title);
:info:build | ^
:info:build pamx.c:303:17: note: include the header <string.h> or explicitly provide a declaration for 'strdup'
:info:build In file included from window.c:25:
:info:build In file included from importinc/netpbm/mallocvar.h:13:
:info:build In file included from importinc/netpbm/pm_config.h:109:
:info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdlib.h:58:
:info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdlib.h:66:
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:207:19: error: duplicate member 'w_Filler'
:info:build 207 | unsigned int w_Filler:16, /* upper bits filler */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:204:7: note: previous declaration is here
:info:build 204 | w_Filler:16; /* upper bits filler */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:208:7: error: duplicate member 'w_Retcode'
:info:build 208 | w_Retcode:8, /* exit code if w_termsig==0 */
:info:build | ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:203:7: note: previous declaration is here
:info:build 203 | w_Retcode:8, /* exit code if w_termsig==0 */
I tried below command and successfully installed netpbm, above errors were gone. Looks like netpbm does not like those cflags ` configure.cflags=”-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types -Wimplicit-function-declaration -Wno-error=implicit-function-declaration`
sudo port clean netpbm && sudo port install netpbm build_arch=x86_64
Also encountered error when installing dependency libvpx
:info:build /usr/bin/clang++ -L/opt/local/lib -Wl,-headerpad_max_install_names -Os -stdlib=libc++ -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch x86_64 -m64 -arch x86_64 -o test_libvpx ivfenc.c.o md5_utils.c.o test/active_map_refresh_test.cc.o test/active_map_test.cc.o test/alt_ref_aq_segment_test.cc.o test/altref_test.cc.o test/aq_segment_test.cc.o test/bench.cc.o test/borders_test.cc.o test/byte_alignment_test.cc.o test/config_test.cc.o test/cpu_speed_test.cc.o test/cq_test.cc.o test/decode_api_test.cc.o test/decode_corrupted.cc.o test/decode_svc_test.cc.o test/decode_test_driver.cc.o test/encode_api_test.cc.o test/encode_test_driver.cc.o test/error_resilience_test.cc.o test/external_frame_buffer_test.cc.o test/frame_size_tests.cc.o test/invalid_file_test.cc.o test/keyframe_test.cc.o test/level_test.cc.o test/realtime_test.cc.o test/resize_test.cc.o test/svc_datarate_test.cc.o test/svc_end_to_end_test.cc.o test/svc_test.cc.o test/test_libvpx.cc.o test/test_vector_test.cc.o test/test_vectors.cc.o test/timestamp_test.cc.o test/user_priv_test.cc.o test/vp8_datarate_test.cc.o test/vp9_datarate_test.cc.o test/vp9_end_to_end_test.cc.o test/vp9_ethread_test.cc.o test/vp9_ext_ratectrl_test.cc.o test/vp9_lossless_test.cc.o test/vp9_motion_vector_test.cc.o test/vp9_skip_loopfilter_test.cc.o test/y4m_test.cc.o third_party/libwebm/mkvparser/mkvparser.cc.o third_party/libwebm/mkvparser/mkvreader.cc.o webmdec.cc.o y4menc.c.o y4minput.c.o -L. -lvpx -lgtest -lpthread -lm -lpthread
:info:build ld: warning: ignoring duplicate libraries: '-lpthread'
:info:build Undefined symbols for architecture x86_64:
:info:build "testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)", referenced from:
I have to edit /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/multimedia/libvpx/Portfile
and replace --enable-unit-tests
with --disable-unit-tests
and then run below command to install libvpx.
sudo port clean libvpx && sudo port install libvpx build_arch=x86_64
Also encountered error when installing dependnecy libgcc14
:info:build checking for suffix of object files... configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc14/libgcc14/work/build/x86_64-apple-darwin24/libgcc':
:info:build configure: error: cannot compute suffix of object files: cannot compile
:info:build See `config.log' for more details
:info:build make[2]: *** [configure-stage1-target-libgcc] Error 1
Updated Sep 22 2024 07:00 PDT
when I retried installing libgcc14
---> Fetching archive for libgcc14
---> Attempting to fetch libgcc14-14.2.0_1+stdlib_flag.darwin_24.x86_64.tbz2 from https://packages.macports.org/libgcc14
---> Attempting to fetch libgcc14-14.2.0_1+stdlib_flag.darwin_24.x86_64.tbz2 from http://mirror.fcix.net/macports/packages/libgcc14
---> Attempting to fetch libgcc14-14.2.0_1+stdlib_flag.darwin_24.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/libgcc14
---> Building libgcc14
Error: Failed to build libgcc14: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc14/libgcc14/main.log for details.
:info:build /opt/local/bin/ar rc libgcc.a $objects
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_trampoline.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_ctors.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_floatuntisf.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_floatuntidf.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_floatuntixf.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_floatuntitf.o) has no symbols
:info:build /opt/local/bin/ranlib libgcc.a
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_trampoline.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_ctors.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_floatuntisf.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_floatuntidf.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_floatuntixf.o) has no symbols
:info:build /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libgcc.a(_floatuntitf.o) has no symbols
:info:build # @multilib_flags@ is still needed because this may use
...........
:info:build ld: warning: -ld_classic is deprecated and will be removed in a future release
:info:build Undefined symbols for architecture x86_64:
:info:build "___deregister_frame_info", referenced from:
:info:build -reexported_symbols_list command line option
:info:build "___deregister_frame_info_bases", referenced from:
:info:build -reexported_symbols_list command line option
:info:build "___register_frame_info", referenced from:
:info:build -reexported_symbols_list command line option
:info:build "___register_frame_info_bases", referenced from:
:info:build -reexported_symbols_list command line option
:info:build "___register_frame_info_table", referenced from:
:info:build -reexported_symbols_list command line option
:info:build "___register_frame_info_table_bases", referenced from:
:info:build -reexported_symbols_list command line option
:info:build "___register_frame_table", referenced from:
:info:build -reexported_symbols_list command line option
:info:build ld: symbol(s) not found for architecture x86_64
:info:build collect2: error: ld returned 1 exit status
I find this ticket https://trac.macports.org/ticket/70641 opened on Aug 27 2024 and closed Sep 21 2024 This ticket opened an upstream ticket https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116809
Looks like this issue has not yet been solved yet on Sep 22 2024.
Updated Sep 27 2024 08:00 PDT
I checked https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116809 and find that GCC has merged the fix.
GCC Commits 2024-09-27 12:18:09 UTC
The master branch has been updated by Iain D Sandoe iains@gcc.gnu.org:
https://gcc.gnu.org/g:dd5b823ce238161156e7a4b6267bd30d7dde7c6b
commit r15-3924-gdd5b823ce238161156e7a4b6267bd30d7dde7c6b Author: Mark Mentovai mark@mentovai.com
I then
sudo port sync
sudo port clean libgcc14
and tried again this morning installing libgcc14 and I found macports installing newer libgcc14-14.2.0_2
while last week it was installing libgcc14-14.2.0_1
---> Fetching archive for libgcc14
---> Attempting to fetch libgcc14-14.2.0_2+stdlib_flag.darwin_24.x86_64.tbz2 from https://packages.macports.org/libgcc14
---> Attempting to fetch libgcc14-14.2.0_2+stdlib_flag.darwin_24.x86_64.tbz2.rmd160 from https://packages.macports.org/libgcc14
---> Installing libgcc14 @14.2.0_2+stdlib_flag
---> Activating libgcc14 @14.2.0_2+stdlib_flag
Now problem is solved for libgcc14.
I have to manually install rarian with -std=gnu89
sudo port clean rarian && sudo port install rarian build_arch=x86_64 configure.cflags="-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types -Wimplicit-function-declaration -std=gnu89 -Wno-error=implicit-function-declaration"
Finally, we need to make python311 default because all GnuCash python bindings are under python311
sudo port select --set python python312
sudo port select --set python3 python312
There are no GnuCash python bindings under python312
% python
Python 3.12.6 (main, Sep 7 2024, 05:15:33) [Clang 16.0.0 (clang-1600.0.26.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gnucash
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'gnucash'
These bindings are available under python311
% python
Python 3.11.10 (main, Sep 7 2024, 05:47:53) [Clang 16.0.0 (clang-1600.0.26.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gnucash
>>>