Created attachment 490964 [details] dev-ruby/bcrypt_pbkdf-1.0.0 emerge fails with undefined reference to SHA512* identifiers Emerge fails with undefined reference to SHA512* identifiers. Build.log and other files attached.
i686-pc-linux-gnu-gcc -I. -I/usr/include/ruby-2.3.0/i686-linux -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -D_FILE_OFFSET_BITS=64 -fPIC -march=i686 -pipe -fno-strict-aliasing -fPIC -o hash_sha512.o -c hash_sha512.c rm -f bcrypt_pbkdf_ext.so i686-pc-linux-gnu-gcc -shared -o bcrypt_pbkdf_ext.so explicit_bzero.o blowfish.o bcrypt_pbkdf_ext.o bcrypt_pbkdf.o hash_sha512.o -L. -L/usr/lib -L. -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lruby23 -lpthread -lgmp -ldl -lcrypt -lm -lc bcrypt_pbkdf.o: In function `bcrypt_pbkdf': bcrypt_pbkdf.c:(.text+0x35f): undefined reference to `SHA512Init' bcrypt_pbkdf.c:(.text+0x37e): undefined reference to `SHA512Update' bcrypt_pbkdf.c:(.text+0x396): undefined reference to `SHA512Final' bcrypt_pbkdf.c:(.text+0x3ec): undefined reference to `SHA512Init' bcrypt_pbkdf.c:(.text+0x40b): undefined reference to `SHA512Update' bcrypt_pbkdf.c:(.text+0x42b): undefined reference to `SHA512Update' bcrypt_pbkdf.c:(.text+0x440): undefined reference to `SHA512Final' bcrypt_pbkdf.c:(.text+0x4a0): undefined reference to `SHA512Init' bcrypt_pbkdf.c:(.text+0x4c0): undefined reference to `SHA512Update' bcrypt_pbkdf.c:(.text+0x4d5): undefined reference to `SHA512Final' collect2: error: ld returned 1 exit status make: *** [Makefile:256: bcrypt_pbkdf_ext.so] Error 1 make: Leaving directory '/var/tmp/portage/dev-ruby/bcrypt_pbkdf-1.0.0/work/ruby23/bcrypt_pbkdf-1.0.0/ext/mri'
(In reply to Willard Dawson from comment #0) > Emerge fails with undefined reference to SHA512* identifiers. Build.log and > other files attached. In the future could you please upload files separately?
(In reply to Hans de Graaff from comment #1) > bcrypt_pbkdf.c:(.text+0x35f): undefined reference to `SHA512Init' These methods are defined as "inline void" in a header file, which may be the cause, but I can't reproduce the problem, and thus not confirm possible fixes.
https://forums.gentoo.org/viewtopic-p-8121684.html Same here...
Any suggestions, then? I'm still having this problem on my old x86 box.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6f304336d036d81d199cd4be4a9975ec9840d5e commit f6f304336d036d81d199cd4be4a9975ec9840d5e Author: Hans de Graaff <graaff@gentoo.org> AuthorDate: 2018-04-02 06:55:36 +0000 Commit: Hans de Graaff <graaff@gentoo.org> CommitDate: 2018-04-02 06:55:36 +0000 fix compilation when functions are not inlined Closes: https://bugs.gentoo.org/629164 Package-Manager: Portage-2.3.24, Repoman-2.3.6 dev-ruby/bcrypt_pbkdf/bcrypt_pbkdf-1.0.0.ebuild | 3 +++ 1 file changed, 3 insertions(+)
I don't have an x86 to test this on, but can you confirm that the issue is not fixed and tests still pass?
I had meant to post my own patches to it, but basically the same - removing "inline" from three type declarations fixes it. I'm away from the x86 system in question this week, but I'm sure it will work (assuming a bit here, not having reviewed the proposed patch).