Bug 496781 - 6.8.0 generates broken pkgconfig files with "/usr/_EGPF_TARGET_INCLUDE_DIRS-NOTFOUND" in Cflags.
Summary: 6.8.0 generates broken pkgconfig files with "/usr/_EGPF_TARGET_INCLUDE_DIRS-N...
Status: RESOLVED FIXED
Alias: None
Product: extra-cmake-modules
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.8.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: ecm-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-28 11:12 UTC by ncopa
Modified: 2024-11-28 16:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.9.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ncopa 2024-11-28 11:12:02 UTC
STEPS TO REPRODUCE
1. build mkcal with extra-cmake-modules 6.8.0
2. 
3. 

OBSERVED RESULT
The generated libmkcal-qt5.pc has a "DIRS-NOTFOUND"

$ grep Cflags build/src/libmkcal-qt5.pc 
Cflags: -I${prefix}/_EGPF_TARGET_INCLUDE_DIRS-NOTFOUND -I${prefix}/include/mkcal-qt5 

EXPECTED RESULT

Cflags:  -I${prefix}/include/mkcal-qt5 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma:  
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: qt5

ADDITIONAL INFORMATION

This breaks build of anything using the broken mkcal .pc file:

For example nemo-qml-plugin-calendar:
...
-- Configuring done (0.4s)
CMake Error in src/CMakeLists.txt:
  Imported target "PkgConfig::MKCAL" includes non-existent path

    "/usr/_EGPF_TARGET_INCLUDE_DIRS-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.
Comment 2 Christophe Marin 2024-11-28 15:31:15 UTC
Coincidentally, this was also mentioned privately 2 days ago.

https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/495 should fix it, I'll add the bug ref when the test builds are done
Comment 3 Christophe Marin 2024-11-28 15:41:13 UTC
We don't have the build dependencies for mkcal. (timed, iodata...) It would be nice if you can test with this change
Comment 4 ncopa 2024-11-28 16:27:04 UTC
Yeah, https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/495 appears to solve the issue. Thank!
Comment 5 Christophe Marin 2024-11-28 16:35:25 UTC
Git commit 0a75474f2940440e263a52c311fd4b60226e5b88 by Christophe Marin.
Committed on 28/11/2024 at 15:31.
Pushed by krop into branch 'master'.

EGPF: Handle case where INTERFACE_INCLUDE_DIRECTORIES is empty

Issue mentioned privately by Dariusz Pelowski. Thanks!

Amends: 85aa50ba81
FIXED-IN: 6.9.0

M  +23   -20   modules/ECMGeneratePkgConfigFile.cmake
M  +1    -0    tests/ECMGeneratePkgConfigFile/CMakeLists.txt
A  +39   -0    tests/ECMGeneratePkgConfigFile/test_no_interface_include_dirs/CMakeLists.txt
A  +13   -0    tests/ECMGeneratePkgConfigFile/test_no_interface_include_dirs/EGPF_no_interface_include_directories.pc
A  +4    -0    tests/ECMGeneratePkgConfigFile/test_no_interface_include_dirs/main.cpp  *

The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://invent.kde.org/frameworks/extra-cmake-modules/-/commit/0a75474f2940440e263a52c311fd4b60226e5b88