ld complains Undefined symbols for architecture arm64 during the following command arm64-apple-darwin21-gcc calc_sums.o hash_print.o common_func.o hash_update.o file.o file_mask.o file_set.o find_file.o hash_check.o output.o parse_cmdline.o rhash_main.o win_utils.o librhash/librhash.1.dylib -Wl,-dead_strip_dylibs -o rhash Reproducible: Always Steps to Reproduce: emerge rhash Actual Results: arm64-apple-darwin21-gcc calc_sums.o hash_print.o common_func.o hash_update.o file.o file_mask.o file_set.o find_file.o hash_check.o output.o parse_cmdline.o rhash_main.o win_utils.o librhash/librhash.1.dylib -Wl,-dead_strip_dylibs -o rhash Undefined symbols for architecture arm64: "_libintl_bindtextdomain", referenced from: _main in rhash_main.o "_libintl_gettext", referenced from: _rename_file_by_embeding_crc32 in calc_sums.o _save_torrent_to in calc_sums.o _print_sfv_banner in hash_print.o _fix_sfv_header in hash_update.o _update_ctx_free in hash_update.o _process_hash_file in hash_check.o _check_embedded_crc32 in hash_check.o ... "_libintl_setlocale", referenced from: _main in rhash_main.o "_libintl_textdomain", referenced from: _main in rhash_main.o ld: symbol(s) not found for architecture arm64 collect2: error: ld returned 1 exit status make: *** [Makefile:153: rhash] Error 1 Expected Results: successful emerge The problem seems to be the line 879 in ~/Gentoo/var/tmp/portage/app-crypt/rhash-1.4.4/work/RHash-1.4.4/configure unpack the package ebuild Gentoo/var/db/repos/gentoo/app-crypt/rhash/rhash-1.4.4.ebuild unpack open the above file and replace the line RHASH_LDFLAGS=$RHASH_LDFLAGS $GETTEXT_LDFLAGS with RHASH_LDFLAGS="$RHASH_LDFLAGS $GETTEXT_LDFLAGS" complete the emerge By applying the above change after ebuild Gentoo/var/db/repos/gentoo/app-crypt/rhash/rhash-1.4.4.ebuild compile qmerge clean
Created attachment 867592 [details] build.log
Created attachment 867593 [details] emerge --info
Created attachment 867614 [details, diff] rhash-1.4.4-ldflags.patch
yeah, I suggested the same thing upstream, but they turned it into https://github.com/rhash/RHash/commit/c804982d1b24c6533118b3068d2cfdca685076f3 @chewi ok to apply upstream's patch to 1.4.4?
This isn't architecture-specific, I'm getting similar output on x86_64: x86_64-apple-darwin22-gcc calc_sums.o hash_print.o common_func.o hash_update.o file.o file_mask.o file_set.o find_file.o hash_check.o output.o parse_cmdline.o rhash_main.o win_utils.o librhash/librhash.1.dylib -Wl,-dead_strip_dylibs -o rhash Undefined symbols for architecture x86_64: "_libintl_bindtextdomain", referenced from: _main in rhash_main.o "_libintl_gettext", referenced from: _rename_file_by_embeding_crc32 in calc_sums.o _save_torrent_to in calc_sums.o _print_sfv_banner in hash_print.o _fix_sfv_header in hash_update.o _update_ctx_free in hash_update.o _process_hash_file in hash_check.o _check_embedded_crc32 in hash_check.o ... "_libintl_setlocale", referenced from: _main in rhash_main.o "_libintl_textdomain", referenced from: _main in rhash_main.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *** [Makefile:153: rhash] Error 1
it is specific to any libc that doesn't have intl included
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74c411795d3f134255c42bfcd3f6863eda2a0517 commit 74c411795d3f134255c42bfcd3f6863eda2a0517 Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2023-08-16 06:51:09 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2023-08-16 06:51:09 +0000 app-crypt/rhash: Apply upstream patch to fix prefix re libintl Closes: https://bugs.gentoo.org/912049 Signed-off-by: James Le Cuirot <chewi@gentoo.org> app-crypt/rhash/files/rhash-1.4.4-prefix.patch | 22 ++++++++++++++++++++++ app-crypt/rhash/rhash-1.4.4.ebuild | 4 ++++ 2 files changed, 26 insertions(+)