Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjimmy committed Sep 22, 2024
1 parent 76368f7 commit 8fd2aa1
Showing 1 changed file with 132 additions and 3 deletions.
135 changes: 132 additions & 3 deletions _posts/2024-09-21-macports-2.10-gnucash-ports-failure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ tags:

**TLDR**

Wait until ​https://github.com/macports/macports-ports/pull/25835 merged and
use below command to install GnuCash in macOS 15.0 by macports 2.10
* 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

```bash
sudo port install gnucash build_arch=x86_64 configure.cflags="-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types"
sudo port install gnucash build_arch=x86_64 configure.cflags-append="-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 and libgcc14. Check below content for details.


**Content**

Expand Down Expand Up @@ -141,3 +145,128 @@ and
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
```bash
: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
```bash
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
```bash
: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`
```bash
sudo port clean netpbm && sudo port install netpbm build_arch=x86_64
```
Also encountered error when installing dependency libvpx
```bash
: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.
```bash
sudo port clean libvpx && sudo port install libvpx build_arch=x86_64
```
Also encountered error when installing dependnecy libgcc14
```bash
: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
```bash
: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.

0 comments on commit 8fd2aa1

Please sign in to comment.