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

Bug 910441

Summary: x11-libs/wxGTK-3.0.5.1-r1 fails to build with clang-16.0.6[default-libcxx]: .../scintilla/src/Editor.cxx:5709:7: error: no member named 'auto_ptr' in namespace 'std'
Product: Gentoo Linux Reporter: ppw0
Component: Current packagesAssignee: Gentoo wxWidgets project <wxwidgets>
Status: RESOLVED FIXED    
Severity: normal CC: jy6x2b32pie9, StormByte
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/35971
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 836220    
Attachments: emerge --info
build log (failed)
build log (successful)

Description ppw0 2023-07-17 00:45:40 UTC
Created attachment 865626 [details]
emerge --info

Trying to build x11-libs/wxGTK-3.0.5.1-r1 on a clang/libcxx/llvm profile gives the following error:

---
/var/tmp/portage/x11-libs/wxGTK-3.0.5.1-r1/work/wxWidgets-3.0.5.1/src/stc/scintilla/src/Editor.cxx:5709:7: error: no member named 'auto_ptr' in namespace 'std'
        std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding());
        ~~~~~^
/var/tmp/portage/x11-libs/wxGTK-3.0.5.1-r1/work/wxWidgets-3.0.5.1/src/stc/scintilla/src/Editor.cxx:5709:16: error: 'CaseFolder' does not refer to a value
        std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding());
                      ^
/var/tmp/portage/x11-libs/wxGTK-3.0.5.1-r1/work/wxWidgets-3.0.5.1/src/stc/scintilla/src/Document.h:158:7: note: declared here
class CaseFolder {
      ^
/var/tmp/portage/x11-libs/wxGTK-3.0.5.1-r1/work/wxWidgets-3.0.5.1/src/stc/scintilla/src/Editor.cxx:5709:28: error: use of undeclared identifier 'pcf'
        std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding());
                                  ^
/var/tmp/portage/x11-libs/wxGTK-3.0.5.1-r1/work/wxWidgets-3.0.5.1/src/stc/scintilla/src/Editor.cxx:5717:4: error: use of undeclared identifier 'pcf'
                        pcf.get());
                        ^
4 errors generated.
---

Since the package expects features that have been removed from C++17 and libc's stricter adherence to the standards, adding -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES to CPPFLAGS works around this issue, albeit with many "symbol not defined" warnings from ld.lld. I'm attaching both build logs.
Comment 1 ppw0 2023-07-17 00:48:06 UTC
Created attachment 865627 [details]
build log (failed)
Comment 2 ppw0 2023-07-17 00:48:32 UTC
Created attachment 865628 [details]
build log (successful)
Comment 3 Mart Raudsepp gentoo-dev 2023-10-02 07:33:51 UTC
Does wxGTK:3.2 fail like this as well?
Comment 4 ppw0 2023-10-02 07:37:30 UTC
(In reply to Mart Raudsepp from comment #3)
> Does wxGTK:3.2 fail like this as well?

Not like this, no.
Comment 5 Mart Raudsepp gentoo-dev 2023-10-02 08:17:05 UTC
OK, the mid-term goal is to just get rid of wxGTK-3.0, so we should look at its consumers and get them over to 3.2. I hope to get to poedit and wxhexeditor soon - what do you need 3.0 for?
Comment 6 ppw0 2023-10-02 14:45:48 UTC
(In reply to Mart Raudsepp from comment #5)
> OK, the mid-term goal is to just get rid of wxGTK-3.0, so we should look at
> its consumers and get them over to 3.2. I hope to get to poedit and
> wxhexeditor soon - what do you need 3.0 for?

~% emerge -pvc \=x11-libs/wxGTK-3.0.5.1-r1

Calculating dependencies... done!
  x11-libs/wxGTK-3.0.5.1-r1 pulled in by:
    app-arch/p7zip-16.02-r8 requires x11-libs/wxGTK:3.0-gtk3[X]

>>> No packages selected for removal by depclean
Packages installed:   1472
Packages in world:    96
Packages in system:   49
Required packages:    1472
Number to remove:     0
~%
Comment 7 ernsteiswuerfel archtester 2023-10-16 23:16:21 UTC
(In reply to Mart Raudsepp from comment #5)
> [...] what do you need 3.0 for?
I actually need it for net-p2p/amule-2.3.3-r1 which I got in heavy use. ;)
Comment 8 jy6x2b32pie9 2024-03-28 18:22:12 UTC
audacity-2.4.2 depends on this package...
So it will live, until old audacity dies, at least.
Comment 9 Larry the Git Cow gentoo-dev 2024-05-08 11:07:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b840ec865ffc41c408909b0fa586b7652c72af30

commit b840ec865ffc41c408909b0fa586b7652c72af30
Author:     NHOrus <jy6x2b32pie9@yahoo.com>
AuthorDate: 2024-03-28 20:00:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-08 11:06:46 +0000

    x11-libs/wxGTK: remove auto_ptr in 3.0.5.1
    
    Backports fixes from 3.2.2, using existing wxScopedPtr
    
    [sam: Keep -r1 in stable and add -r2 in ~arch.]
    
    Closes: https://bugs.gentoo.org/910441
    Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
    Closes: https://github.com/gentoo/gentoo/pull/35971
    Signed-off-by: Sam James <sam@gentoo.org>

 .../wxGTK/files/wxGTK-3.0.5.1-excise-autoptr.patch | 322 +++++++++++++++++++++
 x11-libs/wxGTK/wxGTK-3.0.5.1-r2.ebuild             | 188 ++++++++++++
 2 files changed, 510 insertions(+)