Looks similar to this:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8249
Try taking out -fdata-sections.
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
Try turning off optimization?
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
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