> -----Original Message----- > From: Andreas Müller [mailto:[email protected]] > Sent: den 28 maj 2016 15:42 > To: Peter Kjellerstedt > Cc: Patches and discussions about the oe-core layer > Subject: Re: [OE-core] [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add > dirs to stage in sysroot > > On Thu, May 26, 2016 at 10:14 PM, Andreas Müller > <[email protected]> wrote: > > On Thu, May 26, 2016 at 3:41 PM, Peter Kjellerstedt > > <[email protected]> wrote: > >>> -----Original Message----- > >>> From: Andreas Müller [mailto:[email protected]] > >>> Sent: den 26 maj 2016 14:00 > >>> To: Peter Kjellerstedt > >>> Cc: Patches and discussions about the oe-core layer > >>> Subject: Re: [OE-core] [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add > >>> dirs to stage in sysroot > >>> > >>> On Thu, May 12, 2016 at 10:37 AM, Peter Kjellerstedt > >>> <[email protected]> wrote: > >>> > --- > >>> > meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- > >>> > 1 file changed, 1 insertion(+), 4 deletions(-) > >>> > > >>> > diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb > b/meta/recipes- > >>> devtools/tcltk/tcl_8.6.4.bb > >>> > index 8e92b3e..61be81d 100644 > >>> > --- a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb > >>> > +++ b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb > >>> > @@ -68,10 +68,7 @@ do_install() { > >>> > done > >>> > } > >>> > > >>> > -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" > >>> > -tcl_sysroot_preprocess () { > >>> > - sysroot_stage_dir ${D}${bindir_crossscripts} > ${SYSROOT_DESTDIR}${bindir_crossscripts} > >>> > -} > >>> > +SYSROOT_DIRS += "${bindir_crossscripts}" > >>> > > >>> > PACKAGES =+ "tcl-lib" > >>> > FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" > >>> > -- > >>> > 2.1.0 > >>> > > >>> This one breaks meta-oe's postgresql. > >>> > >>> Andreas > >> > >> Breaks it how? > >> > >> //Peter > >> > > Yes I agree I cannot see what's wrong with this patch - together with > > modifications of staging.bbclass it should do same as before. For > test > > I reverted this patch and postgresql builds fine again. Have no idea > > what's causing postgresql failure > > > > Some typo I don't see? > > > To get more infomation I > > * build with patch reverted > * put sysroot under git control > * remove revert again > > Don't know why but now we see absolute paths in tclConfig.sh: > > --- a/usr/bin/crossscripts/tclConfig.sh > +++ b/usr/bin/crossscripts/tclConfig.sh > @@ -57,7 +57,7 @@ TCL_SHLIB_CFLAGS='-fPIC' > TCL_CFLAGS_WARNING='-Wall' > > # Extra flags to pass to cc: > -TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types > -fdebug-prefix-map=/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2/usr/include=/usr/src/debug/tcl/8.6.4-r0 > -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64- > linux= > -fdebug-prefix-map=/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2= > -pipe ' > +TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types > -fdebug-prefix-map=/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2/usr/include=/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2/usr/src/debug/tcl/8.6.4-r0 > -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64- > linux= > -fdebug-prefix-map=/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2= > -pipe ' > > # Base command to use for combining object files into a shared > library: > TCL_SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' > @@ -104,11 +104,11 @@ > TCL_BUILD_LIB_SPEC='-L/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2/us > > # String to pass to linker to pick up the Tcl library from its > # installed directory. > -TCL_LIB_SPEC='-L=/usr/lib -ltcl8.6' > +TCL_LIB_SPEC='-L=/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2/usr/lib > -ltcl8.6' > > # String to pass to the compiler so that an extension can > # find installed Tcl headers. > -TCL_INCLUDE_SPEC='-I=/usr/include/tcl8.6' > +TCL_INCLUDE_SPEC='-I=/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2/usr/include/tcl8.6' > > # Indicates whether a version numbers should be used in -l switches > # ("ok" means it's safe to use switches like -ltcl7.5; "nodots" means > @@ -157,7 +157,7 @@ > TCL_BUILD_STUB_LIB_SPEC='-L/home/superandy/tmp/oe-core- > glibc/sysroots/raspberryp > > # String to pass to linker to pick up the Tcl stub library from its > # installed directory. > -TCL_STUB_LIB_SPEC='-L=/usr/lib -ltclstub8.6' > +TCL_STUB_LIB_SPEC='-L=/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2/usr/lib > -ltclstub8.6' > > # Path to the Tcl stub library in the build directory. > TCL_BUILD_STUB_LIB_PATH='/home/superandy/tmp/oe-core- > glibc/sysroots/raspberrypi2/usr/include/build/libtclstub8.6.a' > > This is the symptom but what is it caused by? > > Andreas
It seems to be an intricate history. The difference stems from the the order things are executed in SYSROOT_PREPROCESS_FUNCS, the fact that the tcl recipe inherits binconfig and that it sets BINCONFIG_GLOB to "*Config.sh". Before my change, the tcl_sysroot_preprocess() function was called after the binconfig_sysroot_preprocess() function, and thus overwrote the tclConfig.sh that the latter function had installed. After my change the "correct" tclConfig.sh is installed by sysroot_stage_all() which is run before binconfig_sysroot_preprocess() and thus the latter now overwrites the "correct" tclConfig.sh with a "faulty" version (I used "correct" and "faulty" here as I guess it depends on one's point of view, and what one expect inheriting binconfig to do...) If I change: BINCONFIG_GLOB = "*Config.sh" to: BINCONFIG_GLOB_class-target = "tclConfig.sh" both the installed files in the sysroots and on target go back to look exactly as they did before my change (and postgresql builds again). Changing "*Config.sh" to "tclConfig.sh" will avoid installing extra files in the sysroots (itclConfig.sh, tclooConfig.sh and tdbcConfig.sh) as I do not think that was intended when the use of binconfig was introduced for tcl (based on what is installed by do_install()). I will send a patch to fix the tcl recipe as per above. //Peter -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
