> There are no problems with GCC on RHEL 5.11 or 6.8. We only get the problems
> on Solaris 10 and 11 with the solaris compiler. I tried building with GCC,
> even though we can't use it on solaris for our project, just to see what
> would happen. Unfortunately, I got compilation errors.
>
> g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c pkcspad.cpp
> cryptlib.cpp:51:95: error: init_priority attribute is not supported on this
> platform
>  const std::string DEFAULT_CHANNEL __attribute__ ((init_priority
> (CRYPTOPP_INIT_PRIORITY + 25))) = "";
>
> ^
> cryptlib.cpp:52:91: error: init_priority attribute is not supported on this
> platform
>  const std::string AAD_CHANNEL __attribute__ ((init_priority
> (CRYPTOPP_INIT_PRIORITY + 26))) = "AAD";
>
> ^
> cryptlib.cpp:76:120: error: init_priority attribute is not supported on this
> platform
>  const simple_ptr<NullNameValuePairs> s_pNullNameValuePairs __attribute__
> ((init_priority (CRYPTOPP_INIT_PRIORITY + 30))) = new NullNameValuePairs;

You do a good job of finding gaps... Try Setting
CRYPTOPP_INIT_PRIORITY=0. It is the safety valve.

    g++ -DNDEBUG -DCRYPTOPP_INIT_PRIORITY=0 -g2 -O2 -fPIC -pipe -c pkcspad.cpp

We detect *lack of* init_priority in the makefile around line 735
(https://github.com/weidai11/cryptopp/blob/master/GNUmakefile#L735).
Right now, its disabled for MacPorts GCC because that's the only
compiler we were aware.

We enable init_priority in two source files if it has not been
explicitly disabled by the makefile. You are interested in this macro
from around line 30
(https://github.com/weidai11/cryptopp/blob/master/cpu.cpp#L28):

// MacPorts/GCC does not provide constructor(priority). Apple/GCC and
Fink/GCC do provide it.
#define HAVE_GCC_CONSTRUCTOR1 (__GNUC__ && (CRYPTOPP_INIT_PRIORITY >
0) && ((CRYPTOPP_GCC_VERSION >= 40300) || (CRYPTOPP_LLVM_CLANG_VERSION
>= 20900) || (_INTEL_COMPILER >= 300)) && !(MACPORTS_GCC_COMPILER >
0))
#define HAVE_GCC_CONSTRUCTOR0 (__GNUC__ && (CRYPTOPP_INIT_PRIORITY >
0) && !(MACPORTS_GCC_COMPILER > 0))

So we have to figure out if the GCC version is categorically wrong
(GCC 4.3, but I don't believe its wrong); if we selected the wrong
flavor (with/without value); if its specific to Sun GCC; if its
specific to Solaris 11.x and below; if its specific to a particular
processor; or something else.

Why do you experience the problem on Solaris 11? What version of
Solaris 11? Is it an Intel?

What version of GCC does Solaris 10 supply?

For completeness, we test on fully patched Intel systems, which is
Solaris 11.3 at the moment.

Jeff

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to