gcc 2.95.2 compilation problems

6 views
Skip to first unread message

Chris Bourke

unread,
Sep 30, 2002, 4:19:24 PM9/30/02
to crypto...@eskimo.com

I'm trying to compile crypto++ 4.2 in a unix environment using gcc 2.95.2,
but I get the following errors:

gmake -f GNUmakefile
g++ -g -pipe -c 3way.cpp
g++: -pipe is not supported.
gmake: *** [3way.o] Error 1

does 4.2 NOT support gcc 2.95.2 as it says?

Wei Dai

unread,
Sep 30, 2002, 4:44:37 PM9/30/02
to crypto...@eskimo.com
Maybe it's something with your OS that makes -pipe not supported. But it
just makes the compile go faster and is not crucial. Edit GNUmakefile in
your Crypto++ directory and delete "-pipe".

Chris Bourke

unread,
Oct 1, 2002, 11:39:06 AM10/1/02
to crypto...@eskimo.com


> Maybe it's something with your OS that makes -pipe not supported. But it
> just makes the compile go faster and is not crucial. Edit GNUmakefile in
> your Crypto++ directory and delete "-pipe".

I got rid of the reference to the -pipe flag, but now I get a whole lot of
error messages:

3way.cpp:20: parse error before `{'
3way.cpp:20: stray '\' in program
3way.cpp:21: stray '\' in program
3way.cpp:22: `a0' was not declared in this scope
3way.cpp:22: stray '\' in program
3way.cpp:23: ANSI C++ forbids declaration `a0' with no type
3way.cpp:23: `a2' was not declared in this scope
3way.cpp:23: stray '\' in program
3way.cpp:24: ANSI C++ forbids declaration `a2' with no type
3way.cpp:24: stray '\' in program
3way.cpp:28: parse error before `{'
3way.cpp:28: stray '\' in program
3way.cpp:29: stray '\' in program
3way.cpp:30: ANSI C++ forbids declaration `b2' with no type
3way.cpp:30: `a2' was not declared in this scope
3way.cpp:30: implicit declaration of function `int rotlFixed(...)'
3way.cpp:30: stray '\' in program
3way.cpp:31: ANSI C++ forbids declaration `b0' with no type
3way.cpp:31: `a0' was not declared in this scope
3way.cpp:31: stray '\' in program
3way.cpp:32: ANSI C++ forbids declaration `a0' with no type
3way.cpp:32: `a1' was not declared in this scope
3way.cpp:32: stray '\' in program
3way.cpp:33: ANSI C++ forbids declaration `a2' with no type
3way.cpp:33: `a1' was not declared in this scope
3way.cpp:33: stray '\' in program
3way.cpp:34: syntax error before `^='
3way.cpp:34: stray '\' in program
3way.cpp:39: stray '\' in program
3way.cpp:40: stray '\' in program
3way.cpp:41: ANSI C++ forbids declaration `c' with no type
3way.cpp:41: `a1' was not declared in this scope
3way.cpp:41: stray '\' in program
3way.cpp:42: ANSI C++ forbids declaration `c' with no type
3way.cpp:42: redefinition of `int c'
3way.cpp:41: `int c' previously defined here
3way.cpp:42: stray '\' in program
3way.cpp:43: ANSI C++ forbids declaration `b0' with no type
3way.cpp:43: redefinition of `int b0'
3way.cpp:31: `int b0' previously defined here
3way.cpp:43: `a1' was not declared in this scope
3way.cpp:43: stray '\' in program
3way.cpp:44: ANSI C++ forbids declaration `b1' with no type
3way.cpp:44: `a1' was not declared in this scope
3way.cpp:44: `a1' was not declared in this scope
3way.cpp:44: stray '\' in program
3way.cpp:45: syntax error before `^='
3way.cpp:45: stray '\' in program
3way.cpp:46: syntax error before `^='
3way.cpp:46: stray '\' in program
3way.cpp:47: syntax error before `^='
3way.cpp:47: stray '\' in program
3way.cpp:51: stray '\' in program
3way.cpp:52: stray '\' in program
3way.cpp:52: stray '\' in program
3way.cpp:53: stray '\' in program
3way.cpp:53: stray '\' in program
3way.cpp:56: `word32' was not declared in this scope
3way.cpp:56: parse error before `,'
3way.cpp: In function `void GenerateRoundConstants(...)':
3way.cpp:58: `rounds' undeclared (first use this function)
3way.cpp:58: (Each undeclared identifier is reported only once
3way.cpp:58: for each function it appears in.)
3way.cpp:60: `rtab' undeclared (first use this function)
3way.cpp:60: `strt' undeclared (first use this function)
3way.cpp: At top level:
3way.cpp:66: syntax error before `::'
3way.cpp:70: `START_E' was not declared in this scope
3way.cpp:70: `rc' was not declared in this scope
3way.cpp:70: ANSI C++ forbids declaration `GenerateRoundConstants' with no type
3way.cpp:70: `int GenerateRoundConstants' redeclared as different kind of symbol
3way.cpp:57: previous declaration of `void GenerateRoundConstants(...)'
3way.cpp:70: initializer list being treated as compound expression
3way.cpp:71: parse error before `for'
3way.cpp:71: parse error before `;'
3way.cpp:71: syntax error before `++'
3way.cpp:75: syntax error before `::'
3way.cpp:80: syntax error before `::'
3way.cpp:89: ANSI C++ forbids declaration `a0' with no type
3way.cpp:89: redefinition of `int a0'
3way.cpp:32: `int a0' previously defined here
3way.cpp:89: `word32' was not declared in this scope
3way.cpp:89: parse error before `)'
3way.cpp:90: ANSI C++ forbids declaration `a1' with no type
3way.cpp:90: `word32' was not declared in this scope
3way.cpp:90: parse error before `)'
3way.cpp:90: `in' was not declared in this scope
3way.cpp:91: ANSI C++ forbids declaration `a2' with no type
3way.cpp:91: redefinition of `int a2'
3way.cpp:33: `int a2' previously defined here
3way.cpp:91: `word32' was not declared in this scope
3way.cpp:91: parse error before `)'
3way.cpp:91: `in' was not declared in this scope
3way.cpp:94: parse error before `for'
3way.cpp:94: parse error before `;'
3way.cpp:94: syntax error before `++'
3way.cpp:97: syntax error before `^='
3way.cpp:98: syntax error before `^='
3way.cpp:99: stray '\' in program
3way.cpp:101: syntax error before `^='
3way.cpp:102: syntax error before `^='
3way.cpp:103: syntax error before `^='
3way.cpp:104: stray '\' in program
3way.cpp:111: parse error before `*'
3way.cpp:112: parse error before `*'
3way.cpp:113: parse error before `*'
3way.cpp:117: syntax error before `::'
3way.cpp:121: `START_D' was not declared in this scope
3way.cpp:121: `rc' was not declared in this scope
3way.cpp:121: ANSI C++ forbids declaration `GenerateRoundConstants' with no type
3way.cpp:121: redefinition of `int GenerateRoundConstants'
3way.cpp:70: `int GenerateRoundConstants' previously defined here
3way.cpp:121: initializer list being treated as compound expression
3way.cpp:122: parse error before `for'
3way.cpp:122: parse error before `;'
3way.cpp:122: syntax error before `++'
3way.cpp:124: stray '\' in program
3way.cpp:125: stray '\' in program
3way.cpp:126: ANSI C++ forbids declaration `k' with no type
3way.cpp:126: implicit declaration of function `int byteReverse(...)'
3way.cpp:126: invalid initializer
3way.cpp:127: ANSI C++ forbids declaration `k' with no type
3way.cpp:127: conflicting types for `int k[1]'
3way.cpp:126: previous declaration as `int k[0]'
3way.cpp:127: invalid initializer
3way.cpp:128: ANSI C++ forbids declaration `k' with no type
3way.cpp:128: conflicting types for `int k[2]'
3way.cpp:127: previous declaration as `int k[1]'
3way.cpp:128: invalid initializer
3way.cpp:129: parse error before `}'
3way.cpp:131: syntax error before `::'
3way.cpp:136: syntax error before `::'
3way.cpp:141: ANSI C++ forbids declaration `a0' with no type
3way.cpp:141: redefinition of `int a0'
3way.cpp:89: `int a0' previously defined here
3way.cpp:141: `word32' was not declared in this scope
3way.cpp:141: parse error before `)'
3way.cpp:142: ANSI C++ forbids declaration `a1' with no type
3way.cpp:142: redefinition of `int a1'
3way.cpp:90: `int a1' previously defined here
3way.cpp:142: `word32' was not declared in this scope
3way.cpp:142: parse error before `)'
3way.cpp:142: `in' was not declared in this scope
3way.cpp:143: ANSI C++ forbids declaration `a2' with no type
3way.cpp:143: redefinition of `int a2'
3way.cpp:91: `int a2' previously defined here
3way.cpp:143: `word32' was not declared in this scope
3way.cpp:143: parse error before `)'
3way.cpp:143: `in' was not declared in this scope
3way.cpp:150: stray '\' in program
3way.cpp:151: parse error before `for'
3way.cpp:151: parse error before `;'
3way.cpp:151: syntax error before `++'
3way.cpp:154: syntax error before `^='
3way.cpp:155: syntax error before `^='
3way.cpp:156: stray '\' in program
3way.cpp:158: syntax error before `^='
3way.cpp:159: syntax error before `^='
3way.cpp:160: syntax error before `^='
3way.cpp:161: stray '\' in program
3way.cpp:162: stray '\' in program
3way.cpp:165: parse error before `*'
3way.cpp:166: parse error before `*'
3way.cpp:167: parse error before `*'

Wei Dai

unread,
Oct 1, 2002, 12:46:34 PM10/1/02
to crypto...@eskimo.com
You forgot to use the -a option when unzipping.

Chris Bourke

unread,
Oct 1, 2002, 3:24:45 PM10/1/02
to crypto...@eskimo.com

> You forgot to use the -a option when unzipping.
>

Bingo, that was indeed the problem. However, the entire library is still
not compiling properly. It goes along until it tries to compile
cryptlib.cpp, then we get the following:

cryptlib.cpp: In method `class string
CryptoPP::NullRNG()::NullRNG::AlgorithmNam
e() const':
cryptlib.cpp:125: Internal compiler error in `scope_die_for', at
dwarf2out.c:779
4
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.
gmake: *** [cryptlib.o] Error 1

So, is it really a bug in the gcc compiler or is there something else
wrong?

Wei Dai

unread,
Oct 1, 2002, 3:35:23 PM10/1/02
to crypto...@eskimo.com
Looks like a compiler bug to me, although I have been able to compile
Crypto++ 5.0 with GCC 2.95.2 on one of the SourceForge compile farm
machines, so it might be something specific to the GCC for your platform.
Try upgrading it.

Zooko

unread,
Oct 1, 2002, 4:03:59 PM10/1/02
to crypto...@eskimo.com

Wei Dai wrote:
>
> Looks like a compiler bug to me, although I have been able to compile
> Crypto++ 5.0 with GCC 2.95.2 on one of the SourceForge compile farm
> machines, so it might be something specific to the GCC for your platform.
> Try upgrading it.

Did you compile Crypto++ 5.0 on MacOSX? That would be exciting. The Mnet
project [1] has not yet succeeded at compiling and linking any version of
Crypto++ on MacOSX, and that is why Mnet doesn't run on MacOSX yet.

Regards,

Zooko

[1] http://mnet.sf.net/


Wei Dai

unread,
Oct 1, 2002, 4:37:06 PM10/1/02
to crypto...@eskimo.com
On Tue, Oct 01, 2002 at 03:50:12PM -0400, Zooko wrote:
> Did you compile Crypto++ 5.0 on MacOSX? That would be exciting. The Mnet
> project [1] has not yet succeeded at compiling and linking any version of
> Crypto++ on MacOSX, and that is why Mnet doesn't run on MacOSX yet.

No I didn't. I think I compiled Crypto++ 5.0 with GCC 2.95.2 on FreeBSD or
Linux.

You can't compile any version of Crypto++ on MacOS X, even with the latest
GCC and binutils? Have you tried to work with GCC developers to debug the
problem?

Brian Quirt

unread,
Oct 1, 2002, 4:41:02 PM10/1/02
to Crypto
Tue, 1 Oct 2002 16:23:37 -0400Wei Daiw...@weidai.com

>You can't compile any version of Crypto++ on MacOS X, even with the
>latest GCC and binutils? Have you tried to work with GCC developers to
>debug the problem?

One part of the problem may be that Apple's moving towards gcc 3.x
for new development, but they're only releasing it as part of OSX 10.2.x-
only packages (and since 10.2.x a) is full-price even for those who own
10.1.x, and b) isn't even compatible with all 10.1.x applications, there
are quite a few (myself included) who haven't switched yet (although if I
weren't living on a student budget I might well have switched by now).

-Brian

--
Brian Quirt (bri...@ncf.ca)
Proud Member of the Society for the Conservation of Angular Momentum
Visit the society web site at <http://www.ncf.ca/~cy856/bio/scam.html>
Or visit my web site at <http://www.ncf.ca/~cy856/>


Wei Dai

unread,
Oct 1, 2002, 4:51:24 PM10/1/02
to crypto...@eskimo.com
On Tue, Oct 01, 2002 at 03:50:12PM -0400, Zooko wrote:
> Did you compile Crypto++ 5.0 on MacOSX? That would be exciting. The Mnet
> project [1] has not yet succeeded at compiling and linking any version of
> Crypto++ on MacOSX, and that is why Mnet doesn't run on MacOSX yet.

I'd like to get this problem fixed. According to this thread:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=adf08a26.0208111546.659b0f78%40posting.google.com&rnum=1&prev=/groups%3Fq%3Dconstructors_used%26hl%3Den%26lr%3D%26ie%3DUTF-8%26sa%3DN%26scoring%3Dd
the ".constructors_used" problem can be fixed by running 'sudo gcc_select
3'.

Jan Gacnik reported compile errors with GCC 3.1 on MacOS. Can either of
you please post the error messages?

Wei Dai

unread,
Oct 1, 2002, 4:54:02 PM10/1/02
to crypto...@eskimo.com
On Tue, Oct 01, 2002 at 05:32:41PM -0300, Brian Quirt wrote:
> One part of the problem may be that Apple's moving towards gcc 3.x
> for new development, but they're only releasing it as part of OSX 10.2.x-
> only packages (and since 10.2.x a) is full-price even for those who own
> 10.1.x, and b) isn't even compatible with all 10.1.x applications, there
> are quite a few (myself included) who haven't switched yet (although if I
> weren't living on a student budget I might well have switched by now).

You can download GCC 3.x directly from gcc.gnu.org. Build and install it,
and then run 'sudo gcc_select 3'. Please try that and let me know if it
works.

Jan Gacnik

unread,
Oct 1, 2002, 6:52:32 PM10/1/02
to crypto...@eskimo.com
Hello,

Hello.

This is message (I sent you the whole make dump to your private
address).

c++ -g -pipe -fno-pic -c rsa.cpp
{standard input}:6807:FATAL:Symbol
__ZN8CryptoPP16PK_FinalTemplateINS_16TF_EncryptorImplINS_16TF_SchemeOpti
onsINS_5TF_ESINS_8PKCS1v15ENS_3RSAEiEES5_NS_28PKCS_EncryptionPaddingSche
meEEEEEEC4INS2_INS_6TF_SSAIS4_NS_3SHAES5_iEES5_NS_27PKCS_SignaturePaddin
gSchemeEEEEEz already defined.

JG

Michael Monsen

unread,
Nov 5, 2002, 5:12:59 PM11/5/02
to crypto...@eskimo.com
While visiting the prison at D'Ni on Wed, 2 Oct 2002 00:41:34 +0200, Jan
Gacnik <gac...@stud.uni-hannover.de> was overheard saying to the guard:

>Hello,
>
>Hello.
>
>This is message (I sent you the whole make dump to your private
>address).
>
>c++ -g -pipe -fno-pic -c rsa.cpp
>{standard input}:6807:FATAL:Symbol
>__ZN8CryptoPP16PK_FinalTemplateINS_16TF_EncryptorImplINS_16TF_SchemeOpti
>onsINS_5TF_ESINS_8PKCS1v15ENS_3RSAEiEES5_NS_28PKCS_EncryptionPaddingSche
>meEEEEEEC4INS2_INS_6TF_SSAIS4_NS_3SHAES5_iEES5_NS_27PKCS_SignaturePaddin
>gSchemeEEEEEz already defined.

Was this ever resolved? I'm seeing the same behavior on my MacOS X
Jaguar (10.2.1) box. I tried using "sudo gcc_select 3" but it did not
make a difference, I still get the error (the result of the command said
that I was already using gcc 3.1)

I'd be happy to provide any other debugging output or other
information needed.
--
**Disclaimer: Opinions cited by me are not necessarily my opinions.
Facts cited by me are not necessarily facts.

Wei Dai

unread,
Nov 5, 2002, 7:49:25 PM11/5/02
to crypto...@eskimo.com
It's probably a bug in GCC 3.1. Please try upgrading to 3.2 or later, and
let us know the result.

Michael Monsen

unread,
Nov 6, 2002, 3:21:55 PM11/6/02
to crypto...@eskimo.com
While visiting the prison at D'Ni on Tue, 5 Nov 2002 19:42:56 -0500, Wei
Dai <wei...@weidai.com> was overheard saying to the guard:

>It's probably a bug in GCC 3.1. Please try upgrading to 3.2 or later, and
>let us know the result.

OK, to follow up on this problem:

I used the command "sudo gcc_select 2" to switch the default compiler
to gcc 2.95. Compiling Crypto++ 5.0 worked great, and all of the
tests/benchmarks passed.
If I switch back to gcc 3.1 which is the default compiler for MacOS
10.2.1, then of course I get the error that was talked about in this
thread. Also, it doesn't seem to like the -fno-coalesce-templates option
(perhaps this doesn't exist for gcc 3.1?) After removing that compiler
option it would begin to compile but then error out on rsa.cpp, like
before.

I would happily upgrade to gcc 3.2, except that it is my understanding
that the version of gcc that Apple includes with MacOS X includes some
Apple extensions for MacOS X. I think I will have to either use gcc 2.95
or wait for Apple to update their Developer Tools with gcc 3.2.

When Apple releases gcc 3.2 for MacOS X I'll get back to the mailing
list with the results.

Wei Dai

unread,
Nov 6, 2002, 3:57:30 PM11/6/02
to crypto...@eskimo.com
On Wed, Nov 06, 2002 at 01:15:54PM -0700, Michael Monsen wrote:
> I would happily upgrade to gcc 3.2, except that it is my understanding
> that the version of gcc that Apple includes with MacOS X includes some
> Apple extensions for MacOS X. I think I will have to either use gcc 2.95
> or wait for Apple to update their Developer Tools with gcc 3.2.

I have the impression (may have read somewhere) that gcc 3.2 already
works fine on MacOS X without extensions. You might want to double check
that or just try it out.

Reply all
Reply to author
Forward
0 new messages