errors on compiling e-gcc on new SD image.

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

errors on compiling e-gcc on new SD image.

Postby anupkini » Tue Apr 09, 2013 9:54 am

Hi All,

I have built a new SD Image with Linaro following the gudie put up last week,
I have the kickstarter 16 core version with a ZED Board.

I am trying to build the e-sdk by downloading from source on https://github.com/parallella/epiphany-gcc
I am getting the following erros when i built it.
Link for pastebin:

Let me know if someone has already faced similar issue or know of a solution.

Thanks,
Anup.
anupkini
 
Posts: 15
Joined: Mon Dec 17, 2012 9:28 am
Location: Gruibingen, Germany

Re: errors on compiling e-gcc on new SD image.

Postby simoncook » Tue Apr 09, 2013 10:10 am

Hi anupkini,

Just to check, how did you configure gcc, did you use the configure/build scripts from https://github.com/parallella/epiphany-sdk or did you configure yourself (if so what commands did you use. Secondly, do you have all the prerequisites installed as specified in https://github.com/parallella/epiphany- ... g-on-Linux ?

If you didnt use the epiphany-sdk build-toolchain script, can you give that a try and see if it resolves the issue?
Useful SDK Links: - - -
User avatar
simoncook
 
Posts: 50
Joined: Mon Dec 17, 2012 3:25 am
Location: United Kingdom

Re: errors on compiling e-gcc on new SD image.

Postby anupkini » Tue Apr 09, 2013 11:06 am

Hi Simon,

I was missing Bison, Flex and texinfo.
After installin them through apt-get and restartign the system once, i am stumbling upon this error.

linaro@linaro-ubuntu-desktop:~$ tail -f build-1970-01-01-0000.log
START BUILD: Thu Jan 1 01:00:55 CET 1970
Creating unified source
=======================
Configuring tools
=================
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking target system type... epiphany-unknown-elf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... no
checking for mawk... mawk
configure: error: building out of tree but /home/linaro/sdk/../srcw contains host-armv7l-unknown-linux-gnueabihf.
Use a pristine source tree when building in a separate tree


What is a pristine source tree ??
Should i check out something more ??

Thanks,
Anup.
anupkini
 
Posts: 15
Joined: Mon Dec 17, 2012 9:28 am
Location: Gruibingen, Germany

Re: errors on compiling e-gcc on new SD image.

Postby simoncook » Tue Apr 09, 2013 11:09 am

Hi,

Rerun the script with --force on the end, that error is because tools that weren't installed before now are and the build system should start afresh.
Useful SDK Links: - - -
User avatar
simoncook
 
Posts: 50
Joined: Mon Dec 17, 2012 3:25 am
Location: United Kingdom

Re: errors on compiling e-gcc on new SD image.

Postby anupkini » Tue Apr 09, 2013 1:47 pm

Hi Simon,

I tried a few times with --force switch but it would end up with the same error.
I have now downloaded a fresh copy of all the repositories and trying again.

Will get back once done.


Thanks,
Anup.
anupkini
 
Posts: 15
Joined: Mon Dec 17, 2012 9:28 am
Location: Gruibingen, Germany

Re: errors on compiling e-gcc on new SD image.

Postby simoncook » Tue Apr 09, 2013 1:53 pm

I just re-read the error, if you run "git clean -fxd" and "git reset --hard" in the gcc repository it should then work. The configure script is complaining that there is an old build in the gcc directory.

Also I have just updated the build-toolchain script so that --force is no longer required.
Useful SDK Links: - - -
User avatar
simoncook
 
Posts: 50
Joined: Mon Dec 17, 2012 3:25 am
Location: United Kingdom

Re: errors on compiling e-gcc on new SD image.

Postby anupkini » Tue Apr 09, 2013 2:31 pm

Hi Simon,

I update the details and the build process ran for about and hour.
I ended with the following out of memory errors !!!

gcc -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -I. -Icp -I/home/linaro/sdk/../srcw/gcc -I/home/linaro/sdk/../srcw/gcc/cp -I/home/linaro/sdk/../srcw/gcc/../include -I/home/linaro/sdk/../srcw/gcc/../libcpp/include -I/home/linaro/sdk/../srcw/gcc/../libdecnumber -I/home/linaro/sdk/../srcw/gcc/../libdecnumber/dpd -I../libdecnumber /home/linaro/sdk/../srcw/gcc/cp/except.c -o cp/except.o
/home/linaro/sdk/../srcw/gcc/gcc.c: In function ‘get_random_number’:
/home/linaro/sdk/../srcw/gcc/gcc.c:8065:12: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
Out of memory: Kill process 2418 (unity-2d-shell) score 46 or sacrifice child
Killed process 2418 (unity-2d-shell) total-vm:213400kB, anon-rss:20248kB, file-rss:3292kB
Out of memory: Kill process 25361 (cc1) score 51 or sacrifice child
anupkini
 
Posts: 15
Joined: Mon Dec 17, 2012 9:28 am
Location: Gruibingen, Germany

Re: errors on compiling e-gcc on new SD image.

Postby simoncook » Tue Apr 09, 2013 2:42 pm

In this case I'd suggest turning off parallelism in the build script (comment out line 82/make_load="....") in build-toolchain.sh . The build will (obviously) take longer this way. If that still doesn't work, you should either close programs not doing anything or create some swap space on the SD card temporarily just for the build. To do the latter, as root:

fallocate -l 1G /tmpswap
mkswap /tmpswap
swapon /tmpswap

Once the build is complete, you can use swapoff on the file and remove it, you shouldn't need it when using the tools.

Hope that helps.
Useful SDK Links: - - -
User avatar
simoncook
 
Posts: 50
Joined: Mon Dec 17, 2012 3:25 am
Location: United Kingdom

Re: errors on compiling e-gcc on new SD image.

Postby anupkini » Tue Apr 09, 2013 11:16 pm

Hi Simon,

Thanks a lot for you guidance and help.
It took about 5 hrs and 30 mins to build the e-gcc and the sdk !!!

I also built the github.com-Adapteva/epiphany-libs and epiphany-sdk. Not sure if this was needed or not ;)

Will start working on the hello world example by Yaniv.


regards,
Anup
anupkini
 
Posts: 15
Joined: Mon Dec 17, 2012 9:28 am
Location: Gruibingen, Germany


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 12 guests