Re: Trouble linking Crypto++ 5.1 on Debian unstable

4 views
Skip to first unread message

Wei Dai

unread,
Feb 4, 2004, 11:42:11 PM2/4/04
to crypto...@eskimo.com
On Wed, Feb 04, 2004 at 05:29:38PM -0500, J Smith wrote:
> I've been racking my brains out for a few hours trying to get Crypto++ 5.1 to
> compile fully on Debian unstable and have hit the perverbial wall. (Well,
> technically it does compile, it just doesn't link.)

Looks similar to this:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8249

Try taking out -fdata-sections.

J Smith

unread,
Feb 5, 2004, 11:22:24 AM2/5/04
to crypto...@eskimo.com, Wei Dai

Thanks, Wei. That definitely helped, as everything is linking now.

Runing "cryptest.exe v" does give an exception during the RSA suite test, so
I'll try playing with it some more and see what turns up.

If you're interested, the exception is as follows, and happens as soon as the
RSA testing begins.

CryptoPP::Exception caught: InvertibleRSAFunction: computational error during
private key operation

Again, thanks for the help, and thanks for Crypto++, it's a great library.

J

Wei Dai

unread,
Feb 5, 2004, 5:45:10 PM2/5/04
to J Smith, crypto...@eskimo.com
On Thu, Feb 05, 2004 at 11:12:38AM -0500, J Smith wrote:
> If you're interested, the exception is as follows, and happens as soon as the
> RSA testing begins.
>
> CryptoPP::Exception caught: InvertibleRSAFunction: computational error during
> private key operation

Try turning off optimization?

J Smith

unread,
Feb 6, 2004, 10:40:09 AM2/6/04
to Wei Dai, crypto...@eskimo.com

Yeah, I had tried that after my last post and it seemed to work. Just forgot
to post back the results. Methinks gcc 3.3.3 might be a tad bit unstable,
perhaps? Or perhaps this issue is simply limited to Debian. Either way, it
seems to be working now.

Thanks again, Wei.

J

J Smith

unread,
Feb 4, 2004, 6:09:19 PM2/4/04
to crypto...@eskimo.com

I've been racking my brains out for a few hours trying to get Crypto++ 5.1 to
compile fully on Debian unstable and have hit the perverbial wall. (Well,
technically it does compile, it just doesn't link.)

Here's a sample of the output from the test program build:

g++ -o cryptest.exe -O0 -DNDEBUG -ffunction-sections -fdata-sections -msse2
-pipe bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o
datatest.o regtest.o fipsalgt.o dlltest.o -L. -lcryptopp -Wl,--gc-sections
test.o(.bss._ZGVZNK8CryptoPP9SingletonINS_4OAEPINS_3SHAENS_10P1363_MGF1EEENS_9NewObjectIS4_EELi0EE3RefEzE9s_pObject+0x0):
multiple definition of `guard variable for
CryptoPP::Singleton<CryptoPP::OAEP<CryptoPP::SHA, CryptoPP::P1363_MGF1>,
CryptoPP::NewObject<CryptoPP::OAEP<CryptoPP::SHA, CryptoPP::P1363_MGF1> >,
(int)0>::Ref(...)::s_pObject const'
nch2.o(.bss._ZGVZNK8CryptoPP9SingletonINS_4OAEPINS_3SHAENS_10P1363_MGF1EEENS_9NewObjectIS4_EELi0EE3RefEzE9s_pObject+0x0):
first defined here

<snip similar messages>

collect2: ld returned 1 exit status
make: *** [cryptest.exe] Error 1


The libcryptopp.a library itself builds fine, but I can't get anything to link
to it, including the test program. I also have a PHP extension that wraps
much of Crypto++'s symetric cipher and hash algorithms, which dies similarly.

I've tried checking out the latest code from CVS, same problem. I've taken a
look at some of

Has anybody else hit this problem?

A few details if it will help:

- OS: Debian GNU/Linux 3.0 r1 Woody, installed from official CDs then
dist-upgraded to unstable

- gcc version: 3.3.3 20040125 (prerelease) (Debian)

- flags from the makefile:

CXXFLAGS = -O0 -DNDEBUG -ffunction-sections -fdata-sections
LDFLAGS = -Wl,--gc-sections
ARFLAGS = -cr


It's quite possible that I'm simply doing something stupid, as I rarely use
Debian. (Crypto++ works fine for me on Solaris, Red Hat, Gentoo and Windows,
so I'm hoping that the problem here isn't the user, although it wouldn't
surprise me.)

If anybody would like more information, I'll see what I can provide. Any
advice would be appreciated.

J

Reply all
Reply to author
Forward
0 new messages