Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912049 - ERROR: app-crypt/rhash-1.4.4::gentoo_prefix failed (compile phase)
Summary: ERROR: app-crypt/rhash-1.4.4::gentoo_prefix failed (compile phase)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Other
: Normal normal
Assignee: Gentoo Prefix
URL: https://github.com/rhash/RHash/issues...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-10 22:38 UTC by Askar Bektassov
Modified: 2023-08-16 06:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,21.30 KB, application/octet-stream)
2023-08-10 22:44 UTC, Askar Bektassov
Details
emerge --info (emerge_info,5.27 KB, text/plain)
2023-08-10 22:44 UTC, Askar Bektassov
Details
rhash-1.4.4-ldflags.patch (rhash-1.4.4-ldflags.patch,519 bytes, patch)
2023-08-11 08:25 UTC, Askar Bektassov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Askar Bektassov 2023-08-10 22:38:41 UTC
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
Comment 1 Askar Bektassov 2023-08-10 22:44:18 UTC
Created attachment 867592 [details]
build.log
Comment 2 Askar Bektassov 2023-08-10 22:44:41 UTC
Created attachment 867593 [details]
emerge --info
Comment 3 Askar Bektassov 2023-08-11 08:25:47 UTC
Created attachment 867614 [details, diff]
rhash-1.4.4-ldflags.patch
Comment 4 Fabian Groffen gentoo-dev 2023-08-11 08:33:24 UTC
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?
Comment 5 ash 2023-08-16 02:23:34 UTC
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
Comment 6 Fabian Groffen gentoo-dev 2023-08-16 06:37:01 UTC
it is specific to any libc that doesn't have intl included
Comment 7 Larry the Git Cow gentoo-dev 2023-08-16 06:51:37 UTC
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(+)