Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924745 - media-libs/imgui-1.87-r9 - Package Fails to build - CMake
Summary: media-libs/imgui-1.87-r9 - Package Fails to build - CMake
Status: UNCONFIRMED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: GURU project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-17 03:15 UTC by Scott Furry
Modified: 2024-04-06 21:56 UTC (History)
3 users (show)

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


Attachments
emerge build log (imgui-1.87-r9:20240217-030744.log,5.73 KB, text/x-log)
2024-02-17 03:15 UTC, Scott Furry
Details
build log (build.log,8.62 KB, text/x-log)
2024-03-25 13:32 UTC, Todd Walter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Furry 2024-02-17 03:15:00 UTC
Update to package fails to build due to a CMake error referencing "freetype".


Reproducible: Always

Actual Results:  
Reported error:
---
CMake Error at CMakeLists.txt:27 (FIND_PACKAGE):
  Could not find a package configuration file provided by "freetype" with any
  of the following names:

    freetypeConfig.cmake
    freetype-config.cmake

  Add the installation prefix of "freetype" to CMAKE_PREFIX_PATH or set
  "freetype_DIR" to a directory containing one of the above files.  If
  "freetype" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
---


Follow on to Bug #924126 (-r8 failed to build due to missing file referenced in patch)
Comment 1 Scott Furry 2024-02-17 03:15:25 UTC
Created attachment 885174 [details]
emerge build log
Comment 2 Todd Walter 2024-03-25 13:32:43 UTC
Created attachment 888537 [details]
build log
Comment 3 Collin Day 2024-04-06 01:03:37 UTC
Same error:

-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:27 (FIND_PACKAGE):
  Could not find a package configuration file provided by "freetype" with any
  of the following names:

    freetypeConfig.cmake
    freetype-config.cmake

  Add the installation prefix of "freetype" to CMAKE_PREFIX_PATH or set
  "freetype_DIR" to a directory containing one of the above files.  If
  "freetype" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
 * ERROR: media-libs/imgui-1.87-r9::guru failed (configure phase):
Comment 4 Collin Day 2024-04-06 19:35:38 UTC
This may be an upstream issue or maybe something just needs to be adjusted in the ebuild.  For fun I tried cloning latest from imgui - same issue.
Comment 5 Collin Day 2024-04-06 20:29:32 UTC
(In reply to Collin Day from comment #4)
> This may be an upstream issue or maybe something just needs to be adjusted
> in the ebuild.  For fun I tried cloning latest from imgui - same issue.

I found it - in the cimgui part, CMakeLists 

FIND_PACKAGE(freetype REQUIRED PATHS ${FREETYPE_PATH})

can't find freetype.

I don't know if this is helpful - but shouldn't it be:

FIND_PACKAGE(Freetype REQUIRED PATHS ${FREETYPE_PATH})

and shouldn't it just use FindFreetype in /usr/share/cmake/Modules?
Comment 6 Scott Furry 2024-04-06 20:33:14 UTC
(In reply to Collin Day from comment #5)
> I don't know if this is helpful - but shouldn't it be:
> 
> FIND_PACKAGE(Freetype REQUIRED PATHS ${FREETYPE_PATH})

I tried that small change locally. It didn't work for me as CMake spit out an entirely different error. At that point, I just masked out the -r9 version and reverted back to -r6 release.
Comment 7 Collin Day 2024-04-06 21:04:46 UTC
(In reply to Scott Furry from comment #6)
> (In reply to Collin Day from comment #5)
> > I don't know if this is helpful - but shouldn't it be:
> > 
> > FIND_PACKAGE(Freetype REQUIRED PATHS ${FREETYPE_PATH})
> 
> I tried that small change locally. It didn't work for me as CMake spit out
> an entirely different error. At that point, I just masked out the -r9
> version and reverted back to -r6 release.

I tried:

I think this is an upstream issue - I cloned cimgui and tried to build per there directions - still get CMake can not find freetype

If I change

FIND_PACKAGE(freetype REQUIRED PATHS ${FREETYPE_PATH})

to

FIND_PACKAGE(Freetype REQUIRED)

cmake works, but make then returns:

```
[ 12%] Building CXX object CMakeFiles/cimgui.dir/cimgui.cpp.o
/home/dayd/projects/cimgui/cimgui.cpp:11:2: error: #error "IMGUI_FREETYPE should not be defined without freetype generated cimgui"
   11 | #error "IMGUI_FREETYPE should not be defined without freetype generated cimgui"

I don't have -r6 availible in guru:
files  imgui-1.81-r1.ebuild  imgui-1.83.ebuild  imgui-1.87-r9.ebuild  Manifest  metadata.xml
Comment 8 Scott Furry 2024-04-06 21:08:57 UTC
(In reply to Collin Day from comment #7)
> I don't have -r6 availible in guru:
> files  imgui-1.81-r1.ebuild  imgui-1.83.ebuild  imgui-1.87-r9.ebuild 
> Manifest  metadata.xml

I have a local github repo you can grab it from.
https://github.com/scottfurry/FurCaT_Gentoo/tree/master/media-libs/imgui
Comment 9 Collin Day 2024-04-06 21:11:21 UTC
Could I make a suggestion?  Cimgui depoends on imgui - instead of making them the same ebuild - why not split into imgui and cimgui and have cimgui depend on imgui?  For those that may not need the C bindings - it would become I think a header install and examples if desired.....

Just a thought.
Comment 10 Collin Day 2024-04-06 21:11:33 UTC
(In reply to Scott Furry from comment #8)
> (In reply to Collin Day from comment #7)
> > I don't have -r6 availible in guru:
> > files  imgui-1.81-r1.ebuild  imgui-1.83.ebuild  imgui-1.87-r9.ebuild 
> > Manifest  metadata.xml
> 
> I have a local github repo you can grab it from.
> https://github.com/scottfurry/FurCaT_Gentoo/tree/master/media-libs/imgui

Cool - thanks!
Comment 11 Collin Day 2024-04-06 21:18:26 UTC
(In reply to Scott Furry from comment #8)
> (In reply to Collin Day from comment #7)
> > I don't have -r6 availible in guru:
> > files  imgui-1.81-r1.ebuild  imgui-1.83.ebuild  imgui-1.87-r9.ebuild 
> > Manifest  metadata.xml
> 
> I have a local github repo you can grab it from.
> https://github.com/scottfurry/FurCaT_Gentoo/tree/master/media-libs/imgui

Much appreciated - that worked fine.  Wonder what the difference is though?
Comment 12 Scott Furry 2024-04-06 21:29:28 UTC
(In reply to Collin Day from comment #11)
> (In reply to Scott Furry from comment #8)
> > I have a local github repo you can grab it from.
> > https://github.com/scottfurry/FurCaT_Gentoo/tree/master/media-libs/imgui
> 
> Much appreciated - that worked fine.  Wonder what the difference is though?

`diff` is your friend. 

A quick scan here shows -r6 does not have multilib. There appears to be extra generated files removed as part of -r9 src_prepare. Too many details for me to dive into.
Comment 13 Collin Day 2024-04-06 21:56:59 UTC
(In reply to Scott Furry from comment #12)
> (In reply to Collin Day from comment #11)
> > (In reply to Scott Furry from comment #8)
> > > I have a local github repo you can grab it from.
> > > https://github.com/scottfurry/FurCaT_Gentoo/tree/master/media-libs/imgui
> > 
> > Much appreciated - that worked fine.  Wonder what the difference is though?
> 
> `diff` is your friend. 
> 
> A quick scan here shows -r6 does not have multilib. There appears to be
> extra generated files removed as part of -r9 src_prepare. Too many details
> for me to dive into.

Yeah - it was more a rhetorical question.  But - yes - a good `diff` should reveal all.  Anyway - thank you again for the working version.  I did file an issue upstream, as I get the exact same problem trying to compile the code following their directions - if they say anything useful, I'll post it here.