Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914349 - media-libs/audiofile-0.3.6-r5 fails to compile with clang: SimpleModule.h:128:40: error: no template named 'unary_function' in namespace 'std'
Summary: media-libs/audiofile-0.3.6-r5 fails to compile with clang: SimpleModule.h:128...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2023-09-17 10:41 UTC by Arniii
Modified: 2024-05-09 00:52 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log from portage (build.log,36.32 KB, text/x-log)
2023-09-17 17:20 UTC, Arniii
Details
/etc/portage/make.conf . clang profile. (make.conf,2.67 KB, text/plain)
2023-09-17 17:21 UTC, Arniii
Details
resolves the Clang deprecation errors (audiofile-0.3.6-r5.patch,1.96 KB, patch)
2024-03-15 06:33 UTC, Domini Montessori
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arniii 2023-09-17 10:41:39 UTC
/var/tmp/portage/media-libs/audiofile-0.3.6-r5/temp/build.log 
http://0x0.st/HOmT.log

 /etc/portage/make.conf http://0x0.st/HOmA.conf
clang profile + lto + O3 + debug symbols + native

 error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct rshift : public std::unary_function<Arg, Result>b
Comment 1 Arniii 2023-09-17 10:42:56 UTC
/var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/SimpleModule.h:128:40: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
        struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType>
                                         ~~~~~^~~~~~~~~~~~~~
                                              __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
In file included from /var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:29:
/var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/SimpleModule.h:133:40: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
        struct unsignedToSigned : public std::unary_function<SignedType, UnsignedType>
                                         ~~~~~^~~~~~~~~~~~~~
                                              __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
In file included from /var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:29:
/var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/SimpleModule.h:326:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct intToFloat : public std::unary_function<Arg, Result>
                           ~~~~~^~~~~~~~~~~~~~
                                __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
In file included from /var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:29:
/var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/SimpleModule.h:392:29: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct lshift : public std::unary_function<Arg, Result>
                       ~~~~~^~~~~~~~~~~~~~
                            __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
In file included from /var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:29:
/var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/SimpleModule.h:398:29: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct rshift : public std::unary_function<Arg, Result>
                       ~~~~~^~~~~~~~~~~~~~
                            __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
In file included from /var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:29:
/var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/SimpleModule.h:494:35: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct floatToFloat : public std::unary_function<Arg, Result>
                             ~~~~~^~~~~~~~~~~~~~
                                  __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
In file included from /var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:29:
/var/tmp/portage/media-libs/audiofile-0.3.6-r5/work/audiofile-0.3.6/libaudiofile/modules/SimpleModule.h:544:13: warning: private field 'm_inFormat' is not used [-Wunused-private-field]
        FormatCode m_inFormat, m_outFormat;
                   ^
1 warning and 6 errors generated.
Comment 2 Arniii 2023-09-17 10:49:27 UTC
successfully compiles if CXXFLAGS="${CXXFLAGS_CLANG} -stdlib=libstdc++"
Comment 3 Arniii 2023-09-17 17:20:46 UTC
Created attachment 870820 [details]
build log from portage
Comment 4 Arniii 2023-09-17 17:21:05 UTC
Created attachment 870821 [details]
/etc/portage/make.conf . clang profile.
Comment 5 hugegameartgd 2024-02-16 22:01:37 UTC
Upstream bug report: https://github.com/mpruett/audiofile/issues/65
Comment 6 Domini Montessori 2024-03-15 06:33:02 UTC
Created attachment 887658 [details, diff]
resolves the Clang deprecation errors
Comment 7 ernsteiswuerfel archtester 2024-03-15 10:11:14 UTC
The patch applies and works as expected. Thanks!
Comment 8 Larry the Git Cow gentoo-dev 2024-05-09 00:36:29 UTC
The bug has been closed via the following commit(s):

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

commit b8bb7f1065bf5701e62f118b5ef7cf727543d0de
Author:     NHOrus <jy6x2b32pie9@yahoo.com>
AuthorDate: 2024-04-02 08:13:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-09 00:34:07 +0000

    media-libs/audiofile: replace deprecated template unary_function
    
    Adds the patch from the bug to the tree.
    
    [sam: Add bug ref to patch.]
    
    Closes: https://bugs.gentoo.org/914349
    Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
    Closes: https://github.com/gentoo/gentoo/pull/36054
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/audiofile/audiofile-0.3.6-r6.ebuild     | 59 +++++++++++++++++++
 .../files/audiofile-0.3.6-clang-deprecation.patch  | 68 ++++++++++++++++++++++
 2 files changed, 127 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2024-05-09 00:52:23 UTC
The bug has been referenced in the following commit(s):

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

commit 7a3620bbf11ca091249fb40f523f0f3444d9065f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-05-09 00:47:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-09 00:47:39 +0000

    media-libs/audiofile: add upstream bug ref to patch
    
    Bug: https://bugs.gentoo.org/914349
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/audiofile/files/audiofile-0.3.6-clang-deprecation.patch | 1 +
 1 file changed, 1 insertion(+)