Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 226645

Summary: dev-libs/crypto++-5.5.2: does not compile with -O2 and -funroll-loops CXXFLAGS option
Product: Gentoo Linux Reporter: François Agrech <f.agrech>
Component: [OLD] LibraryAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: VERIFIED WONTFIX    
Severity: minor CC: jlp.bugs
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
URL: http://www.gentoo.org/doc/en/gcc-optimization.xml
Whiteboard:
Package list:
Runtime testing required: ---

Description François Agrech 2008-06-14 13:28:44 UTC
emerge of dev-libs/crypto++-5.5.2 with "-O2 -funroll-loops" CXXFLAGS fails at vmac.cpp, line 690.
Removing either option work.
I have gcc version 4.1.2

The easy workaround is to create the file /etc/portage/env/dev-libs/crypto++ and put a CXXFLAGS without one of the two options.

Reproducible: Always

Steps to Reproduce:
1. put CXXFLAGS="-O2 -funroll-loops" in /etc/make.conf
2. emerge =dev-libs/crypto++-5.5.2

Actual Results:  
x86_64-pc-linux-gnu-g++ -O2 -funroll-loops -c xtrcrypt.cpp
vmac.cpp: In member function ‘void CryptoPP::VMAC_Base::VHASH_Update_Template(const CryptoPP::word64*, size_t) [with bool T_128BitTag = true]’:
vmac.cpp:690: erreur fatale: internal consistency failure


Expected Results:  
The ebuild should filter those options so emerge succeeds with this CXXFLAGS, or the source should be patched by ebuild so it compiles with those options.
Comment 1 Daniel Black (RETIRED) gentoo-dev 2008-06-22 21:32:47 UTC
as per url funroll-loops is prone with faults. Other documentation indicates that funroll-loops as a concept make stuff slower.

as such i'm not going to fix this.
Comment 2 François Agrech 2008-06-23 07:25:55 UTC
What about adding a warning about that in the ebuild? This could save some time searching for the problem for some people.
Comment 3 Daniel Black (RETIRED) gentoo-dev 2008-06-23 12:51:59 UTC
(In reply to comment #2)
> What about adding a warning about that in the ebuild?
no.
> This could save some time searching for the problem for some people.
The valuable learning experience is to drop silly CFLAGS.

By putting a warning some people will just keep using it and expecting every other package to work with a silly broken cflag.

Comment 4 François Agrech 2008-06-24 05:21:29 UTC
I was thinking about a message along the line of:
"You have enabled funroll-loops, this package won't compile with this flag. Moreover, it is not wise to enable this flag as it has been proven to make things slower. Please unset this flag in your make.conf flag and reemerge"
I mean a message that inform the user about the problem and at the same time that discourage from using this flag in other packages.