diff mbox series

cmake: remove GHS-related files

Message ID 20251029062027.836131-1-jiaying.song.cn@windriver.com
State New
Headers show
Series cmake: remove GHS-related files | expand

Commit Message

Song, Jiaying (CN) Oct. 29, 2025, 6:20 a.m. UTC
From: Jiaying Song <jiaying.song.cn@windriver.com>

Remove files starting with "GHS*". These files are related to the
Glasgow Haskell Compiler (GHS), which is not supported, so keeping them
is unnecessary.

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
---
 meta/recipes-devtools/cmake/cmake_4.1.2.bb | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Alexander Kanavin Oct. 29, 2025, 9:27 a.m. UTC | #1
On Wed, 29 Oct 2025 at 07:20, Song, Jiaying (CN) via
lists.openembedded.org
<Jiaying.Song.CN=windriver.com@lists.openembedded.org> wrote:
> Remove files starting with "GHS*". These files are related to the
> Glasgow Haskell Compiler (GHS), which is not supported, so keeping them
> is unnecessary.
> +do_install:append() {
> +    # Remove files related to the Glasgow Haskell Compiler (GHS), which is not supported.
> +    find ${D}${datadir}/cmake-${CMAKE_MAJOR_VERSION} -type f -name "GHS*" -exec rm -f {} +
> +}

You never know. Someone might want them. Yocto shouldn't impose such
decisions on users, but it should ensure the packaging makes sense.
Which package do these go to, and should we put them in a different
package maybe?

A;ex
Mathieu Dubois-Briand Oct. 29, 2025, 10:27 a.m. UTC | #2
On Wed Oct 29, 2025 at 7:20 AM CET, Jiaying (CN) via lists.openembedded.org Song wrote:
> From: Jiaying Song <jiaying.song.cn@windriver.com>
>
> Remove files starting with "GHS*". These files are related to the
> Glasgow Haskell Compiler (GHS), which is not supported, so keeping them
> is unnecessary.
>
> Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
> ---

Hi Jiaying,

Thanks for your patch.

I suspect this is the cause of the following error on the autobuilder:

oeqa.utils.subprocesstweak.OETestCalledProcessError: Command '. /srv/pokybuild/yocto-worker/qemux86/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0/testimage-sdk/environment-setup-core2-32-poky-linux > /dev/null; cd /srv/pokybuild/yocto-worker/qemux86/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0/testimage-sdk/assimptnwvo_x7/build && cmake -DASSIMP_WARNINGS_AS_ERRORS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON /srv/pokybuild/yocto-worker/qemux86/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0/testimage-sdk/assimptnwvo_x7/assimp-5.4.1;' returned non-zero exit status 1.
...
Standard Output: CMake Error at /srv/pokybuild/yocto-worker/qemux86/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/x86_64-pokysdk-linux/usr/share/cmake-4.1/Modules/CMakeCompilerIdDetection.cmake:125 (message):
  No preprocessor test for "GHS"
...
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

https://autobuilder.yoctoproject.org/valkyrie/#/builders/4/builds/2661
https://autobuilder.yoctoproject.org/valkyrie/#/builders/19/builds/2652
https://autobuilder.yoctoproject.org/valkyrie/#/builders/30/builds/2633

Can you have a look at this issue?

Thanks,
Mathieu
Song, Jiaying (CN) Oct. 30, 2025, 8:15 a.m. UTC | #3
Hi Mathieu and Alex,

Thank you for your feedback. This issue was indeed caused by my patch - I apologize for not covering this case in my testing.

The error comes from the following code in `CMakeCompilerIdDetection.cmake`:

foreach(Id ${ordered_compilers})
  if (NOT _compiler_id_pp_test_${Id})
    message(FATAL_ERROR "No preprocessor test for \"${Id}\"")
  endif()
endforeach()

The variable `ordered_compilers` hard-codes all supported compilers (such as GHS), but I deleted the detection file for GHS in my patch, which triggered this error.

CMake's built-in compiler detection uses files like `GHS-DetermineCompiler.cmake`, which I mistakenly removed. If components are to be packaged separately, I will need to consider avoiding such cross-file dependencies .

For now, I plan not to make further changes - please disregard my patch. I'm sorry for the inconvenience and thank you again for your review.

-----Original Message-----
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> 
Sent: Wednesday, October 29, 2025 6:27 PM
To: Song, Jiaying (CN) <Jiaying.Song.CN@windriver.com>; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] cmake: remove GHS-related files

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Wed Oct 29, 2025 at 7:20 AM CET, Jiaying (CN) via lists.openembedded.org Song wrote:
> From: Jiaying Song <jiaying.song.cn@windriver.com>
>
> Remove files starting with "GHS*". These files are related to the 
> Glasgow Haskell Compiler (GHS), which is not supported, so keeping 
> them is unnecessary.
>
> Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
> ---

Hi Jiaying,

Thanks for your patch.

I suspect this is the cause of the following error on the autobuilder:

oeqa.utils.subprocesstweak.OETestCalledProcessError: Command '. /srv/pokybuild/yocto-worker/qemux86/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0/testimage-sdk/environment-setup-core2-32-poky-linux > /dev/null; cd /srv/pokybuild/yocto-worker/qemux86/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0/testimage-sdk/assimptnwvo_x7/build && cmake -DASSIMP_WARNINGS_AS_ERRORS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON /srv/pokybuild/yocto-worker/qemux86/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0/testimage-sdk/assimptnwvo_x7/assimp-5.4.1;' returned non-zero exit status 1.
...
Standard Output: CMake Error at /srv/pokybuild/yocto-worker/qemux86/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0/testimage-sdk/sysroots/x86_64-pokysdk-linux/usr/share/cmake-4.1/Modules/CMakeCompilerIdDetection.cmake:125 (message):
  No preprocessor test for "GHS"
...
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

https://autobuilder.yoctoproject.org/valkyrie/#/builders/4/builds/2661
https://autobuilder.yoctoproject.org/valkyrie/#/builders/19/builds/2652
https://autobuilder.yoctoproject.org/valkyrie/#/builders/30/builds/2633

Can you have a look at this issue?

Thanks,
Mathieu

--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
diff mbox series

Patch

diff --git a/meta/recipes-devtools/cmake/cmake_4.1.2.bb b/meta/recipes-devtools/cmake/cmake_4.1.2.bb
index cfc5cb1b93..e348eccb9a 100644
--- a/meta/recipes-devtools/cmake/cmake_4.1.2.bb
+++ b/meta/recipes-devtools/cmake/cmake_4.1.2.bb
@@ -61,6 +61,11 @@  do_install:append:class-nativesdk() {
     install -m 0755 ${UNPACKDIR}/cmake-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
 }
 
+do_install:append() {
+    # Remove files related to the Glasgow Haskell Compiler (GHS), which is not supported.
+    find ${D}${datadir}/cmake-${CMAKE_MAJOR_VERSION} -type f -name "GHS*" -exec rm -f {} +
+}
+
 FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}"
 
 FILES:${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION} ${datadir}/cmake ${datadir}/aclocal ${datadir}/emacs ${datadir}/vim"