Page MenuHome GnuPG

_gcry_mpih_rshift undefined
Closed, ResolvedPublic

Description

compiling gnupg-2.0.9 with gcc-3.1 on HP Tru64.
Getting the following error:

make[3]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/doc'
make[2]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/doc'
Making all in tests
make[2]: Entering directory `/user01/dgrimes/cdev/gnupg-2.0.9/tests'
Making all in openpgp
make[3]: Entering directory `/user01/dgrimes/cdev/gnupg-2.0.9/tests/openpgp'
echo '#!/bin/sh' >./gpg_dearmor
echo "../../g10/gpg2 --no-options --no-greeting \

--no-secmem-warning --batch --dearmor" >>./gpg_dearmor

chmod 755 ./gpg_dearmor
./gpg_dearmor > ./pubring.gpg < ./pubring.asc
560787:../../g10/gpg2: /sbin/loader: Error: libgcrypt.so.11:
symbol "_gcry_mpih_rshift" unresolved
560787:../../g10/gpg2: /sbin/loader: Fatal Error: Load of "../../g10/gpg2"
failed: Unresolved symbol name
make[3]: * [pubring.gpg] Error 1
make[3]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/tests/openpgp'
make[2]:
* [all-recursive] Error 1
make[2]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/tests'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9'
make:
* [all] Error 2

It looks like _gcry_mpih_rshift and _gcry_mpih_lshift should be defined in
libgcrypt.so.11 but for some reason it's not. libgcrypt is installed. Here is
an nm of libgcrypt:

_gcry_mpih_add | 0004396972722912 | T | 0000000000000008
_gcry_mpih_add_1 | 0004396972722736 | T | 0000000000000008
_gcry_mpih_add_n | 0004396972756832 | T | 0000000000000008
_gcry_mpih_addmul_1 | 0004396972757504 | T | 0000000000000008
_gcry_mpih_cmp | 0004396972723440 | T | 0000000000000008
_gcry_mpih_divmod_1 | 0004396972740576 | T | 0000000000000008
_gcry_mpih_divrem | 0004396972739280 | T | 0000000000000008
_gcry_mpih_lshift | 0000000000000000 | U | 0000000000000000
_gcry_mpih_mod_1 | 0004396972738496 | T | 0000000000000008
_gcry_mpih_mul | 0004396972746912 | T | 0000000000000008
_gcry_mpih_mul_1 | 0004396972757376 | T | 0000000000000008
_gcry_mpih_mul_karatsuba_case | 0004396972745488 | T | 0000000000000008
_gcry_mpih_mul_n | 0004396972745040 | T | 0000000000000008
_gcry_mpih_release_karatsuba_ctx | 0004396972746656 | T | 0000000000000008
_gcry_mpih_rshift | 0000000000000000 | U | 0000000000000000
_gcry_mpih_sqr_n | 0004396972743792 | T | 0000000000000008
_gcry_mpih_sqr_n_basecase | 0004396972743376 | T | 0000000000000008
_gcry_mpih_sub | 0004396972723264 | T | 0000000000000008
_gcry_mpih_sub_1 | 0004396972723088 | T | 0000000000000008
_gcry_mpih_sub_n | 0004396972757104 | T | 0000000000000008
_gcry_mpih_submul_1 | 0004396972757696 | T | 0000000000000008

Everything is there except for rshift and lshift.

Event Timeline

dgrimes set Version to 2.0.9.
dgrimes added a subscriber: dgrimes.

That is not a GnuPG bug but one in libgcrypt.
These symbols are all libgrypt internal. How did you install libgcrypt and what
version? Running "libgcrypt-config --version" shows the version GnuPG has
tested for. Did you run the test programs from libgcrypt (e.g. benchmark.c)?

Hi,

Thanks for the quick response. I'm using version 1.4.0 and the only
modification I made was to cipher/random.h. I added #include
"gpg-errors.h" to get rid of an error I was receiving concerning
gpg_error_t. Other than that, to configure I just took the defaults by
running ./configure. Everything appeared to compile and install without
error. However, when running make check I see the following:

(hercules:dgrimes)[/user01/dgrimes/cdev/libgcrypt-1.4.0] make check
Making check in mpi
make[1]: Entering directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/mpi'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/mpi'
Making check in cipher
make[1]: Entering directory
`/user01/dgrimes/cdev/libgcrypt-1.4.0/cipher'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/cipher'
Making check in src
make[1]: Entering directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/src'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/src'
Making check in doc
make[1]: Entering directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/doc'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/doc'
Making check in tests
make[1]: Entering directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/tests'
make check-TESTS
make[2]: Entering directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/tests'
978823:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-version:
/sbin/loader
: Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
978823:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-version:
/sbin/loader
: Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-vers
ion" failed: Unresolved symbol name
FAIL: version
978882:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-t-mpi-bit:
/sbin/load
er: Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
978882:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-t-mpi-bit:
/sbin/load
er: Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-t-
mpi-bit" failed: Unresolved symbol name
FAIL: t-mpi-bit
978159:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-prime:
/sbin/loader:
Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
978159:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-prime:
/sbin/loader:
Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-prime"
failed: Unresolved symbol name
FAIL: prime
978899:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-register:
/sbin/loade
r: Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
978899:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-register:
/sbin/loade
r: Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-reg
ister" failed: Unresolved symbol name
FAIL: register
978936:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-ac:
/sbin/loader: Err
or: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
978936:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-ac:
/sbin/loader: Fat
al Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-ac" faile
d: Unresolved symbol name
FAIL: ac
978719:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-ac-schemes:
/sbin/loa
der: Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
978719:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-ac-schemes:
/sbin/loa
der: Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-a
c-schemes" failed: Unresolved symbol name
FAIL: ac-schemes
979117:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-ac-data:
/sbin/loader
: Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979117:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-ac-data:
/sbin/loader
: Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-ac-d
ata" failed: Unresolved symbol name
FAIL: ac-data
977100:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-basic:
/sbin/loader:
Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
977100:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-basic:
/sbin/loader:
Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-basic"
failed: Unresolved symbol name
FAIL: basic
979090:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-mpitests:
/sbin/loade
r: Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979090:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-mpitests:
/sbin/loade
r: Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-mpi
tests" failed: Unresolved symbol name
FAIL: mpitests
979132:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-tsexp:
/sbin/loader:
Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979132:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-tsexp:
/sbin/loader:
Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-tsexp"
failed: Unresolved symbol name
FAIL: tsexp
979005:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-keygen:
/sbin/loader:
Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979005:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-keygen:
/sbin/loader:
Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-keyge
n" failed: Unresolved symbol name
FAIL: keygen
979287:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-pubkey:
/sbin/loader:
Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979287:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-pubkey:
/sbin/loader:
Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-pubke
y" failed: Unresolved symbol name
FAIL: pubkey
979152:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-hmac:
/sbin/loader: E
rror: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979152:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-hmac:
/sbin/loader: F
atal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-hmac" f
ailed: Unresolved symbol name
FAIL: hmac
979314:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-keygrip:
/sbin/loader
: Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979314:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-keygrip:
/sbin/loader
: Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-keyg
rip" failed: Unresolved symbol name
FAIL: keygrip
979159:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-random:
/sbin/loader:
Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979159:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-random:
/sbin/loader:
Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-rando
m" failed: Unresolved symbol name
FAIL: random
979260:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-benchmark:
/sbin/load
er: Error: libgcrypt.so.11: symbol "_gcry_mpih_rshift" unresolved
979260:/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-benchmark:
/sbin/load
er: Fatal Error: Load of
"/user01/dgrimes/cdev/libgcrypt-1.4.0/tests/.libs/lt-be
nchmark" failed: Unresolved symbol name

FAIL: benchmark

16 of 16 tests failed

Please report to bug-libgcrypt@gnupg.org

make[2]: * [check-TESTS] Error 1
make[2]: Leaving directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/tests'
make[1]:
* [check-am] Error 2
make[1]: Leaving directory `/user01/dgrimes/cdev/libgcrypt-1.4.0/tests'
make: *** [check-recursive] Error 1

Let me know if you have any other questions or need additional info.

Thanks,
Dean

Can you please send me the file config.log by private mail (wk@gnupg.org).

Here you go. Just let me know if you need anything else.

Thanks,
Dean

Ah well, this is an alpha. As a quick workaround you can use

./configure --disable-asm

Although I don't understanmd what's going on tehre, there might be a problem
with prefix underscores in the symbols. According to you information this is
not the problem. Anyway I attach a patch.

What does an nm of the files
mpi/mpih-add1-asm.o
mpi/mpih-rshift-asm.o
.libs/mpi/mpih-add1-asm.o
.libs/mpi/mpih-rshift-asm.o
show? Are the symbols in listed in
.libs/libmpi.a
?

Here are the nm's .

mpi/mpih-add1-asm.o
.L0 | 0000000000000000 | N |
0000000000000000
.Lend | 0000000000000000 | N |
0000000000000000
.Loop | 0000000000000000 | N |
0000000000000000
.Loop0 | 0000000000000000 | N |
0000000000000000
_fpdata | 0000000000000000 | U |
0000000000000000
_gcry_mpih_add_n | 0000000000000000 | T |
0000000000000008

mpi/mpih-rshift-asm.o
.R0 | 0000000000000000 | N |
0000000000000000
.Rend | 0000000000000000 | N |
0000000000000000
.Roop | 0000000000000000 | N |
0000000000000000
.Roop0 | 0000000000000000 | N |
0000000000000000
_fpdata | 0000000000000000 | U |
0000000000000000
_gcry_mpih_rshift | 0000000000000000 | T |
0000000000000008

.libs/mpi/mpih-add1-asm.o
.L0 | 0000000000000000 | N |
0000000000000000
.Lend | 0000000000000000 | N |
0000000000000000
.Loop | 0000000000000000 | N |
0000000000000000
.Loop0 | 0000000000000000 | N |
0000000000000000
_fpdata | 0000000000000000 | U |
0000000000000000
_gcry_mpih_add_n | 0000000000000000 | T |
0000000000000008

.libs/mpi/mpih-rshift-asm.o
.R0 | 0000000000000000 | N |
0000000000000000
.Rend | 0000000000000000 | N |
0000000000000000
.Roop | 0000000000000000 | N |
0000000000000000
.Roop0 | 0000000000000000 | N |
0000000000000000
_fpdata | 0000000000000000 | U |
0000000000000000
_gcry_mpih_rshift | 0000000000000000 | T |
0000000000000008

Applying the patch did not help but using --disable-asm did work.

Libgcrypt did compile and pass its tests. I was able to get gnupg-2.0.9
to compile and it installed. However, I did receive the following error
on make check:

All 1 tests passed

make[2]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/jnlib'
make[1]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/jnlib'
Making check in common
make[1]: Entering directory `/user01/dgrimes/cdev/gnupg-2.0.9/common'
make check-am
make[2]: Entering directory `/user01/dgrimes/cdev/gnupg-2.0.9/common'
make check-TESTS
make[3]: Entering directory `/user01/dgrimes/cdev/gnupg-2.0.9/common'
PASS: t-convert
t-gettime.c:68: test 0 failed
t-gettime.c:80: test 0 failed
t-gettime.c:68: test 1 failed
t-gettime.c:80: test 1 failed
t-gettime.c:68: test 2 failed
t-gettime.c:80: test 2 failed
t-gettime.c:68: test 3 failed
t-gettime.c:80: test 3 failed
t-gettime.c:68: test 9 failed
t-gettime.c:80: test 9 failed
t-gettime.c:68: test 10 failed
t-gettime.c:80: test 10 failed
t-gettime.c:68: test 11 failed
t-gettime.c:80: test 11 failed
t-gettime.c:68: test 12 failed
t-gettime.c:80: test 12 failed
t-gettime.c:68: test 13 failed
t-gettime.c:80: test 13 failed
t-gettime.c:68: test 14 failed
t-gettime.c:80: test 14 failed
FAIL: t-gettime
PASS: t-sysutils

PASS: t-sexputil

1 of 4 tests failed

Please report to bug-gnupg@gnupg.org

make[3]: * [check-TESTS] Error 1
make[3]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/common'
make[2]:
* [check-am] Error 2
make[2]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/common'
make[1]: * [check] Error 2
make[1]: Leaving directory `/user01/dgrimes/cdev/gnupg-2.0.9/common'
make:
* [check-recursive] Error 1

Is this important? Is it something I need to get fixed before the system
would be considered stable?

Thanks,
Dean

I do not understand what is going on. rshift does not look different than add1.
Weird. Comparing with the non-asm versions might give further insight.

t-gettime: There is a reported problem on some systems if esoteric POSIX time
options (using the TAI zone) are used. We have a bug report somewhere. I doubt
that there is a real problem. You can look into it by

cd common
./t-gettime --verbose
werner claimed this task.
werner removed a project: Stalled.
werner added a project: Too Old.