toolchain/SDK build time

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

toolchain/SDK build time

Postby tnt » Wed May 01, 2013 9:31 pm

The ./build-toolchain.sh tool has some _SERIOUS_ issues ...

I've spend the last 4 hours basically trying to build the latest toolchain on the board and all that because that script has some real optimization issues and I'm really pissed off right now for loosing time dealing with it.

1) When you're missing a dependency, the script basically start for _SCRATCH_ and that's just plain unacceptable, especially since it spends half it's damn time creating a damn "unified source"
2) WHY is that whole 'unified source tree' stuff even needed, it's the first time I see that in a toolchain build ...

So all in all, a complete evening lost dealing with the tools rather than actually doing something useful ...
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: toolchain/SDK build time

Postby simoncook » Wed May 01, 2013 10:33 pm

Hi tnt,

Firstly, sorry to hear you've had issues with the toolchain building script. To answer your points about unified source, whilst I do not have numbers in front of me to demonstrate this, it is my understanding that amongst other reasons one point of using unified source, whilst not strictly necessary, it gives us the ability to build the toolchain quicker in parallel where there is no longer a barrier for waiting for binutils/sourceware to build to then build gcc to then go back to the binutils/sourceware directory to build newlib now we have a compiler.

If the time to build the unified source (and any additional overheads from using the symlinks later on) is less than the additional time of going back and forth then we've gained something by doing this. Whilst it should make a difference if the machine building the toolchain is powerful enough, when doing this directly on the ARM/Epiphany board then it may not (again, I don't have numbers to confirm).

What I do agree on is that the current state of rebuilding that directory every time is not necessary, rebuilding is only necessary if a file has been created or deleted since the last build, which it obviously hasn't in the scenario you are describing. I will add an option to the build script to use the old unified source directory to avoid needless rebuilding in the future.

Regarding your first point regarding restarting everything from scratch when missing a dependency, this is done because interesting (and usually bad) things happen if we don't. Whilst making the change mentioned above I will also add an option to not have the script build everything from scratch each time.

Again, sorry that you've met these issues, but I hope the changes I make should at least reduce these pain points for future builds.
Useful SDK Links: - - -
User avatar
simoncook
 
Posts: 50
Joined: Mon Dec 17, 2012 3:25 am
Location: United Kingdom

Re: toolchain/SDK build time

Postby tnt » Wed May 01, 2013 10:36 pm

For reference, this is how to do a proper merge :

http://pastebin.com/iMSW0wWk

This script creates a bit less than 500 symlinks and takes less than 1 sec.
Compare that to the more than 100000 symlinks and >30min used by the symlink-all script in the epiphany-sdk repo ...
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: toolchain/SDK build time

Postby Dr.BeauWebber » Sat May 25, 2013 6:41 pm

Yes please to this flag, it takes half a day to rebuild the sources on my multi-core lap-top, and I have had to do it 5 times now, due to later build failures in the process,
cheers, Beau
User avatar
Dr.BeauWebber
 
Posts: 114
Joined: Mon Dec 17, 2012 4:01 am
Location: England

Re: toolchain/SDK build time

Postby Dr.BeauWebber » Sun May 26, 2013 6:07 pm

Hmm, it is fairly simple to create a copy of the build script with the build source bit commented out.
However I am still having problems later.
User avatar
Dr.BeauWebber
 
Posts: 114
Joined: Mon Dec 17, 2012 4:01 am
Location: England


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 12 guests