tcl: fix tclConfig.sh after UNPACKDIR change
A message that is not in the archive (sent off-list or not yet received): [email protected]
add the sed command as a new line. Editing ${WORKDIR} is still required
Quoted 32 lines · Markus Volk via lists.openembedded.org
Add a sed command that edits
tclConfig.sh. This is needed so that tk in meta-oe is capable of reading the required header fileSigned-off-by Markus Volk <[email protected] <mailto:[email protected]>>--- meta/recipes-devtools/tcltk/tcl_9.0.1.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-devtools/tcltk/tcl_9.0.1.bb +1
-1@@ -52,6 +52,7 @@ do_install() { ln -sf tclsh9.0 ${D}${bindir}/tclsh${VER} sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh + sed -i "s;'${UNPACKDIR};'${STAGING_INCDIR};g" tclConfig.sh install -d ${D}${bindir_crossscripts} install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} install -m 0755 tclConfig.sh ${D}${libdir} --2.49.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#219565): <https://lists.openembedded.org/g/openembedded-core/message/219565>
Mute This Topic: <https://lists.openembedded.org/mt/113925455/3618223>
Group Owner: [email protected] <mailto:[email protected]>
Unsubscribe: <https://lists.openembedded.org/g/openembedded-core/unsub> [[email protected] <mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
oops. That doesn't work either. Sorry for the confusion
The problem I'm having:
After applying v1 of this patch, the following command is successful
bitbake -c cleansstate tcl tk && bitbake tk
So I thought the problem was fixed. But after I created an image with this change, it showed the following
, which can be fixed by v2 of this patch, but v2 breaks the tk build again
ERROR: tcl-9.0. 1-r0 do_package_qa: QA problem: file /usr/lib/tclConfig.sh in package tcl-dev contains reference to TMPDIR [buildpaths]
ERROR: tcl-9.0.1-r0 do_package_qa: Fatal QA errors found, task fails.
ERROR: Log file of error saved in: /home/flk/poky/build-raspi/tmp/work/cortexa72-poky-linux/tcl/9.0.1/temp/log.do_package_qa.415042
ERROR: Task (/home/flk/poky/meta/recipes-devtools/tcltk/tcl_9.0.1.bb:do_package_qa) failed with exit code '1'
My conclusion is that we can't get things working properly with tclConfig.sh (without adding a buildpath error) I wonder if it would be better to omit the version in tcl includedir so that it would no longer change dynamically. e.g:
From c2e5e1e4cb9fb1107db4632c4428607931a1b3b9 Mon Sep 17 00:00:00 2001
From: Markus Volk <[email protected]>
Date: Mon, 30 Jun 2025 22:03:17 +0200
Subject: [PATCH] tcl: dont use version in includedir
---.../tcltk/tcl/0004-tcl-update-the-header-location.patch | 8 ++++---- meta/recipes-devtools/tcltk/tcl_9.0.1.bb | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
meta/recipes-devtools/tcltk/tcl/0004-tcl-update-the-header-location.patch +3 -6
@@ -34,7 +34,7 @@ index b5f9ab7..fbc87a2 100644 # Directory in which to install the include file tcl.h: -INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir) -+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/tcl$(VERSION) ++INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/tcl # Path to the private tcl header dir: PRIVATE_INCLUDE_DIR = @PRIVATE_INCLUDE_DIR@
@@ -47,7 +47,7 @@ index 43ec7e4..19524d1 100644 test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(libdir)/tcl$(VERSION)' -PRIVATE_INCLUDE_DIR='$(includedir)' -+PRIVATE_INCLUDE_DIR='$(includedir)/tcl$(VERSION)' ++PRIVATE_INCLUDE_DIR='$(includedir)/tcl' HTML_DIR='$(DISTDIR)/html' # Note: in the following variable, it's important to use the absolute
@@ -56,7 +56,7 @@ index 43ec7e4..19524d1 100644 # Install time header dir can be set via --includedir -eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" -+eval "TCL_INCLUDE_SPEC=\"-I${includedir}/tcl${VERSION}\"" ++eval "TCL_INCLUDE_SPEC=\"-I${includedir}/tcl\""
#------------------------------------------------------------------------
# tclConfig.sh refers to this by a different name
@@ -69,7 +69,7 @@ index 9c6da82..8aa5ae8 100644
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=@includedir@ -+includedir=@includedir@/tcl@PACKAGE_VERSION@ ++includedir=@includedir@/tcl
libfile=@TCL_LIB_FILE@
Name: Tool Command Language
meta/recipes-devtools/tcltk/tcl_9.0.1.bb +3 -3
@@ -51,13 +51,13 @@ do_install() { ln -sf ./tclsh${VER} ${D}${bindir}/tclsh ln -sf tclsh9.0 ${D}${bindir}/tclsh${VER} sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh - sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh + sed -i "s;'${WORKDIR};'${STAGING_INCDIR}/tcl;g" tclConfig.sh install -d ${D}${bindir_crossscripts} install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} install -m 0755 tclConfig.sh ${D}${libdir} for dir in compat generic unix; do - install -d ${D}${includedir}/${BPN}${VER}/$dir - install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ + install -d ${D}${includedir}/${BPN}/$dir + install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}/$dir/ done
}
Signature · 9 lines
2.49.0
I have seen that debian also installs headers in /usr/include/tcl and we could then set includedir in tk.bb
like this without having to deal with dynamically changing directory:
EXTRA_OEMAKE += "TCLDIR=${STAGING_INCDIR}/tcl"
As this is invasive, I wanted to ask whether there are any objections and whether this would be a possible solution at all?Quoted 29 lines · Markus Volk via lists.openembedded.org
add the sed command as a new line. Editing ${WORKDIR} is still required
Quoted 26 lines · Markus Volk via lists.openembedded.org
Add a sed command that edits
tclConfig.sh. This is needed so that tk in meta-oe is capable of reading the required header fileSigned-off-by Markus Volk <[email protected] <mailto:[email protected]>>--- meta/recipes-devtools/tcltk/tcl_9.0.1.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-devtools/tcltk/tcl_9.0.1.bb +1
-1@@ -52,6 +52,7 @@ do_install() { ln -sf tclsh9.0 ${D}${bindir}/tclsh${VER} sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh + sed -i "s;'${UNPACKDIR};'${STAGING_INCDIR};g" tclConfig.sh install -d ${D}${bindir_crossscripts} install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} install -m 0755 tclConfig.sh ${D}${libdir} --2.49.0
I think it's possible to have a different header in sysroots and in target packaging. Look for usage of SYSROOT_PREPROCESS_FUNCS in meta/.
Alex
Quoted 124 lines · Markus Volk via lists.openembedded.org
oops. That doesn't work either. Sorry for the confusion
The problem I'm having:
After applying v1 of this patch, the following command is successful
bitbake -c cleansstate tcl tk && bitbake tk
So I thought the problem was fixed. But after I created an image with this change, it showed the following
, which can be fixed by v2 of this patch, but v2 breaks the tk build again
ERROR: tcl-9.0. 1-r0do_package_qa: QA problem: file/usr/lib/tclConfig.shin package tcl-dev contains reference to TMPDIR [buildpaths]
ERROR: tcl-9.0.1-r0do_package_qa: Fatal QA errors found, task fails.
ERROR: Log file of error saved in:/home/flk/poky/build-raspi/tmp/work/cortexa72-poky-linux/tcl/9.0.1/temp/log.do_package_qa.415042
ERROR: Task (/home/flk/poky/meta/recipes-devtools/tcltk/tcl_9.0.1.bb:do_package_qa) failed with exit code '1'My conclusion is that we can't get things working properly with
tclConfig.sh(without adding a buildpath error) I wonder if it would be better to omit the version in tcl includedir so that it would no longer change dynamically. e.g:From
c2e5e1e4cb9fb1107db4632c4428607931a1b3b9Mon Sep 17 00:00:00 2001
From: Markus Volk <[email protected]>
Date: Mon, 30 Jun 2025 22:03:17 +0200
Subject: [PATCH] tcl: dont use version in includedirSigned-off-by Markus Volk <[email protected]>--- .../tcltk/tcl/0004-tcl-update-the-header-location.patch | 8 ++++---- meta/recipes-devtools/tcltk/tcl_9.0.1.bb | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-)meta/recipes-devtools/tcltk/tcl/0004-tcl-update-the-header-location.patch +4
-4@@ -34,7 +34,7 @@ index b5f9ab7..fbc87a2 100644 # Directory in which to install the include file tcl.h: -INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir) -+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/tcl$(VERSION) ++INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/tcl # Path to the private tcl header dir: PRIVATE_INCLUDE_DIR = @PRIVATE_INCLUDE_DIR@@@ -47,7 +47,7 @@ index 43ec7e4..19524d1 100644 test -z "$TCL_LIBRARY" && TCL_LIBRARY='$(libdir)/tcl$(VERSION)' -PRIVATE_INCLUDE_DIR='$(includedir)' -+PRIVATE_INCLUDE_DIR='$(includedir)/tcl$(VERSION)' ++PRIVATE_INCLUDE_DIR='$(includedir)/tcl' HTML_DIR='$(DISTDIR)/html' # Note: in the following variable, it's important to use the absolute@@ -56,7 +56,7 @@ index 43ec7e4..19524d1 100644 # Install time header dir can be set via --includedir -eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" -+eval "TCL_INCLUDE_SPEC=\"-I${includedir}/tcl${VERSION}\"" ++eval "TCL_INCLUDE_SPEC=\"-I${includedir}/tcl\"" #------------------------------------------------------------------------ # tclConfig.sh refers to this by a different name@@ -69,7 +69,7 @@ index 9c6da82..8aa5ae8 100644 exec_prefix=@exec_prefix@ libdir=@libdir@ -includedir=@includedir@ -+includedir=@includedir@/tcl@PACKAGE_VERSION@ ++includedir=@includedir@/tcl libfile=@TCL_LIB_FILE@ Name: Tool Command Languagemeta/recipes-devtools/tcltk/tcl_9.0.1.bb +3
-4@@ -51,13 +51,13 @@ do_install() { ln -sf ./tclsh${VER} ${D}${bindir}/tclsh ln -sf tclsh9.0 ${D}${bindir}/tclsh${VER} sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh - sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh + sed -i "s;'${WORKDIR};'${STAGING_INCDIR}/tcl;g" tclConfig.sh install -d ${D}${bindir_crossscripts} install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} install -m 0755 tclConfig.sh ${D}${libdir} for dir in compat generic unix; do - install -d ${D}${includedir}/${BPN}${VER}/$dir - install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ + install -d ${D}${includedir}/${BPN}/$dir + install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}/$dir/ done } --2.49.0
I have seen that debian also installs headers in
/usr/include/tcland we could then set includedir in tk.bb like this without having to deal with dynamically changing directory:
EXTRA_OEMAKE+= "TCLDIR=${STAGING_INCDIR}/tcl"As this is invasive, I wanted to ask whether there are any objections and whether this would be a possible solution at all?
On Tue, Jul 1 2025 at 13:27:34 +02:00:00, Markus Volk via lists.openembedded.org <[email protected]> wrote:
add the sed command as a new line. Editing ${WORKDIR} is still required
On Tue, Jul 1 2025 at 13:24:15 +02:00:00, Markus Volk via lists.openembedded.org <[email protected]> wrote:
Add a sed command that edits
tclConfig.sh. This is needed so that tk in meta-oe is capable of reading the required header file Signed-off-by: Markus Volk <[email protected]> --- meta/recipes-devtools/tcltk/tcl_9.0.1.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/tcltk/tcl_9.0.1.bb b/meta/recipes-devtools/tcltk/tcl_9.0.1.bb index70aa9b606c..15f03b6c9e100644 --- a/meta/recipes-devtools/tcltk/tcl_9.0.1.bb +++ b/meta/recipes-devtools/tcltk/tcl_9.0.1.bb @@ -52,6 +52,7 @@do_install(){ ln -sf tclsh9.0 ${D}${bindir}/tclsh${VER} sed -i "s;-L${B};-L${STAGING_LIBDIR};g"tclConfig.shsed -i "s;'${WORKDIR};'${STAGING_INCDIR};g"tclConfig.sh+ sed -i "s;'${UNPACKDIR};'${STAGING_INCDIR};g"tclConfig.shinstall -d ${D}${bindir_crossscripts} install -m 0755tclConfig.sh${D}${bindir_crossscripts} install -m 0755tclConfig.sh${D}${libdir} --
2.49.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#219567): https://lists.openembedded.org/g/openembedded-core/message/219567
Mute This Topic: https://lists.openembedded.org/mt/113925455/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-