Opened 14 months ago
Last modified 10 months ago
#68248 reopened defect
spdlog @1.12.0: package 'fmt', required by 'spdlog', not found; consider updating segregated libfmtXX ports, to be discoverable via standard prefix path
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | XNephila (X Nephila), judaew (Vadym-Valdis Yudaiev) | |
Port: | libfmt10 spdlog |
Description
Not sure if spdlog bug or libfmt10 bug:
% port -q installed spdlog libfmt10 libfmt10 @10.1.1_0 (active) spdlog @1.12.0_3+fmt_external (active)
% pkg-config spdlog --cflags Package fmt was not found in the pkg-config search path. Perhaps you should add the directory containing `fmt.pc' to the PKG_CONFIG_PATH environment variable Package 'fmt', required by 'spdlog', not found
Change History (11)
comment:1 Changed 14 months ago by mascguy (Christopher Nielsen)
Cc: | mascguy removed |
---|---|
Owner: | set to mascguy |
Status: | new → assigned |
comment:2 follow-up: 3 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)
My concern was that, while investigating pkg-config in general, I happened to try out spdlog's pkg-config file and received an unexpected error.
comment:3 Changed 14 months ago by mascguy (Christopher Nielsen)
Replying to ryandesign:
My concern was that, while investigating pkg-config in general, I happened to try out spdlog's pkg-config file and received an unexpected error.
No worries. So can this be closed then?
comment:4 Changed 14 months ago by mascguy (Christopher Nielsen)
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
comment:5 follow-up: 6 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)
So you don't consider it a bug that pkg-config cannot be used to get spdlog's flags?
comment:6 Changed 14 months ago by mascguy (Christopher Nielsen)
Replying to ryandesign:
So you don't consider it a bug that pkg-config cannot be used to get spdlog's flags?
It works fine when things are properly set, per segregation of libfmt10
:
$ PKG_CONFIG_PATH=/opt/local/lib/libfmt10/pkgconfig:/opt/local/lib/pkgconfig: pkg-config spdlog --cflags -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -I/opt/local/include/libfmt10 -I/opt/local/include
So no, that doesn't seem like a bug. Do you disagree?
comment:7 follow-up: 8 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)
Joe Random User who just wants to use spdlog in software they compile outside of MacPorts may not know that you expect them to set PKG_CONFIG_PATH
to a nonstandard value.
Can't the libfmt10 pc file go in the standard pkg-config directory, perhaps with a version suffix, and then spdlog's pc file adjusted to match?
comment:8 Changed 14 months ago by mascguy (Christopher Nielsen)
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Replying to ryandesign:
Joe Random User who just wants to use spdlog in software they compile outside of MacPorts may not know that you expect them to set
PKG_CONFIG_PATH
to a nonstandard value.Can't the libfmt10 pc file go in the standard pkg-config directory, perhaps with a version suffix, and then spdlog's pc file adjusted to match?
Sure, and that would certainly make things easier for dependents.
I'll do some local proof-of-concept work, and get back to you.
comment:9 Changed 14 months ago by mascguy (Christopher Nielsen)
Summary: | spdlog @1.12.0: Package 'fmt', required by 'spdlog', not found → spdlog @1.12.0: package 'fmt', required by 'spdlog', not found; consider updating segregated libfmtXX ports, to be discoverable via standard prefix path |
---|
comment:10 Changed 11 months ago by mouse07410 (Mouse)
As of yesterday, this did not work. In order to build/install port(s) that depend on spdlog
, such as doxygen
and range-v3
, I had to do sudo port -f install spdlog -fmt_external
. That took care of the problem.
Perhaps, you could/should make the -fmt_external
the default port.
comment:11 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)
I don't know why spdlog has an fmt_external variant but no, deselecting it is not the preferred solution. We want ports to use other ports for their dependencies rather than likely-outdated bundled versions.
So the variant should be removed, the use of external fmt should be mandated, and it should be made to work without the need to change PKG_CONFIG_PATH
, as already discussed.
Ryan, bear in mind that all of the
libfmtXX
ports are purposely segregated, to avoid conflicts:Regardless,
spdlog
is correctly setting the cmake module path for variantfmt_external
. And everything has been working fine for quite a while.Was your concern based on something in the configure log, or...?