[11:37]  * ogra takes his first look at http://qa.ubuntuwire.org/ftbfs/ in lucid and boggles
[12:22] <ogra> checking for C compiler default output file name...
[12:22] <ogra> configure: error: in `/pulseaudio-0.9.20':
[12:22] <ogra> configure: error: C compiler cannot create executables
[12:22] <ogra> See `config.log' for more details.
[12:22] <ogra> make: *** [config.status] Error 77
[12:22] <ogra> root@dove:/pulseaudio-0.9.20#
[12:23] <ogra> GRRR !
[12:32] <amitk> ogra: do you have ccache installed?
[12:32] <ogra> amitk, nope
[12:32] <ogra> thats a lucid chroot under karmic
[12:32] <amitk> ok, I see that error with dkms packages and ccache installed
[12:32] <ogra> freshly set up, only instaled build-essential and devscripts in it
[12:37] <zumbi> ogra: is it amd64 platform?
[12:37] <ogra> thats on an arm platform indeed
[12:38] <ogra> we dont cross build anything in ubuntu usually
[12:39] <zumbi> uhm.. ok, i need to go now
[13:55] <lool> ogra: and what does config.log say?
[13:56] <ogra> nothing special apart from: configure: exit 77
[13:58] <ogra> NCommander, so about pulse ... afaik the macros are for ARMv7 which is why i added that --march setting when we still were building for v5 , can you try to disable thumb instead ?
[13:59] <ogra> generally they should work for v6 and v7 builds
[13:59] <ogra> (they were added by the nokia community afaik, so should be for omap (i.e. v7))
[14:00] <lool> ogra: Can you upload the full config.log?
[14:00] <ogra> sure, one sec
[14:01]  * ogra wonders how to convince chrome to not show that ugly blue when highlighting stuff
[14:02] <ogra> lool, http://people.canonical.com/~ogra/config.log
[14:04] <lool> cc1: internal compiler error: Illegal instruction
[14:04] <ogra> yeah, just saw that too
[14:04] <ogra> i guess i should upgrade my dove kernel first :)
[14:05] <lool> Yeah that looks like a memory or stability issue -- Z0?
[14:05] <lool> Hmm no Y0 for you*
[14:05] <ogra> Y0 but -204 kernel
[14:05] <lool> I mean you don't have Z0
[14:05] <ogra> right
[14:05] <suihkulokki> while at pulseaudio, can someone tell me howto add a compiler flag for one file in a automakish sourcetree properly
[14:06] <ogra> but my kernel is outdated
[14:06] <suihkulokki> 0.9.20-1 in debian did it wrong, so I it didn't work in 0.9.21-1 anymore
[14:11] <lool> suihkulokki: Don't think you can override per .o; I guess you can create custom rules or use convenience libs?
[14:11] <lool> Oh you can actually
[14:12] <ogra> thats what my patch does in karmic :)
[14:12] <lool> See 27.8
[14:12] <ogra> make -C src libpulsecore_0.9.20_la-svolume_arm.lo CFLAGS+=-march=armv6
[14:12] <lool> libfoo_a_CFLAGS
[14:12] <ogra> ^^^ my karmic patch
[14:13] <ogra> indeed yours is more elegant
[14:15] <suihkulokki> how would libfoo_a_CFLAGS translate to the svolume_arm.o ?
[14:16] <lool> suihkulokki: Depends what you're building
[14:16]  * lool reads source
[14:18] <lool> suihkulokki: libpulsecore_@PA_MAJORMINORMICRO@_la-pulsecore/svolume_arm.o I think
[14:18] <lool> Not sure how / is handled though
[14:19] <lool> For the example of:
[14:19] <lool>      noinst_LIBRARIES = libfoo.a
[14:19] <lool>      libfoo_a_SOURCES = foo.c foo.h
[14:20] <lool> suihkulokki: Actually nevermind, I can't read; they basically recommend using convenience libs or noinst libs
[14:20] <lool> I read it too quickly
[14:20] <saeedb> jeron-mobile:
[14:21] <lool> So what you want is noinst_LIBRARIES = libsvolume_arm.a and libsvolume_arm_SOURCE = pulsecore/svolume_arm.c + libsvolume_arm_CFLAGS = whatever
[14:22] <lool> and libpulsecore_@PA_MAJORMINORMICRO@_la_LDADD = libsvolume_arm.a
[14:41] <NCommander> ogra, I'm not quite sure how to turn off thumb
[14:42] <ogra> --nothumb ? :)
[14:42] <ogra> (gusessing, no idea if that exists :) )
[14:42] <NCommander> ogra, I'll have to read the manpage ;.;
[14:42] <NCommander> ogra, Dave Martin did however give quote a few flags in his talk. I might try some
[14:43] <ogra> hmm, where is he ?
[14:43] <ogra> i thought i saw him joining
[14:43] <ogra> oh, that was on -meeting
[14:44] <NCommander> ogra, dmart is here as well :-)
[14:44] <dmart> Hi
[14:44] <ogra> ah
[14:45] <dmart> To turn off thumb, you should use -marm
[14:45] <lool> Yeah
[14:45] <ogra> ah, right ...
[14:45]  * ogra now remembers it from the talk
[14:45] <lool> Too bad it's not detailed in the man page, just listed
[14:46] <NCommander> ogra, I think we should still have a bug on this. Having pulse use thumb probably is a good thing.
[14:46] <dmart> Ah, yes, pulseaudio
[14:46] <ogra> yes
[14:46] <ogra> and upstream should know about it
[14:46] <NCommander> dmart, yeah, the issue is that there's some handwritten instructions in it that go bust in thumb2 mode
[14:46] <ogra> they did some effort to add v6/7 support
[14:46] <NCommander> dmart, since it tries to use conditionals that aren't availble
[14:47] <ogra> so will likely be intrested in thumb as well
[14:47] <NCommander> addcs/subcs
[14:47] <ogra> yeah, that v6/7 patch is quite ugly
[14:47] <ogra> bt nobody upstream has a clue about arm
[14:47] <ogra> so lennart just accepted it blindly
[14:48] <NCommander> ogra, *shiver*
[14:48] <NCommander> ogra, if -marm works, lets push that, and then I'll asign a bug to myself on portng to Thumb2 mode
[14:48] <ogra> i talked to him at the maemo summit and he said he just takes what people give him... but given he has no clue and neither HW he wont test it at all
[14:48] <ogra> as long as it doesnt break x86 at least
[14:48] <ogra> NCommander, cool
[14:49] <NCommander> ogra, I did some reading on thumb2 mode, but the documentation is a bit thick :-)
[14:49] <armin76> NCommander: i'm here too *g*
[14:49] <NCommander> hey armin76
[14:49] <NCommander> armin76, how's your handwritten thumb2 ASM? :-)
[14:49] <armin76> NCommander: i suggest using -marm as well
[14:49]  * armin76 runs
[14:50] <NCommander> armin76, ;-)
[14:50] <armin76> NCommander: i 'fixed' the sigbus on firefox on sparc, you slacker :)
[14:50] <NCommander> armin76, thats nice. Now fix upstart :-)
[14:50] <NCommander> Its a bad thing when /init crashes
[14:50] <NCommander> */sbin/init
[14:50] <armin76> on sparc?
[14:50] <ogra> why should init crash ?
[14:51] <NCommander> ogra, it segfaults due to alignment issues on SPARC
[14:51]  * ogra points to the channel name :P
[14:51]  * NCommander points to armin76's last comment and leaves it at that
[14:52] <armin76> ok, staying on topic...
[14:52]  * NCommander should probably poke his Y1
[14:52] <armin76> NCommander: i'll fix it if you fix me not having an armv7 board :)
[14:52] <NCommander> armin76, you can buy imx51 hardware now :-P
[14:52] <armin76> NCommander: i get no profit from this, you do? :)
[14:53] <NCommander> armin76, or buy a motorola droid and find a way to get root on it ;-)
[14:53] <ogra> yeah, just win the lottery and buy a babbage board :)
[14:53] <armin76> NCommander: can't i get your z0? :(
[14:53] <ogra> its *only* $750 :)
[14:53] <NCommander> armin76, I never had a Z0
[14:53] <NCommander> armin76, I have a Y0, and a y1 (which is having issues)
[14:53] <armin76> NCommander: can i get ogra's z0?
[14:54] <NCommander> armin76, I think you should ask ogra instead of me :-)
[14:54] <armin76> NCommander: but you can steal from him :)
[14:54] <dmart> Oops... got distracted there
[14:54] <NCommander> armin76, I'm not flying to Germany to break into his house, hide from his dog, steal his Z0, and fly back in the cover of night
[14:55] <armin76> boo
[14:55] <ogra> armin76, you can get all Z0's i have atm ...
[14:55] <dmart> I took a look at the pulseaudio issue at the end of last week... there's an explicit CFLAGS+=-march=armv6 in debian/rules.  This is actually an architecture downgrade and turns off thumb2, when building for v7
[14:55] <NCommander> hrm
[14:55] <armin76> ogra: gimme!
[14:55] <ogra> armin76, dont have any :P
[14:55] <armin76> who has? :)
[14:55] <NCommander> dmart, it should turn off thumb2, but it looked like it didn't actually turn off thumb2
[14:56] <NCommander> armin76, lool and plars
[14:56] <ogra> dmart, it was an upgrade (i added it when we still built for v5)
[14:56] <dmart> NCommander: how do you mean?
[14:56] <ogra> dmart, it needs to be dropped now
[14:56] <ogra> in later karmic it was actually a no-op
[14:56] <dmart> ogra: yes, I see
[14:56] <ogra> in early karmic it fixed the same code thumb chokes on now
[14:57] <dmart> Does anyone know a list I can subscribe to to get a record of all the build failures...?  doko told me at UDS, but I failed to make a note of it.
[14:57] <ogra> which is hardcoded oma assemble stuff iirc
[14:57] <NCommander> dmart, it looked like to me it was trying to do thumb2 with armv6 instructions
[14:57] <ogra> *omap
[14:57] <ogra> *assembler
[14:57]  * ogra needs a typing course
[14:57] <NCommander> dmart, http://qa.ubuntuwire.com/ftbfs/
[14:58] <dmart> NCommander: did you need an explicit -Wa,-mimplicit-it=thumb to get it working?  I think my toolchain may be a bit out of sync, but I needed that
[14:58] <NCommander> dmart, I'm still waiting for my lucid chroot to build
[14:58] <ogra> NCommander, hmm ?
[14:58] <NCommander> ogra, ?
[14:58] <ogra> how did you do the testbuild that made you say it fails on thumb ?
[14:59] <ogra> without having a lucid chroot
[14:59] <dmart> OK; doko was going to make gcc pass -Wa,-mimplicit-it=thumb to as by default, but this was a recent suggestion and I don't know if it's merged yet.
[14:59] <NCommander> ogra, I used a PPA during UDS
[14:59] <ogra> a *lucid* PPA ???
[14:59] <ogra> where did you get that ?
[14:59] <NCommander> ogra, some of us have native PPAs ;-)
[14:59] <dmart> Oh, right-- I used the "proper" lucid toolchain :P
[14:59] <ogra> yeah
[14:59] <dmart> Where should I be looking?  doko's PPA?
[15:00] <NCommander> dmart, for lucid toolchains?
[15:00] <dmart> re http://qa.ubuntuwire.com/ftbfs/, is there also a list I can subscribe to?   It might be easier to review failures as they occur.
[15:00] <ogra> i dont think there is a list
[15:00] <ogra> the uploader is the only person getting build failure notifications atm
[15:01] <dmart> doko pointer at ubuntu-buildd-admins or something like that, but I don't see that on lists.ubuntu.com
[15:01] <armin76> lool: gimme your z0!
[15:01] <dmart> NCommander: lucid toolchains, yes
[15:01] <NCommander> dmart, well ... I think the answer is run lucid on ARM? :-)
[15:02] <dmart> NCommander: that's what I was doing :)
[15:02] <NCommander> dmart, then you should already have the right toolchain
[15:02] <ogra> that should be fine
[15:02] <dmart> NCommander: OK, I'll update and retry.
[15:03] <dmart> NCommander: have we also tried -marm for the problem file, instead of letting it default to Thumb-2?  Because the hand-written code may have been manually optimised for ARM, this may give better performance than Thumb-2.
[15:04] <NCommander> dmart, per-file CFLAGS scare me.
[15:05] <dmart> In general, yes; but debian/rules already has that in this case.  Just a suggestion--- alternatively it might be a good idea to add a comment or raise a flag somehow reminding anyone maintaining the code later that porting to native Thumb-2 would be a good idea
[15:06] <dmart> btw comparing .text sections, the overall code size does seem to reduce by just under 30%
[15:06] <dmart> ...not a very comprehensive test, but it doesn't contradict our expectations.
[15:06] <NCommander> dmart, its a different file that makes things go bust
[15:07] <NCommander> dmart, is there a handy ARM to Thumb2 guide?
[15:09] <NCommander> dmart, I think the CS conditional code isn't being allowed in the block, but I'm not sure how I'm supposed to work around that
[15:20] <NCommander> ogra, actually, I found documentation on how to properly Thumb2-ize this code
[15:20] <NCommander> I'm going to try fixing it properly first, and then testing
[15:24] <NCommander> Martyn, how's your thumb2 looking these days :-)?
[15:25]  * Martyn looks at one hand, then the other..
[15:25] <Martyn> Looks like I have both thumbs...
[15:25] <Martyn> *silly grin*
[15:25] <Martyn> good, although we really need to verify that thumb2 vs/ full ARM really /does/ save code space
[15:25]  * NCommander whacks Martyn with an ARM reference manual
[15:26]  * Martyn drops the ARM TRM for Cortex A9 on NCommander
[15:26] <NCommander> Martyn, I just want a second set of eyes to make sure I'm not using IT correctly
[15:26] <NCommander> ACK
[15:26]  * NCommander throws an execution error as I'm not TRM compatible (yet) :-)
[15:26] <NCommander> Martyn, er, using IT correctly
[15:26]  * NCommander has never had to use it
[15:26] <NCommander> and ...
[15:26] <Martyn> NCommander: Make sure you have thumb2 support compiled into your kernel flava of choice
[15:26] <NCommander> ugh
[15:26] <NCommander> pulseaudio just uninstalled itself on dove
[15:26] <NCommander> \o/
[15:27] <Martyn> WIN
[15:28] <NCommander> Martyn, so if I have an addcs, and movcs instructions
[15:28] <NCommander> I can do this:
[15:28] <NCommander> ITT CS
[15:28] <NCommander> ADDCS r0, %1
[15:28] <NCommander> movcs r6, 0
[15:28] <NCommander> to make the linker shutup about CS being in an IT block
[15:29] <NCommander> Since IT takes CS as the condition, and then additional T to tell it that movcs should also be run as true
[15:29] <Martyn> sure, but that's solving the problem by using a large brick, tied around a cricket bat, and shoved into the problem with a 10 foot ram
[15:29] <NCommander> Martyn, huh?
[15:30] <Martyn> it solves the symptom.. but I'm more curious why that code would get generated in the first place
[15:30] <NCommander> Martyn, oh, this is handwritten ASM
[15:30] <NCommander> Martyn, not auto-generated
[15:30] <Martyn> Ah, in which case you've given yourself all the rope in the world :)
[15:30] <NCommander> Martyn, this is pulseaudios codebase :-P
[15:30] <Martyn> oh.  ugh
[15:30] <NCommander> I've never needed to use IT before because i've never coded in Thumb before
[15:31] <NCommander> I just wanted a sanity check to make sure I'm reading the reference page right
[15:31] <Martyn> you are
[15:31] <NCommander> Martyn, thanks
[15:31] <NCommander> Martyn, ARM's reference manuals freaking rock
[15:32] <Martyn> Want something that rocks harder?
[15:32]  * NCommander is considering buying a dead-tree version for handy desk reference
[15:32] <Martyn> http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf
[15:32] <Martyn> THAT is what is printed next to my desk
[15:33] <NCommander> Martyn, OOOH, an updated version!
[15:33] <ogra> NCommander, you should probably take a look at what angstrom does btw
[15:33] <NCommander> Martyn, (I have the older one with ARM)
[15:33] <Martyn> Yep
[15:33] <ogra> i can imagine they already have proper fixes
[15:33] <NCommander> ogra, for pulse?
[15:33] <ogra> yes
[15:33] <NCommander> ogra, I didn't realize they used thumb2 compiling
[15:34] <ogra> i thnk they use every optimization omap can do
[15:34] <NCommander> 1 angstrom = 1.0 × 10-10 meters - that google search was useful :-P
[15:34] <ogra> search for "angstrom beagle"
[15:34] <ogra> or ask in #beagle
[15:37] <dmart> NCommander: dmart, I think the CS conditional code isn't being allowed in the block, but I'm not sure how I'm supposed to work around that: Building with v7+thumb2, you're effectively telling the assembler to pretend that that (ARM) inline assembler is unified assembler source (this is the new syntax that can be assembler to ARM and Thumb)
[15:37] <dmart> ...however, it is actually the old ARM syntax, to it doesn't contains the IT block annotations needed for Thumb-2
[15:37] <dmart> gcc -Wa,-mimplicit-it=thumb asks the assembler to guess what the IT blocks should have been instead of barfing
[15:38] <dmart> This option should be in the toolchain by default; but I'm not sure if it's merged yet; that was my earlier query.
[15:38] <NCommander> dmart, I rather just specify it properly */2 cents*
[15:39] <dmart> NCommander: specifying it properly is preferable, but you will need #ifdefs to allow the result to assmble when compiled as ARM (e.g., for the Debian folks)
[15:39] <dmart> Migrating over time would be good, but there might be a lot of bits of assembler to port if we try to do it all up front.
[15:40] <dmart> The -mimplicit-it=thumb thing is used for Thumb-2 kernel builds, for example.
[15:40] <NCommander> dmart, doesn't the assembler known what the IT instruction is?
[15:40] <NCommander> (I can put #ifdef (__thumb__) or whatever the correct ifdef is
[15:42] <dmart> NCommander: for historical reasons, GCC uses the traditional assembler syntax when compiling for ARM, and as does not understand IT blocks in this mode (unfortunately).
[15:42] <NCommander> dmart, so ifdef's it is :-/
[15:42] <ogra> on a sidenote using -marm works ... so we have a fallback if you dont manage
[15:43]  * ogra just has it building
[15:43] <NCommander> ogra, thanks. I'm just dist-upgrading karmic to lucid so I can test the resulting binaries after I finish building
[15:43] <dmart> NCommander: Absolutely--- -marm is our friend if it looks like we're wasting time on any particular package... we can fix problem cases later.
[15:43] <ogra> NCommander, given that pulse seems to block the livefses we should probably go with it as a quick fix so we have images asap
[15:44] <NCommander> ogra, just give me a few hours to see if we can fix it properly.
[15:44] <dmart> NCommander: feel free to throw me your code if you want me to sanity-check.
[15:44] <ogra> yup
[15:44] <NCommander> dmart, I'll take you up on that offer
[15:44] <ogra> NCommander, just if you dont mamange it before your holiday
[15:44] <NCommander> ogra, right, of course.
[15:45] <NCommander> ogra, we probably should have a wiki page with problem packages
[15:45] <ogra> NCommander, we have the ftbfs list
[15:45] <ogra> and if you add a workaround you should simply keep it in mind
[15:46] <ogra> and indeed note it in the changelog
[15:47] <NCommander> ogra, fair enough
[15:47] <dmart> Can anyone suggest a wiki page to track how we fixed packages.  We don't have to track everything, but it would serve as a FAQ for anyone faced with this task.
[15:47]  * NCommander isn't looking forward to getting OOo building with Thumb2
[15:48] <ogra> i guess the angstrom ppl solved that already
[15:48] <ogra> dmart, i dont think we have one yet
[15:48] <NCommander> ogra, angstorm isn't built for Thumb2 according to #beagle
[15:48] <ogra> dmart, so feel free to create one in the /ARM namespace on te wiki
[15:48] <ogra> ok
[15:49] <NCommander> food time
[15:49] <dmart> OK... I'll create an empty page and we can stick stuff on there
[15:49] <ogra> oki
[15:51] <dmart> NCommander: gcc defines a macro __thumb2__ which is probably what you want to check for in #ifdefs (maybe you could define a helper #ifdef __thumb2__ // #define THUMB2_ONLY(string) string // #else // #define THUMB2_ONLY(string) // #endif
[16:12] <NCommander> dmart, with implicate-it though, aren't we masking the problem versus properly fixing it?
[16:15] <NCommander> ^- ogra, asac
[16:16] <ogra> NCommander, see -devel backlog
[16:16] <ogra> adding IT is surely the best but likely produces a lot of work
[16:17] <NCommander> ogra, *grumble*
[16:17] <ogra> NCommander, implicate-it is similar but needs to be done on a per file basis
[16:18] <NCommander> ogra, per-file basis? I thought you said the default was going to be changed to implicate-it
[16:18] <ogra> which in case of pulse is moot because we already do it for that specific file
[16:18] <ogra> right "going to be"
[16:18] <NCommander> That's the issue I have.
[16:18]  * ogra just wants a livefs to check the images
[16:18] <NCommander> I rather have the issues be flushed out
[16:19] <NCommander> And then add it on a per-package basis after bugging upstreams
[16:21] <NCommander> ^- asac - your opinion?
[16:22] <ogra> god ... the debhelper stuff in pulse takes nearly as long as the whole build
[16:23]  * NCommander hands ogra a bottle of bleach for his eyes
[16:23] <ogra> heh
[16:24] <ogra> seems also that every module has an initscript nowadays
[16:24] <NCommander> ogra, my only issue with implicant-its, which will work, is we're plastering over an issue over properly fixing it. I have no objections on specifying it on a per package basis, as long as we keep note of those packages
[16:25] <NCommander> oh wow
[16:25] <NCommander> GCC ICE'ed on lucid here
[16:25] <ogra> well, go ahead and fix the code but i doubt you can do it as quick as just switching the hack we already have
[16:26] <ogra> i'd really like to have testable images by end of the week or even earlier
[16:27] <NCommander> "cc1: internal compiler error: Illegal instruction"
[16:27] <NCommander> Uh oh
[16:28] <armin76> ricer
[16:29] <ogra> NCommander, yes, i uploaded my config.log with the same error about 3h ago
[16:29] <ogra> NCommander, though i thought its caused by using the -204 dove kernel ... intresting that it shows up on a recent one too
[16:29] <NCommander> ogra, lucid on dove doesn't even get to start X
[16:30] <ogra> NCommander, it works flawless on the babbage
[16:30] <NCommander> It dumped me to the console
[16:30] <NCommander> CONFIG_ARM_THUMB is set in config
[16:30] <ogra> THUMB or THUMB2 ?
[16:30] <NCommander> THUMB2 isn't even in the config file at all
[16:31] <ogra> i doubt it has anything to do with kernel options though
[16:32] <NCommander> ogra, I'm getting a sinking feeling ATM.
[16:32] <ogra> like ... having to do more work on dove than expected ? :)
[16:32] <NCommander> ogra, like, are we sure dove supports Thumb2 properly?
[16:32] <ogra> well, marvell said so
[16:32] <NCommander> and are we compiling for Thumb2 properly :-)?
[16:33] <NCommander> dmart, ping?
[16:33] <ogra> you should ping marvell :)
[16:33] <NCommander> dmart, do we need special kernel foo for Thumb2
[16:33] <NCommander> ogra, I just want to make sure we don't need a special CONFIG_* something in the kernel
[16:33]  * ogra doesnt think so ... only if you want the kernel binary itself to be thumb2 as i undrestood
[16:34] <NCommander> ogra, context switches and friends would have to be thumb2 aware though
[16:34] <ogra> root@babbage2:/pulseaudio-0.9.20# ls -l ../pulseaudio_0.9.20-0ubuntu2_armel.deb
[16:34] <ogra> -rw-r--r-- 1 root root 1081438 Nov 24 16:31 ../pulseaudio_0.9.20-0ubuntu2_armel.deb
[16:34] <ogra> there we go
[16:34] <ogra> ogra@babbage2:~$ grep -i thumb /boot/config-2.6.31-105-imx51
[16:34] <ogra> CONFIG_ARM_THUMB=y
[16:34] <ogra> # CONFIG_ARM_THUMBEE is not set
[16:34]  * NCommander takes his proposed patch and pops it into a PPA
[16:35] <ogra> so as you can see, babbage doesnt have it set either
[16:35] <ogra> THUMB is there but no THUMB2
[16:36] <ogra> the pulse build is done in a lucid chroot on a karmic install ...
[16:36] <NCommander> ogra, this is a pure lucid system here
[16:37] <NCommander> things are quite broken
[16:37] <ogra> well, we use jaunty on the buildds
[16:37] <ogra> with lucid chroots
[16:37] <NCommander> ogra, ugh
[16:37] <NCommander> ogra, I think there's an alignment fault in X
[16:37] <armin76> :D
[16:37] <NCommander> cat alignment says User: 9, and Skipped: (
[16:37] <NCommander> *9
[16:38] <NCommander> when I startx
[16:38] <NCommander> that goes to 10 and 10
[16:38] <ogra> well, works on the babbage
[16:38] <NCommander> ogra, whats /proc/cpu/alignment say?
[16:38] <ogra> whatever we defaulted to in karmic
[16:39] <NCommander> ogra, I'm curious if its skipping the alignment faults or not
[16:40]  * ogra tries pulse with -mimplicit-it=thumb
[16:40] <ogra> -marm definately worked
[16:40]  * NCommander has a patch that adds the itt line but can't test it
[16:41] <ogra> NCommander, i'll care for X stuff once i have images ... i wont trash my test-build systems
[16:41] <NCommander> rabeeh, ping?
[16:43] <NCommander> ogra, I think we set the default /proc/cpu/alignment to 2 (fixup) so alignment faults won't break the world
[16:43] <NCommander> ogra, for some reason, thumb2 seems to break alignment fixup on Dove
[16:43] <zumbi> ogra: did you solve configure: error: C compiler cannot create executables ?
[16:44] <ogra> NCommander, -Wa,-mimplicit-it=thumb works too ...
[16:44] <NCommander> zumbi, no, but I can reproduce it
[16:44] <ogra> zumbi, nope, i just use a board thats known to work :)
[16:44] <NCommander> zumbi, cc1 is abending with alignement exception, and illegal instruction
[16:44] <ogra> since i want to get the stuff done
[16:45] <ogra> the CC error is definately hardware bound
[16:45]  * NCommander can't get anything done now on lucid due to this bug
[16:45] <NCommander> argh
[16:45] <ogra> it wont work with karmic either
[16:46] <zumbi> when building cross compilers on amd64, I get similar errors, since today at my localhost it used to work, while at my remote host I got that error. I think there is something wrong on binutils
[16:47] <NCommander> ogra, which binutils you got installed?
[16:47] <NCommander> bbiab
[16:47] <ogra> NCommander, i can tell you in ~1h when pulse is done
[16:48] <ogra> the one thats default in lucid
[16:48] <ogra> as i said, its a lucid chroot
[16:48] <NCommander> ogra, right, fully up-to-date then?
[16:48]  * NCommander just wants to make sure
[16:49] <ogra> NCommander, debootstrapped right before building, so yes
[16:49] <ogra> unless doko uploaded something i missed within the last hour
[16:49] <ojn> NCommander/ogra: Once you're done doing the feasibility tests, I recommend giving the thumb2 userspace (and kernel) a good workout on babbage. Cortex-A8 has some bugs that your toolchain _has_ workarounds for (if enabled), but they're not 100% fool-proof.
[16:49] <ojn> Dove doesn't have them, since it's a separate implementation
[16:50] <ogra> ah, that might be the cause for NCommanders probs then
[16:50] <NCommander> ojn, ogra Dove isn't Cortex A8
[16:50] <NCommander> It's Marvell ARMADA
[16:50] <ojn> NCommander: right, which is what I said above
[16:50] <ojn> Babbage is
[16:50] <ogra> right
[16:51] <ojn> I was going to bring it up at UDS but I saw there were patches in the toolchain for it, and figured it was worth to try it first. :)
[16:52] <ogra> we'll escalate it to marvell
[16:52] <ogra> and talk to our toolchain maintainer
[16:52] <ogra> thanks for the heads up
[16:55] <zumbi> NCommander: if you have some time, maybe could test with an older binutils (one from before august/september)
[17:08] <Martyn> What is the name of the Canonical/Ubuntu service that monitors your servers for you?
[17:08] <Martyn> It's driving me mad that I can't remembe rit
[17:10] <ogra> landscape
[17:17] <dmart> all: gcc can be made to pass -mimplicit-it=thumb to the assembler, as a permanent default.
[17:18] <dmart> For inline assembler, the effect may be slightly non-optimal code
[17:18] <dmart> For all other code, there will be no effect, so it's safe to have it as default.
[17:19] <ogra> yeah
[17:19] <ogra> and i just confirmed pulse is fine with -mimplicit-it=thumb ....
[17:19] <ogra> it just finishes rolling the package in my testbuild
[17:20] <dmart> Ideally, we would port everything to Thumb2, but I think that may be laborious and not so worthwhile.  Unless we actually reschedule and re-optimise the code, doing it by hand won't be significantly better than the implicit-it approximation anyway.
[17:20] <NCommander> dmart, ogra, so for thumb2 on dove, the issue is at least partially alignment related. Setting alignment to nothing or warn causes a hang. Setting it to fixup causes an ABEND, and illegal instruction
[17:21] <ogra> so if NCommander doesnt come up with a patch for the assembler code by tomorrow morning, i'll just upload that quick fix and drop it once the toochain uses it
[17:21] <ogra> so we get a working pulse package
[17:21] <NCommander> ogra, I'm testing my fix in a PPA ATM since my board useless to compile stuff on
[17:21] <dmart> NCommander: Going back to your kernel question, the "Thumb userspace binaries" option (CONFIG_THUMB) is all you need to enable Thumb-2 support in the kernel.
[17:22] <NCommander> dmart, bugger :-/
[17:22] <ogra> ah, wasnt there a THUMB2 option as well ?
[17:22] <ojn> THUMBEE?
[17:22] <ogra> (though i dont see one i thought that was mentioned in one of the session notes)
[17:23] <dmart> There is no separate "THUMB2" option because actually no extra support is needed in the kernel at all.
[17:23] <ojn> ah, nevermind.
[17:23] <ogra> great ... we're fine then
[17:23] <ogra> CONFIG_THUMB is enabled in all our kernels already
[17:23] <dmart> THUMBEE is something different; turn this on, since it's useful for JITs etc.; I know there's some openjdk work looking at this.
[17:24]  * jhobbs pokes Martyn 
[17:24] <dmart> I don't think any kernel config change is needed
[17:24] <NCommander> dmart, do you know anything about thumb2 and alignment issues?
[17:24] <dmart> My lucid chroot seems to work OK
[17:24] <NCommander> dmart, what hardware?
[17:24] <ogra> dmart, do you have a dove board around ?
[17:24] <ogra> seems it has issues
[17:25] <ogra> though i dont think its necessarily thumb related at all
[17:25] <NCommander> ogra, just for the record, are you using a Y0 or Y1?
[17:25] <ogra> Y0
[17:25] <NCommander> Same
[17:25]  * NCommander tries his Y1
[17:25] <dmart> NCommander: i.MX51
[17:25] <ogra> and i had the issue with a lucid chroot on karmic
[17:26] <ogra> while you had the same with a plain lucid install
[17:26] <NCommander> ogra, why do you think its isn't Thumb specific?
[17:27] <ogra> why do you think it is ?
[17:27] <ogra> its just a compile ICE, it can be caused by anything
[17:27] <ogra> *compiler
[17:27] <NCommander> ogra, no, the binary is throwing illegal instruction
[17:27] <NCommander> Same as X
[17:27] <ogra> especially i dont think the configure script of pulse checks anything related to thumb
[17:28] <NCommander> ogra, Try building hello world
[17:28] <NCommander> It goes boom.
[17:28] <dmart> Apparently, alignment faulting is not enabled by default in the kernel on v6 and above, so I'm wondering why fixups are needed?
[17:28] <ogra> right, and why does that point to thumb in your opinion ?
[17:29] <Martyn> jhobbs : What?  I was on a call n stuff
[17:29] <NCommander> ogra, lets see here, We moved to Thumb2. Suddenly alignment always says Skipped: on Dove, Xorg and gcc are failing with Illegal instructions
[17:29] <ogra> it points surely to the toolchain, but i dont see any specific pointer to thumb
[17:29] <NCommander> And I have Alignement trap: not handling instruction in dmesg
[17:29] <ogra> NCommander, we also moved to armv7
[17:29] <NCommander> ogra, fair enough.
[17:30] <NCommander> ogra, at least its an easily reproduce test case :-)
[17:30] <ogra> NCommander, and see ojn's comment above
[17:30] <NCommander> ogra, about Cortex-A8 quarks? I saw
[17:30] <ogra> yes
[17:30] <NCommander> Its irreveleant unless the workaround causes issues in non-Cortex A8 chips
[17:31] <dmart> NCommander: can you cat /proc/cpu/alignment
[17:31] <NCommander> dmart, 2 (fixup)
[17:31] <ogra> well, we use -march=cortex-a8, no ?
[17:31] <NCommander> dmart, if its set to not fix it, then the app just hangs
[17:31] <NCommander> dmart, User: 8/Skipped: 8
[17:31] <ogra> and dove isnt 100% cortex-a8
[17:32] <NCommander> Starting X or running GCC causes that count to go up
[17:32] <NCommander> ogra, Dove isn't Cortex A8 at all
[17:32] <dmart> All v6 processors and above support full unaligned access by default, excluding certain instructions.  Alignment faulting is optional
[17:32] <ogra> NCommander, right, thats what i mean ...
[17:32] <dmart> NCommander: what happend if you change /proc/cpu/alingment to 1 (warn) ?
[17:32] <NCommander> ogra, (ah, English translation error :-))
[17:32] <NCommander> dmart, apps just hang
[17:32] <ogra> NCommander, which is why i think its rather an issue with the arch than with thumb
[17:33] <ogra> s/arch/arch setting/
[17:33] <dmart> Can you do an unaligned access from ARM and see what happens?
[17:33] <NCommander> dmart, uh ...
[17:33]  * NCommander has nothing handy
[17:33] <NCommander> dmart, got some test code for me?
[17:36] <dmart> How about
[17:36] <dmart> void main(void) { unsigned long long dword = 0x123456789ABCDEF0; unsigned long result; asm ( "ldr %0, [%1, #3]" : "=r" (result) : "r" (&dword) ); printf("result = %lX\n", result); }
[17:37] <dmart> I will try this now... I think it should print result = 3456789A, without falling over
[17:39] <NCommander> dmart, hrm ...
[17:39] <NCommander> dmart, bit hard to compile it when the compiler is falling over :-)
[17:40] <ogra> build it on karmic and run it in your chroot ?
[17:40] <ogra> err ...
[17:40] <ogra> hrm, you upgraded the whole thing ... nm
[17:41] <NCommander> dmart, ARM compiled it works
[17:41] <NCommander> dmart, (User faults: 2 (fixup))
[17:41] <NCommander> dmart, this is with an arm cross-compiler
[17:42] <dmart> Hmmm, I can send you a couple of binaries?  What's the best way to do that?
[17:43] <NCommander> dmart, email probably
[17:43] <NCommander> dmart, the same binary compiled with -mtumb -march=cortex-a8 works as well on Dove
[17:44] <dmart> Hang on a mo
[17:46]  * ogra thinks we need a doko here ....
[17:58] <NCommander> dmart, both work on all alignment settings and don't trip an alignment fault
[17:59] <dmart> That's what I was seeing on i.MX51... Weird...
[17:59] <dmart> I have to diasppear soon, but can you try triggering a signal when the problem happens and catch it in gdb?  It would be interesting to see what the problem code is.
[17:59] <NCommander> dmart, I'll see what I can do
[18:00] <dmart> echo 4 >/proc/cpu/alignment enables a signal on alignment fault; though if you're getting SIGILL anyway, you might not need that
[18:00] <NCommander> dmart, yeah, that changes SIGILL to SIGBUS
[18:00] <NCommander> dmart, I need to install ddebs so I can give you decent gdb output
[18:09] <saeedb> NCommander: I didn't follow all the conversation, bug please note the armv6/7 cpus can handle unaligned access when bit 22 of the cp15 control register is set
[18:09] <saeedb> bug->but
[18:10] <NCommander> saeedb, right, but we're seeing an unusual issue on Dove Yx boards which shows up as an alignment trap
[18:10] <dmart> Is the kernel config the same between these two kernels for CONFIG_ALIGNMENT (or CONFIG_ALIGNMENT_TRAP or whatever the name is)
[18:13] <NCommander> dmart, its CONFIG_ALIGNMENT_TRAP=y on Dovce
[18:13] <NCommander> *dove
[18:14] <dmart> Same on imx51
[18:15] <dmart> saeedb: You're right, but the control register U bit is legacy only: the armv7 architecture specifies that this bit always reads as one and you can't change it
[18:18] <saeedb> I see
[18:18] <saeedb> NCommander: what is the issue that causes alignment trap? is it thumb specific?
[18:19] <NCommander> saeedb, we're not sure
[18:19] <NCommander> saeedb, karmic to lucid moved the toolchain and compiled binaries to ARMv7+Thumb from ARMv6
[18:19] <NCommander> er, Thumb2
[18:20] <NCommander> saeedb, so it could either be Thumb2 causing the breakage, or something in the ARMv7 instruction set
[18:20] <NCommander> saeedb, as far as I can tell, only X and GCC currently go boom
[18:20] <NCommander> As I can boot the resulting system
[18:20] <NCommander> and xsplash seems to semi-work
[18:20] <NCommander> so I'm unsure
[18:20] <dmart> The ARMv7 instruction set doesn't contain much different from v6, for general purpose code, so Thumb-2 seems more likely.
[18:21] <dmart> I haven't tried to boot lucid yet; I've only been running a chroot.
[18:22] <dmart> I have to disappear now, but if you send gdb output I'll take a look.  If it's possible to send me a coredump, that would be useful to look at.
[18:23] <NCommander> dmart, lucid does boot
[18:28] <dmart> NCommander: glad to hear it :)
[18:28] <dmart> Catch you tomorrow
[18:32] <saeedb> Ncommander:  can you add some debug code in the do_aligment fucntion and check what is the instruction mode?
[18:36] <NCommander> saeedb, I checked the preprocessor flag is set for thumb2 properly, but I'm not sure how to check the register flags to see if we're in thumb2 off the top of my head
[18:43] <rcn-ee> home for lunch and catching up on the irc backlog.  Just to let you know, I'm also seeing some of the same alignment/illegal instructions on my lucid chroot on the beagle...
[18:53] <saeedb> NCommander: the thumb mode enable when bit 5 of the cpsr is set. anyway, I think it's better to add some prints in the do_alignment, do you want me to send you a patch?
[21:56] <NCommander> saeedb, that would be nice
[21:56] <NCommander> (sorry, didn't see your last message)
[22:36] <saeedb> NCommander: sent to your gmail