Skip to contentSkip to conversation

Martin Jansa : midori: fix build with dirty vala

oe-commits Andreas Müller 2 participants 6 messages Nov 2, 2011 – Nov 4, 2011 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 60 lines · On Tuesday, November 01, 2011 09:59:01 AM [email protected] wrote:

Module: meta-openembedded.git
Branch: master
Commit: bcfc89236b7a96eb00999492351fb9cafc0cbf84
URL:
http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=bcfc89236b
7a96eb00999492351fb9cafc0cbf84

Author: Martin Jansa <[email protected]>
Date:   Wed Oct 19 13:47:03 2011 +0200

midori: fix build with dirty vala

* there is only one line added to default waf file
in unpack_wafdir() just before last chdir and return because those files are downloaded and cannot be patched in normal way os.system("sed -i
\"s/version=output.split/version=output.replace('-dirty','').split/g\" wafadmin/Tools/vala.py")

* It fails to parse version like this /OE/shr-core/tmp/sysroots/x86_64-linux/usr/bin/valac --version Vala 0.12.1-dirty
reporting 0.0.0 instead which breaks configure

---

 .../recipes-connectivity/midori/midori-0.4.1/waf   |  Bin 0 -> 92569 bytes
 .../recipes-connectivity/midori/midori_0.4.1.bb    |    8 ++++++++
 2 files changed, 8 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/meta-oe/recipes-connectivity/midori/midori-0.4.1/waf new file mode 100755
index 0000000..b74a2d8
Binary files /dev/null and b/meta-oe/recipes-connectivity/midori/midori-0.4.1/waf differ diff --git a/meta-oe/recipes-connectivity/midori/midori_0.4.1.bb b/meta-oe/recipes-connectivity/midori/midori_0.4.1.bb index 2805b92..860ed21 100644

meta-oe/recipes-connectivity/midori/midori_0.4.1.bb +2 -0
@@ -1,7 +1,15 @@
 require midori.inc
 
+PR = "r1"
+
 SRC_URI =

"http://archive.xfce.org/src/apps/midori/0.4/midori-${PV}.tar.bz2;name=mid

ori \ +           file://waf \
           "
meta-oe/recipes-connectivity/midori/midori_0.4.1.bb +5 -0
+
+do_configure_prepend() {
+  cp -f ${WORKDIR}/waf ${S}/
+}
+
 SRC_URI[midori.md5sum] = "33dde203cd71ae2b1d2adcc7f5739f65"
 SRC_URI[midori.sha256sum] =
Quoted 3 lines

"b3c77ddb6f562a0ea3d2e6fbb756ca0dc158ad8410f4b60f8e5998c2f7305f07"

Hm - I am afraid since this update midori never finishes configuring here. I waited for approximately 2 hours and stopped the process. The log file is attached ( a fresh retry creates similar log ). I commented out the whole

| do_configure_prepend()

function, ran

| bitbake -ccleanall midori

and

| bitbake midori

without further issues in few minutes.

Maybe we should rethink this monster blob commit intended to fix a corner case...

Andreas

+ cd /home/Superandy/tmp/oe-core-eglibc/work/armv7a-angstrom-linux-gnueabi/midori-0.4.1-r1/midori-0.4.1
+ do_configure
+ cp -f /home/Superandy/tmp/oe-core-eglibc/work/armv7a-angstrom-linux-gnueabi/midori-0.4.1-r1/waf /home/Superandy/tmp/oe-core-eglibc/work/armv7a-angstrom-linux-gnueabi/midori-0.4.1-r1/midori-0.4.1/
+ sed -i -e 's:, shell=False::g' -e s:/usr/X11R6/include::g -e s:/usr/X11R6/lib::g wscript
+ ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-hildon
Checking for Python : /home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/python2
Checking for WAF : /home/Superandy/tmp/oe-core-eglibc/work/armv7a-angstrom-linux-gnueabi/midori-0.4.1-r1/midori-0.4.1/waf
calling waf configure with parameters

Checking for program gcc or cc           : ccache arm-angstrom-linux-gnueabi-gcc  -march=armv7-a -fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -ljavascriptcoregtk-1.0  -mthumb-interwork -mno-thumb --sysroot=/home/Superandy/tmp/oe-core-eglibc/sysroots/overo 
Checking for program ar                  : arm-angstrom-linux-gnueabi-ar 
Checking for program ranlib              : arm-angstrom-linux-gnueabi-ranlib 
Checking for gcc                         : ok  
Checking for program valac               : /home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/valac 
Checking for gobject-2.0                 : yes 
Checking for gthread-2.0                 : yes 

Checking for program version valac >= 0.1.6 : ok 0.12.1
Checking for program glib-genmarshal : /home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/glib-genmarshal
Checking for program glib-mkenums : /home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/glib-mkenums

#2 lore raw
Quoted 59 lines · Andreas Müller
Quoted 58 lines · On Tuesday, November 01, 2011 09:59:01 AM [email protected] wrote:

Module: meta-openembedded.git
Branch: master
Commit: bcfc89236b7a96eb00999492351fb9cafc0cbf84
URL:
http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=bcfc89236b
7a96eb00999492351fb9cafc0cbf84

Author: Martin Jansa <[email protected]>
Date:   Wed Oct 19 13:47:03 2011 +0200

midori: fix build with dirty vala

* there is only one line added to default waf file
in unpack_wafdir() just before last chdir and return because those files are downloaded and cannot be patched in normal way os.system("sed -i
\"s/version=output.split/version=output.replace('-dirty','').split/g\" wafadmin/Tools/vala.py")

* It fails to parse version like this /OE/shr-core/tmp/sysroots/x86_64-linux/usr/bin/valac --version Vala 0.12.1-dirty
reporting 0.0.0 instead which breaks configure

---

 .../recipes-connectivity/midori/midori-0.4.1/waf   |  Bin 0 -> 92569 bytes
 .../recipes-connectivity/midori/midori_0.4.1.bb    |    8 ++++++++
 2 files changed, 8 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/meta-oe/recipes-connectivity/midori/midori-0.4.1/waf new file mode 100755
index 0000000..b74a2d8
Binary files /dev/null and b/meta-oe/recipes-connectivity/midori/midori-0.4.1/waf differ diff --git a/meta-oe/recipes-connectivity/midori/midori_0.4.1.bb b/meta-oe/recipes-connectivity/midori/midori_0.4.1.bb index 2805b92..860ed21 100644

meta-oe/recipes-connectivity/midori/midori_0.4.1.bb +2 -0
@@ -1,7 +1,15 @@
 require midori.inc
 
+PR = "r1"
+
 SRC_URI =

"http://archive.xfce.org/src/apps/midori/0.4/midori-${PV}.tar.bz2;name=mid

ori \ +           file://waf \
           "
meta-oe/recipes-connectivity/midori/midori_0.4.1.bb +5 -0
+
+do_configure_prepend() {
+  cp -f ${WORKDIR}/waf ${S}/
+}
+
Quoted 8 lines
Quoted 5 lines

SRC_URI[midori.md5sum] = "33dde203cd71ae2b1d2adcc7f5739f65" SRC_URI[midori.sha256sum] =
"b3c77ddb6f562a0ea3d2e6fbb756ca0dc158ad8410f4b60f8e5998c2f7305f07"

Hm - I am afraid since this update midori never finishes configuring here. I waited for approximately 2 hours and stopped the process. The log file is attached ( a fresh retry creates similar log ). I commented out the whole

Have you tried to revert it to see that it's not caused ie by glib changes or something? Because my vala detection change is already finished before it writes this stuff and the tar in waf is compared with hardcoded checksum, so it also could not change just by this monster blob.

Could you also check if there is something interesting in ps aux or strace when it's "hanging"? On all 3 boxes I have tried this it always worked as expected.

Quoted 6 lines

| do_configure_prepend()

function, ran

| bitbake -ccleanall midori

Quoted 7 lines

and

| bitbake midori

without further issues in few minutes.

Maybe we should rethink this monster blob commit intended to fix a corner case...

Yes pity that this corner case is our only vala-native and I was hopping that newer midori with newer waf-1.6 will be released soon and this won't be needed anymore..

Cheers,

Quoted 25 lines

Andreas

+ cd /home/Superandy/tmp/oe-core-eglibc/work/armv7a-angstrom-linux-gnueabi/midori-0.4.1-r1/midori-0.4.1
+ do_configure
+ cp -f /home/Superandy/tmp/oe-core-eglibc/work/armv7a-angstrom-linux-gnueabi/midori-0.4.1-r1/waf /home/Superandy/tmp/oe-core-eglibc/work/armv7a-angstrom-linux-gnueabi/midori-0.4.1-r1/midori-0.4.1/
+ sed -i -e 's:, shell=False::g' -e s:/usr/X11R6/include::g -e s:/usr/X11R6/lib::g wscript
+ ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-hildon
Checking for Python : /home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/python2
Checking for WAF : /home/Superandy/tmp/oe-core-eglibc/work/armv7a-angstrom-linux-gnueabi/midori-0.4.1-r1/midori-0.4.1/waf
calling waf configure with parameters

Checking for program gcc or cc           : ccache arm-angstrom-linux-gnueabi-gcc  -march=armv7-a -fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -ljavascriptcoregtk-1.0  -mthumb-interwork -mno-thumb --sysroot=/home/Superandy/tmp/oe-core-eglibc/sysroots/overo 
Checking for program ar                  : arm-angstrom-linux-gnueabi-ar 
Checking for program ranlib              : arm-angstrom-linux-gnueabi-ranlib 
Checking for gcc                         : ok  
Checking for program valac               : /home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/valac 
Checking for gobject-2.0                 : yes 
Checking for gthread-2.0                 : yes 

Checking for program version valac >= 0.1.6 : ok 0.12.1
Checking for program glib-genmarshal : /home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/glib-genmarshal
Checking for program glib-mkenums : /home/Superandy/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/glib-mkenums

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
Quoted 10 lines · Martin Jansa
Quoted 4 lines

Hm - I am afraid since this update midori never finishes configuring here. I waited for approximately 2 hours and stopped the process. The log file is attached ( a fresh retry creates similar log ). I commented out the whole

Have you tried to revert it to see that it's not caused ie by glib changes or something? Because my vala detection change is already finished before it writes this stuff and the tar in waf is compared with hardcoded checksum, so it also could not change just by this monster blob.

When sending previous mail I had two runs with and without your patch which gave me a clear picture. Now I have had some further rebuilds - seems sometimes it builds sometimes not! It's a bit late - tomorrow I would like to check further builds to see if I get a hang too with your patch reverted.

Quoted 15 lines

Could you also check if there is something interesting in ps aux or strace when it's "hanging"? On all 3 boxes I have tried this it always worked as expected.

Quoted 10 lines

| do_configure_prepend()

function, ran

| bitbake -ccleanall midori

and

| bitbake midori

Quoted 8 lines
Quoted 4 lines

without further issues in few minutes.

Maybe we should rethink this monster blob commit intended to fix a corner case...

Yes pity that this corner case is our only vala-native and I was hopping that newer midori with newer waf-1.6 will be released soon and this won't be needed anymore..

Did you send a note to xfce-bugzilla to increase probability of making it happen?

Andreas

#4 lore raw
Quoted 12 lines · Andreas Müller
Quoted 10 lines · Martin Jansa
Quoted 4 lines

Hm - I am afraid since this update midori never finishes configuring here. I waited for approximately 2 hours and stopped the process. The log file is attached ( a fresh retry creates similar log ). I commented out the whole

Have you tried to revert it to see that it's not caused ie by glib changes or something? Because my vala detection change is already finished before it writes this stuff and the tar in waf is compared with hardcoded checksum, so it also could not change just by this monster blob.

Quoted 5 lines

When sending previous mail I had two runs with and without your patch which gave me a clear picture. Now I have had some further rebuilds - seems sometimes it builds sometimes not! It's a bit late - tomorrow I would like to check further builds to see if I get a hang too with your patch reverted.

I created a simple script rebuilding midori again and again. I tested it with your patch reverted -> I cannot tell when, but when I came back had also hang on configure. So your patch is out of suspicion. For now my strategy will be living with it.

Quoted 15 lines
Quoted 15 lines

Could you also check if there is something interesting in ps aux or strace when it's "hanging"? On all 3 boxes I have tried this it always worked as expected.

Quoted 10 lines

| do_configure_prepend()

function, ran

| bitbake -ccleanall midori

and

| bitbake midori

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

without further issues in few minutes.

Maybe we should rethink this monster blob commit intended to fix a corner case...

Yes pity that this corner case is our only vala-native and I was hopping that newer midori with newer waf-1.6 will be released soon and this won't be needed anymore..

What I still do not unterstand: Since configure detetced vala correct with patch reverted I ran

~/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/valac --version

I got

Vala 0.12.1

Why am I not dirty?

Andreas

#5 lore raw
Quoted 48 lines · Andreas Müller
Quoted 12 lines · Andreas Müller
Quoted 10 lines · Martin Jansa
Quoted 4 lines

Hm - I am afraid since this update midori never finishes configuring here. I waited for approximately 2 hours and stopped the process. The log file is attached ( a fresh retry creates similar log ). I commented out the whole

Have you tried to revert it to see that it's not caused ie by glib changes or something? Because my vala detection change is already finished before it writes this stuff and the tar in waf is compared with hardcoded checksum, so it also could not change just by this monster blob.

Quoted 5 lines

When sending previous mail I had two runs with and without your patch which gave me a clear picture. Now I have had some further rebuilds - seems sometimes it builds sometimes not! It's a bit late - tomorrow I would like to check further builds to see if I get a hang too with your patch reverted.

I created a simple script rebuilding midori again and again. I tested it with your patch reverted -> I cannot tell when, but when I came back had also hang on configure. So your patch is out of suspicion. For now my strategy will be living with it.

Quoted 15 lines
Quoted 15 lines

Could you also check if there is something interesting in ps aux or strace when it's "hanging"? On all 3 boxes I have tried this it always worked as expected.

Quoted 10 lines

| do_configure_prepend()

function, ran

| bitbake -ccleanall midori

and

| bitbake midori

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

without further issues in few minutes.

Maybe we should rethink this monster blob commit intended to fix a corner case...

Yes pity that this corner case is our only vala-native and I was hopping that newer midori with newer waf-1.6 will be released soon and this won't be needed anymore..

What I still do not unterstand: Since configure detetced vala correct with patch reverted I ran

Quoted 7 lines

~/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/valac --version

I got

Vala 0.12.1

Why am I not dirty?

SHR buildhost with shr-chroot:
OE @ ~ $ ~/shr-core/tmp/sysroots/x86_64-linux/usr/bin/valac --version Vala 0.12.1-dirty

my buildhost with shr-chroot:
OE @ ~ $ ~/shr-core/tmp/sysroots/x86_64-linux/usr/bin/valac --version Vala 0.12.1

So right now only bad people are dirty and only sometimes.. see how they get dirty

vala/build-aux/git-version-gen
...
# Don't declare a version "dirty" merely because a time stamp has changed. git status > /dev/null 2>&1

dirty=sh -c 'git diff-index --name-only HEAD' 2>/dev/null || dirty= case "$dirty" in

    '') ;;
    *) # Append the suffix only if there isn't one already.
        case $v in
          *-dirty) ;;
          *) v="$v-dirty" ;;
        esac ;;

esac

shr buildhost:
OE @ ~/shr-core/tmp/work/x86_64-linux $ git diff-index --name-only HEAD dev/.keep
dev/null
etc/group
etc/hosts
etc/localtime
etc/passwd
etc/resolv.conf
proc/.keep
sys/.keep
var/cache/ldconfig/aux-cache
var/run/utmp

and my buildhost:
OE @ ~/shr-core/tmp/work/x86_64-linux $ git diff-index --name-only HEAD
fatal: Not a git repository (or any parent up to mount parent /OE/shr-core/tmp) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

The difference is that my tmp/work dir is mount -o bind outside shr-chroot (which is itself git checkout).

So yes.. the detection in vala is not optimal and and causes false positive -dirty, but midori should be able to build even with really dirty vala_git.bb and newer waf is also fixing it like this.

If someone confirms that this patch is causing some problems I'll remove -dirty detection from vala completely so it will also report clean on really dirty vala_git.bb.

Regards,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw
Quoted 63 lines · Martin Jansa
Quoted 50 lines · Andreas Müller
Quoted 12 lines · Andreas Müller
Quoted 10 lines · Martin Jansa
Quoted 4 lines

Hm - I am afraid since this update midori never finishes configuring here. I waited for approximately 2 hours and stopped the process. The log file is attached ( a fresh retry creates similar log ). I commented out the whole

Have you tried to revert it to see that it's not caused ie by glib changes or something? Because my vala detection change is already finished before it writes this stuff and the tar in waf is compared with hardcoded checksum, so it also could not change just by this monster blob.

Quoted 5 lines

When sending previous mail I had two runs with and without your patch which gave me a clear picture. Now I have had some further rebuilds - seems sometimes it builds sometimes not! It's a bit late - tomorrow I would like to check further builds to see if I get a hang too with your patch reverted.

I created a simple script rebuilding midori again and again. I tested it with your patch reverted -> I cannot tell when, but when I came back had also hang on configure. So your patch is out of suspicion. For now my strategy will be living with it.

Quoted 14 lines
Quoted 14 lines

Could you also check if there is something interesting in ps aux or strace when it's "hanging"? On all 3 boxes I have tried this it always worked as expected.

Quoted 10 lines

| do_configure_prepend()

function, ran

| bitbake -ccleanall midori

and

| bitbake midori

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

without further issues in few minutes.

Maybe we should rethink this monster blob commit intended to fix a corner case...

Yes pity that this corner case is our only vala-native and I was hopping that newer midori with newer waf-1.6 will be released soon and this won't be needed anymore..

What I still do not unterstand: Since configure detetced vala correct with patch reverted I ran

Quoted 7 lines

~/tmp/oe-core-eglibc/sysroots/x86_64-linux/usr/bin/valac --version

I got

Vala 0.12.1

Why am I not dirty?

SHR buildhost with shr-chroot:
OE @ ~ $ ~/shr-core/tmp/sysroots/x86_64-linux/usr/bin/valac --version Vala 0.12.1-dirty

Quoted 6 lines

my buildhost with shr-chroot:
OE @ ~ $ ~/shr-core/tmp/sysroots/x86_64-linux/usr/bin/valac --version Vala 0.12.1

So right now only bad people are dirty and only sometimes.. see how they get dirty

:-))

Quoted 30 lines

vala/build-aux/git-version-gen
...
# Don't declare a version "dirty" merely because a time stamp has changed. git status > /dev/null 2>&1

dirty=sh -c 'git diff-index --name-only HEAD' 2>/dev/null || dirty= case "$dirty" in

    '') ;;
    *) # Append the suffix only if there isn't one already.
        case $v in
          *-dirty) ;;
          *) v="$v-dirty" ;;
        esac ;;

esac

shr buildhost:
OE @ ~/shr-core/tmp/work/x86_64-linux $ git diff-index --name-only HEAD dev/.keep
dev/null
etc/group
etc/hosts
etc/localtime
etc/passwd
etc/resolv.conf
proc/.keep
sys/.keep
var/cache/ldconfig/aux-cache
var/run/utmp

Quoted 8 lines

and my buildhost:
OE @ ~/shr-core/tmp/work/x86_64-linux $ git diff-index --name-only HEAD
fatal: Not a git repository (or any parent up to mount parent /OE/shr-core/tmp) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

The difference is that my tmp/work dir is mount -o bind outside shr-chroot (which is itself git checkout).

This is not a corner case - sorry

Quoted 4 lines

So yes.. the detection in vala is not optimal and and causes false positive -dirty, but midori should be able to build even with really dirty vala_git.bb and newer waf is also fixing it like this.

agreed

Quoted 4 lines

If someone confirms that this patch is causing some problems I'll remove -dirty detection from vala completely so it will also report clean on really dirty vala_git.bb.

After my tests it is not modified waf causing the trouble.

Quoted 2 lines

Regards,

Thanks a lot for taking your time to clear up this one.

Andreas