Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 797394 - dev-libs/spdlog-1.8.5 fails to compile (spdlog/common-inl.h:63:50: error: cannot convert ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘const char*’)
Summary: dev-libs/spdlog-1.8.5 fails to compile (spdlog/common-inl.h:63:50: error: can...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: David Roman
URL:
Whiteboard:
Keywords: PullRequest
: 797415 797430 798405 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-21 20:24 UTC by Agostino Sarubbo
Modified: 2021-06-26 07:58 UTC (History)
19 users (show)

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


Attachments
build.log (build.log,46.89 KB, text/plain)
2021-06-21 20:24 UTC, Agostino Sarubbo
Details
Fix spdlog compile with libfmt 8.0 (spdlog-fix-fmt-8-compile.patch,424 bytes, patch)
2021-06-21 23:24 UTC, Tiernan Hubble
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-06-21 20:24:56 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-libs/spdlog-1.8.5 fails to compile.
Discovered on: amd64 (internal ref: ci)

NOTE:
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
If you think this is a GCC-11 related issue, please block bug 732706.
Comment 1 Agostino Sarubbo gentoo-dev 2021-06-21 20:24:59 UTC
Created attachment 717513 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-06-21 20:25:00 UTC
Possible context of error(s):

/var/tmp/portage/dev-libs/spdlog-1.8.5/work/spdlog-1.8.5/include/spdlog/common-inl.h:63:50: error: cannot convert ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘const char*’
Comment 3 josef.95 2021-06-21 21:29:24 UTC
Same error here, if dev-libs/libfmt-8.0.0 is installed.
With dev-libs/libfmt-7.1.3 it builds successful.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-21 22:39:32 UTC
*** Bug 797415 has been marked as a duplicate of this bug. ***
Comment 5 Tiernan Hubble 2021-06-21 23:24:21 UTC
Created attachment 717540 [details, diff]
Fix spdlog compile with libfmt 8.0

It appears to be this bug: https://github.com/gabime/spdlog/issues/1941
There's a patch, but it's listed under this Visual Studio specific bug for some reason: https://github.com/gabime/spdlog/issues/1955#issuecomment-860676872
There doesn't seem to be a PR to include it upstream yet though.

Patch is attached, it fixes the build with libfmt 8 for me.
Comment 6 josef.95 2021-06-22 00:46:19 UTC
(In reply to Tiernan Hubble from comment #5)
[...]

Yes, the patch works for me too

Thanks!
Comment 7 Bernd 2021-06-22 13:32:59 UTC
*** Bug 797430 has been marked as a duplicate of this bug. ***
Comment 8 Gary E. Miller 2021-06-24 01:52:22 UTC
How would I go about applying that patch to the ebuild on my local host?
Comment 9 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-06-24 01:59:06 UTC
(In reply to Gary E. Miller from comment #8)
> How would I go about applying that patch to the ebuild on my local host?

Add it to /etc/portage/patches:

https://wiki.gentoo.org/wiki//etc/portage/

If you need more support there are others happy to help in another venue like IRC or the forums.
Comment 10 vicalcas 2021-06-24 18:26:23 UTC
*** Bug 798405 has been marked as a duplicate of this bug. ***
Comment 11 Larry the Git Cow gentoo-dev 2021-06-25 00:31:56 UTC
The bug has been closed via the following commit(s):

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

commit 64d8afb7f3cd0f431e5b40fe486e1e89965131e5
Author:     Hank Leininger <hlein@korelogic.com>
AuthorDate: 2021-06-24 18:25:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-06-25 00:31:14 +0000

    dev-libs/spdlog: fix compiling with libfmt-8 installed
    
    See also upstream https://github.com/gabime/spdlog/issues/1975
    
    Signed-off-by: Hank Leininger <hlein@korelogic.com>
    Closes: https://bugs.gentoo.org/797394
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Closes: https://github.com/gentoo/gentoo/pull/21413
    Signed-off-by: Sam James <sam@gentoo.org>

 .../spdlog/files/spdlog-1.8.5-libfmt-8-fix.patch   | 13 ++++++
 dev-libs/spdlog/spdlog-1.8.5-r1.ebuild             | 49 ++++++++++++++++++++++
 2 files changed, 62 insertions(+)