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

Bug 592432

Summary: app-antivirus/clamav-0.99.2: building w/gcc-6: error: expected unqualified-id before 'alignof'
Product: Gentoo Linux Reporter: Francesco Turco <mail>
Component: Current packagesAssignee: Antivirus Team <antivirus>
Severity: normal CC: hanno, net-mail, plevine457, slyfox
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    
Attachments: clamav-0.99.2 build log using gcc-6.2.0
clamav-0.99.2 build log using gcc-6.2.0 (hopefully with proper encoding)

Description Francesco Turco 2016-08-30 13:41:48 UTC
I just upgraded GCC to the 6.2.0 version on my system, but app-antivirus/clamav-0.99.2 cannot be built with it. Works fine with gcc-5.4.0. Also works fine when setting CXXFLAGS="${CXXFLAGS} -std=gnu++98".


# emerge -pv clamav

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-antivirus/clamav-0.99.2::gentoo  USE="bzip2 iconv ipv6 -clamdtop -libressl -metadata-analysis-api -milter (-selinux) -static-libs (-uclibc)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Comment 1 Francesco Turco 2016-08-30 13:42:51 UTC
Created attachment 444432 [details]
clamav-0.99.2 build log using gcc-6.2.0
Comment 2 Francesco Turco 2016-08-30 13:47:32 UTC
Created attachment 444434 [details]
clamav-0.99.2 build log using gcc-6.2.0 (hopefully with proper encoding)
Comment 3 Peter Levine 2016-09-21 18:04:41 UTC
The problem is that 'alignof' is a reserved word in >=C++11.  clamav bundles an old llvm in "${S}/libclamav/c++/llvm" that is unaware of this.  Trying to compile with the system llvm using EXTRA_ECONF="--with-system-llvm" fails for me with "error: LLVM < 3.7 required, but "3.8.1"(381) found".  And sys-devel/llvm doesn't support "multislot" so you can only commit to a 3.6.X version if you have no other world packages requiring >=sys-devel/llvm=3.7.0.  The other option is forcing CXXFLAG "-std=c++98".
Comment 4 Sergei Trofimovich gentoo-dev 2016-12-25 18:14:44 UTC
Pushed a tweak as:

Thank you!