Hello everyone,

I am trying out cryptopp-565 to see if it resolves the problems I have been 
seeing on Solaris 11 using the Sun compiler version 12.4. To this end I 
have written a standalone program that shows the problem. When I got 
version 565 I thought I would try building my test program with g++ first. 
The cryptopp lib itself builds fine and the tests all run and pass. The 
benchworks also seem ok. And it all works on RHEL 6.8 and my test program 
works ok there also. But on solaris 11 where I have g++ version 4.8.2 I get 
a compilation error:

g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c apmtest.cpp
In file included from apmtest.cpp:6:0:
config.h:582:34: error: operator '>=' has no left operand
 #if ((__ILP32__ >= 1) || (_ILP32 >= 1)) && defined(__x86_64__)

Since this is fine on RHEL I presume the problem is related to the solaris 
environment. It looks like there the _IP32 macro is not defined. I notice 
that the Sun/Oracle documentation at 
https://docs.oracle.com/cd/E19683-01/806-6543/chapter4-2/index.html says 
that this macro is used to say that the sizes of int, long, and pointer are 
all 32 bits. There is something strange about that macro though. Here is 
another little program that fails to compile:-

#include <iostream>

int main()
#if defined(_ILP32)
    std::cout << "_ILP32 macro is [" << _ILP32 << "]\n";
    std::cout << "_ILP32 macro is not defined.\n";
    return 0;

This fails with:

huh.cpp: In function int main():
huh.cpp:6:48: error: expected primary-expression before << token
     std::cout << "_ILP32 macro is [" << _ILP32 << "]\n";

Is anyone else seeing this issue with g++? This program compiles ok on RHEL 
and outputs that _ILP32 is not defined.

If I change the cryptopp header config.h bit to read:
#if defined(__x86_64__) && ((__ILP32__ >= 1) || defined(_ILP32))

then the problem goes away. This indicates to me that it is a bug in 
cryptopp-585 in that one is not supposed to use or test the macro value for 
_ILP32, only that it is defined.


Andrew Marlow

You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
More information about Crypto++ and this group is available at 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to