Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910527 - sci-electronics/kicad bundles dev-libs/libfmt
Summary: sci-electronics/kicad bundles dev-libs/libfmt
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zoltan Puskas
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-19 05:51 UTC by Justin Keogh
Modified: 2024-05-03 12:50 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge_info.txt,10.51 KB, text/plain)
2023-07-19 06:07 UTC, Justin Keogh
Details
kicad_system_fmt.patch (kicad_system_fmt.patch,834 bytes, patch)
2023-07-19 21:36 UTC, jospezial
Details | Diff
Patch to support libfmt-9 (kicad_system_fmt.patch,1.88 KB, patch)
2023-07-23 13:10 UTC, Alexandre Ferreira
Details | Diff
kicad_system_fmt.patch (kicad_system_fmt.patch,828 bytes, patch)
2023-08-01 20:12 UTC, jospezial
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Keogh 2023-07-19 05:51:15 UTC
$ emerge kicad
These are the packages that would be merged, in reverse order:                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                 
Calculating dependencies  .... done!                                                                                                                                                                                                                                             
Dependency resolution took 8.59 s.                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                 
[ebuild     U *] sci-electronics/kicad-9999 [7.0.2]                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                 
>>> Verifying ebuild manifests                                                                                                                                                                                                                                                   
>>> Running pre-merge checks for sci-electronics/kicad-9999                                                                                                                                                                                                                      
 * Checking for at least 900 MiB disk space at "/var/tmp/portage/sci-electronics/kicad-9999/temp" ...                                                                                                                                                                     [ ok ] 
>>> Emerging (1 of 1) sci-electronics/kicad-9999::gentoo                                                                                                                                                                                                                         
>>> Installing (1 of 1) sci-electronics/kicad-9999::gentoo                                                                                                                                                                                                                       
>>> Completed (1 of 1) sci-electronics/kicad-9999::gentoo                                                                                                                                                                                                                        
>>> Failed to install sci-electronics/kicad-9999, Log file:                                                                                                                                                                                                                      
>>>  '/var/tmp/portage/sci-electronics/kicad-9999/temp/build.log'                        
<snip>
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at https://bugs.gentoo.org/ unless you report exactly
 * which two packages install the same file(s). See
 * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how
 * to solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 *      /usr/lib64/pkgconfig/fmt.pc
 *      /usr/lib64/cmake/fmt/fmt-config-version.cmake
 *      /usr/lib64/cmake/fmt/fmt-targets.cmake
 *      /usr/lib64/cmake/fmt/fmt-config.cmake
 *      /usr/lib64/cmake/fmt/fmt-targets-relwithdebinfo.cmake
 *      /usr/include/fmt/ranges.h
 *      /usr/include/fmt/printf.h
 *      /usr/include/fmt/ostream.h
 *      /usr/include/fmt/core.h
 *      /usr/include/fmt/args.h
 *      /usr/include/fmt/compile.h
 *      /usr/include/fmt/format-inl.h
 *      /usr/include/fmt/color.h
 *      /usr/include/fmt/format.h
 *      /usr/include/fmt/os.h
 *      /usr/include/fmt/chrono.h
 *      /usr/include/fmt/xchar.h
 *      /usr/include/fmt/std.h
 *      /usr/lib64/libfmt.so
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * dev-libs/libfmt-9.1.0-r1:0::gentoo
 *      /usr/include/fmt/args.h
 *      /usr/include/fmt/chrono.h
 *      /usr/include/fmt/color.h
 *      /usr/include/fmt/compile.h
 *      /usr/include/fmt/core.h
 *      /usr/include/fmt/format-inl.h
 *      /usr/include/fmt/format.h
 *      /usr/include/fmt/os.h
 *      /usr/include/fmt/ostream.h
 *      /usr/include/fmt/printf.h
 *      /usr/include/fmt/ranges.h
 *      /usr/include/fmt/std.h
 *      /usr/include/fmt/xchar.h
 *      /usr/lib64/cmake/fmt/fmt-config-version.cmake
 *      /usr/lib64/cmake/fmt/fmt-config.cmake
 *      /usr/lib64/cmake/fmt/fmt-targets-relwithdebinfo.cmake
 *      /usr/lib64/cmake/fmt/fmt-targets.cmake
 *      /usr/lib64/libfmt.so
 *      /usr/lib64/pkgconfig/fmt.pc
 * 
 * Package 'sci-electronics/kicad-9999' NOT merged due to file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.
Comment 1 Justin Keogh 2023-07-19 06:07:08 UTC
Created attachment 865774 [details]
emerge --info
Comment 2 jospezial 2023-07-19 16:05:43 UTC
Upstream master recently switched to fmt 10.
So I unmasked dev-libs/libfmt-10.0.0 on my system.
Same result.

 * Detected file collision(s):
 * 
 *      /usr/lib64/libfmt.so.10.0.0
 *      /usr/lib64/pkgconfig/fmt.pc
 *      /usr/lib64/cmake/fmt/fmt-config-version.cmake
 *      /usr/lib64/cmake/fmt/fmt-targets.cmake
 *      /usr/lib64/cmake/fmt/fmt-config.cmake
 *      /usr/lib64/cmake/fmt/fmt-targets-relwithdebinfo.cmake
 *      /usr/include/fmt/ranges.h
 *      /usr/include/fmt/format.h
 *      /usr/include/fmt/core.h
 *      /usr/include/fmt/args.h
 *      /usr/include/fmt/chrono.h
 *      /usr/include/fmt/printf.h
 *      /usr/include/fmt/std.h
 *      /usr/include/fmt/os.h
 *      /usr/include/fmt/xchar.h
 *      /usr/include/fmt/ostream.h
 *      /usr/include/fmt/compile.h
 *      /usr/include/fmt/color.h
 *      /usr/include/fmt/format-inl.h
 *      /usr/lib64/libfmt.so.10
 *      /usr/lib64/libfmt.so
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * dev-libs/libfmt-10.0.0:0::gentoo
 *      /usr/include/fmt/args.h
 *      /usr/include/fmt/chrono.h
 *      /usr/include/fmt/color.h
 *      /usr/include/fmt/compile.h
 *      /usr/include/fmt/core.h
 *      /usr/include/fmt/format-inl.h
 *      /usr/include/fmt/format.h
 *      /usr/include/fmt/os.h
 *      /usr/include/fmt/ostream.h
 *      /usr/include/fmt/printf.h
 *      /usr/include/fmt/ranges.h
 *      /usr/include/fmt/std.h
 *      /usr/include/fmt/xchar.h
 *      /usr/lib64/cmake/fmt/fmt-config-version.cmake
 *      /usr/lib64/cmake/fmt/fmt-config.cmake
 *      /usr/lib64/cmake/fmt/fmt-targets-relwithdebinfo.cmake
 *      /usr/lib64/cmake/fmt/fmt-targets.cmake
 *      /usr/lib64/libfmt.so.10
 *      /usr/lib64/libfmt.so.10.0.0
 *      /usr/lib64/pkgconfig/fmt.pc
 * 
 * Package 'sci-electronics/kicad-9999' NOT merged due to file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.
 * 
 * The following package has failed to build, install, or execute postinst:
 * 
 *  (sci-electronics/kicad-9999:0/0::gentoo

https://gitlab.com/kicad/code/kicad/-/blob/master/CMakeLists.txt#L1036
add_subdirectory( thirdparty )

https://gitlab.com/kicad/code/kicad/-/blob/master/thirdparty/CMakeLists.txt#L33
add_subdirectory( fmt )

We need a way to disable the building of thirdparty libs and use system libs as it is for glew.

My last successful install of sci-electronics/kicad-9999 was
6. Jul 07:16 /usr/bin/kicad
equery f kicad does not show fmt.
Comment 3 jospezial 2023-07-19 21:36:18 UTC
Created attachment 865806 [details, diff]
kicad_system_fmt.patch

A quick patch based on my analysis above.
Seems to work.
Please test it.

Should kicad ebuild have a dep on dev-libs/libfmt then? With slot?
Comment 4 Alexandre Ferreira 2023-07-23 13:09:39 UTC
It seems that Kicad decided witch version of libfmt, they moved to 10 and that creates a compilation problem. The attached patch allows kicad to compile with libfmt-9.
Comment 5 Alexandre Ferreira 2023-07-23 13:10:31 UTC
Created attachment 866006 [details, diff]
Patch to support libfmt-9
Comment 6 jospezial 2023-07-23 19:43:31 UTC
(In reply to Alexandre Ferreira from comment #4)
> It seems that Kicad decided witch version of libfmt, they moved to 10 and
> that creates a compilation problem. The attached patch allows kicad to
> compile with libfmt-9.

Would it work if we remove the version number there?
Comment 7 jospezial 2023-08-01 19:29:45 UTC
https://gitlab.com/kicad/code/kicad/-/issues/15306
"Built-in fmt and system fmt conflict"

https://gitlab.com/kicad/code/kicad/-/commit/b95b07e54dffa13096f747c049b600bbfe3c5913
"Turn off the FMT_INSTALL opt"

So should we still disable the build of bundled fmt and use the system libfmt for the kicad build even if upstream seems to not want that?
Me - yes.
Comment 8 jospezial 2023-08-01 19:35:03 UTC
Is it even still built after the upstream change?
Comment 9 jospezial 2023-08-01 20:07:46 UTC
(In reply to jospezial from comment #8)
> Is it even still built after the upstream change?

Yes!
They disabled the install of libfmt only. Not the build.
Comment 10 jospezial 2023-08-01 20:12:00 UTC
Created attachment 866821 [details, diff]
kicad_system_fmt.patch

Updated to latest upstream change.
The libfmt-9 change should be done in another patch.