Compilation errors building cryptopp 563 on solaris 10 using ancient solarisStudio 12.3 compiler

30 views
Skip to first unread message

Andrew Marlow

unread,
May 30, 2016, 4:55:27 AM5/30/16
to Crypto++ Users
Hello everyone,

I get the following compilation errors trying to build cryptopp 563 on solaris 10 using the using ancient solarisStudio 12.3 compiler (please don't laugh):

"ida.cpp", line 403: Error: random_access_iterator_tag is not defined.
"ida.cpp", line 403: Error: "," expected instead of ">".
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 408: Error: The operation "const int* != const unsigned char*" is illegal.
"ida.cpp", line 410: Error: The operation "const int* - const unsigned char*" is illegal.
"ida.cpp", line 412: Error: The operation "const unsigned char*const - const int*" is illegal.
9 Error(s) detected.
makefile.sun:42: recipe for target 'ida.o' failed

I tried a minor hack to ida.cpp, making the first line #include <iterator>, which should cause it to pick up the definition of random_access_iterator_tag. But this "fix" didn't work. Any ideas please?

Regards,

Andrew M.

Jeffrey Walton

unread,
May 30, 2016, 3:40:23 PM5/30/16
to Crypto++ Users
Hi Andrew,

Sorry for the late reply.

Can you get me access to the machine? Is SSH with PublicKey-only authentication (and an authorized_key file) possible?

My apologies for asking. I don't have access to Solaris at the moment, and the Solaris machines at the GCC compile farm are down.

Jeff

Andrew Marlow

unread,
May 31, 2016, 2:15:48 AM5/31/16
to Crypto++ Users


On Monday, 30 May 2016 20:40:23 UTC+1, Jeffrey Walton wrote:
Hi Andrew,

Sorry for the late reply.

Can you get me access to the machine?

No. I am a freelancer and the machine belongs to my client. Access is for their employees and constractors only. Sorry.

 
Is SSH with PublicKey-only authentication (and an authorized_key file) possible?

No. It's deliberately locked down to prevent access by the public.
 

My apologies for asking. I don't have access to Solaris at the moment, and the Solaris machines at the GCC compile farm are down.

Acess to solaris is not that tricky for projects that desire to support it. Being a freelancer I have my own solaris machine, which I occasionally use for client work. I got it on ebay for 200 pounds. What is slightly trickier is getting access to the proprietary sun compiler. I haven't managed to do that so I use gcc on my own solaris machine. That's no good for tackling this problem since the issue seems to be related to the compiler.

 

Jeffrey Walton

unread,
May 31, 2016, 7:24:14 PM5/31/16
to Crypto++ Users


My apologies for asking. I don't have access to Solaris at the moment, and the Solaris machines at the GCC compile farm are down.

Acess to solaris is not that tricky for projects that desire to support it. Being a freelancer I have my own solaris machine, which I occasionally use for client work. I got it on ebay for 200 pounds. What is slightly trickier is getting access to the proprietary sun compiler. I haven't managed to do that so I use gcc on my own solaris machine. That's no good for tackling this problem since the issue seems to be related to the compiler.

The Sun compilers are notorious at times. I've been nervous about them since we lost access to them. I think we have been skirting by, but its no way to approach Security Testing and Evaluation.

On a side note, Peter Guttman, who is the author of Cryptlib (http://www.cs.auckland.ac.nz/~pgut001/cryptlib/), once quipped (http://permalink.gmane.org/gmane.comp.encryption.cryptlib/2836):

    ... vendors have traditionally shipped truly ghastly C compilers
    (or, in Sun's case, a non-C compiler that pretended to be a
    compiler so you had to use all sorts of trickery to determine
    whether there was a real compiler present or not) ...

Jeff

Jeffrey Walton

unread,
Jun 6, 2016, 8:39:03 AM6/6/16
to Crypto++ Users


On Monday, May 30, 2016 at 4:55:27 AM UTC-4, Andrew Marlow wrote:

I'm still waiting for my Sun test rig to arrive. In the meantime...

Does zdeflate.cpp compile for you (make 'zdeflate.o')? It uses the same pattern.

Otherwise, maybe Sun puts <iterator> it in a different place? Can you try a 'grep -IR random_access_iterator_tag /usr/include'?

if you solved it, can you supply a Pull Request at http://github.com/weidai11/cryptopp/pulls.

Jeff

Jeffrey Walton

unread,
Jun 7, 2016, 6:30:52 AM6/7/16
to Crypto++ Users


On Monday, May 30, 2016 at 4:55:27 AM UTC-4, Andrew Marlow wrote:
Hello everyone,

I get the following compilation errors trying to build cryptopp 563 on solaris 10 using the using ancient solarisStudio 12.3 compiler (please don't laugh):

I've got a Solaris machine running SunOS 5.1 Rev 11.3 (Solaris 11.3) on real hardware. Its a Proliant DL360, which I believe provides an OEM environment for x86 Solaris. I could not find a reasonably proced UltraSPARC machine (though that's what I wanted because of the processor).

I'm ready to install Solaris Studio. My choices are 12.3, 12.4 and 12.5 (beta) Is one a better fit than the others for 11.3? Can all of them be installed side-by-side?

Jeff

Jeffrey Walton

unread,
Jun 7, 2016, 7:36:28 AM6/7/16
to Crypto++ Users


I get the following compilation errors trying to build cryptopp 563 on solaris 10 using the using ancient solarisStudio 12.3 compiler (please don't laugh):

"ida.cpp", line 403: Error: random_access_iterator_tag is not defined.
"ida.cpp", line 403: Error: "," expected instead of ">".
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 408: Error: The operation "const int* != const unsigned char*" is illegal.
"ida.cpp", line 410: Error: The operation "const int* - const unsigned char*" is illegal.
"ida.cpp", line 412: Error: The operation "const unsigned char*const - const int*" is illegal.
9 Error(s) detected.
makefile.sun:42: recipe for target 'ida.o' failed

I can duplicate this with:

$ gmake CXX=/opt/solarisstudio12.3/bin/CC ida.o
/opt/solarisstudio12.3/bin/CC -DNDEBUG -g2 -O2 -m32 -Wa,--divide         -pipe -c ida.cpp
CC: Warning: Option -g2 passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -pipe passed to ld, if ld is invoked, ignored otherwise
"ida.cpp", line 401: Error: random_access_iterator_tag is not defined.
...

There's a few problems with the Makefile. Here's what its supposed to look like:

$ git checkout CRYPTOPP_5_6_2
$ gmake CXX=/opt/solarisstudio12.3/bin/CC ida.o
/opt/solarisstudio12.3/bin/CC -DNDEBUG -O -g0 -native -template=no%extdef -m64 -c ida.cpp
$

Also, its not a simple matter of CXXFLAGS="-DNDEBUG -O -g0 -native -template=no%extdef -m64". Trying it results in the same failure.

Give me a day or two to work on it now that I have something to test against.

Jeff
 

Jeffrey Walton

unread,
Jun 7, 2016, 7:51:03 AM6/7/16
to Crypto++ Users

I get the following compilation errors trying to build cryptopp 563 on solaris 10 using the using ancient solarisStudio 12.3 compiler (please don't laugh):

"ida.cpp", line 403: Error: random_access_iterator_tag is not defined.
"ida.cpp", line 403: Error: "," expected instead of ">".
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 408: Error: The operation "const int* != const unsigned char*" is illegal.
"ida.cpp", line 410: Error: The operation "const int* - const unsigned char*" is illegal.
"ida.cpp", line 412: Error: The operation "const unsigned char*const - const int*" is illegal.
9 Error(s) detected.
makefile.sun:42: recipe for target 'ida.o' failed

We are now tracking this at Issue 179: Solaris Studio 12.3 and 12.4 builds broken (http://github.com/weidai11/cryptopp/issues/179).

Jeff

Jeffrey Walton

unread,
Jun 8, 2016, 9:59:02 PM6/8/16
to Crypto++ Users


On Monday, May 30, 2016 at 4:55:27 AM UTC-4, Andrew Marlow wrote:
Hello everyone,

I get the following compilation errors trying to build cryptopp 563 on solaris 10 using the using ancient solarisStudio 12.3 compiler (please don't laugh):

"ida.cpp", line 403: Error: random_access_iterator_tag is not defined.
"ida.cpp", line 403: Error: "," expected instead of ">".
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 407: Error: The function "RevIt" must have a prototype.
"ida.cpp", line 408: Error: The operation "const int* != const unsigned char*" is illegal.
"ida.cpp", line 410: Error: The operation "const int* - const unsigned char*" is illegal.
"ida.cpp", line 412: Error: The operation "const unsigned char*const - const int*" is illegal.
9 Error(s) detected.
makefile.sun:42: recipe for target 'ida.o' failed
Reply all
Reply to author
Forward
0 new messages