Bug 1421337 - GCC 7 error in compile fuse-encfs
Summary: GCC 7 error in compile fuse-encfs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-11 07:09 UTC by Vasiliy Glazov
Modified: 2017-02-21 06:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-21 06:35:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 79467 0 None None None 2017-02-11 20:12:14 UTC

Description Vasiliy Glazov 2017-02-11 07:09:00 UTC
Description of problem:
During F26 MassRebuild I has an GCC error

/usr/include/c++/7/bits/shared_ptr_base.h: In instantiation of 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = encfs::NullKey; _Deleter = encfs::NullDestructor; <template-parameter-2-3> = void; _Tp = encfs::AbstractCipherKey; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2]':
/usr/include/c++/7/bits/shared_ptr.h:147:37:   required from 'std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = encfs::NullKey; _Deleter = encfs::NullDestructor; <template-parameter-2-3> = void; _Tp = encfs::AbstractCipherKey]'
/builddir/build/BUILD/encfs-1.9.1/encfs/NullCipher.cpp:65:76:   required from here
/usr/include/c++/7/bits/shared_ptr_base.h:1088:4: error: static assertion failed: deleter expression d(p) is well-formed
    static_assert(__is_callable<_Deleter(_Yp*)>::value,
    ^~~~~~~~~~~~~

Version-Release number of selected component (if applicable):
Full build log https://kojipkgs.fedoraproject.org//work/tasks/4785/17724785/build.log
GCC 7.0.1-0.6.fc26
All logs https://koji.fedoraproject.org/koji/taskinfo?taskID=17724785

How reproducible:
Always

Steps to Reproduce:
1.Just build fuse-encfs

May it be bug in GCC?

Comment 1 Jonathan Wakely 2017-02-11 20:12:15 UTC
Yes, it's a GCC 7 bug, I've created an upstream bug to track it and will fix it tomorrow.

As a workaround until the fix is in rawhide:

--- encfs-1.9.1/encfs/NullCipher.cpp.orig       2017-02-11 20:11:15.792159253 +0000
+++ encfs-1.9.1/encfs/NullCipher.cpp    2017-02-11 20:11:20.893130796 +0000
@@ -60,7 +60,7 @@
   ~NullDestructor() {}
 
   NullDestructor &operator=(const NullDestructor &) { return *this; }
-  void operator()(NullKey *&) {}
+  void operator()(NullKey *) {}
 };
 std::shared_ptr<AbstractCipherKey> gNullKey(new NullKey(), NullDestructor());
 

(There's no reason at all for that code to use a reference, it's a bit weird, which is why nobody noticed this bug before.)

Comment 2 Jonathan Wakely 2017-02-11 21:12:08 UTC
Upstream GCC is fixed now.

Comment 3 Vasiliy Glazov 2017-02-15 07:18:40 UTC
Can you update gcc in rawhide with this fix?


Note You need to log in before you can comment on or make changes to this bug.