Hello World - Building Error

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Hello World - Building Error

Postby Suleyman » Tue May 21, 2013 7:25 am

User avatar
Suleyman
 
Posts: 15
Joined: Tue May 21, 2013 7:20 am

Re: Hello World - Building Error

Postby simoncook » Wed May 22, 2013 10:32 am

Hi suleyman,

This error means that you don't have libmpfr installed on your system. Depending on the distribution you are running, you will either need to install libmpfr4 (Debian/Ubuntu), mpfr (Fedora) or the equivalent package. (Searching mpfr will give you the right name)
Useful SDK Links: - - -
User avatar
simoncook
 
Posts: 50
Joined: Mon Dec 17, 2012 3:25 am
Location: United Kingdom

Re: Hello World - Building Error

Postby Suleyman » Thu May 23, 2013 7:38 am

Hi Simon,

I already have the latest version of libmpfr4 (I use ubuntu but I am not a linux expert).

A couple of things that I came accross was; when I run eclipse with sudo and try to build, the eclipse says 'e-gcc: not found' . Meanwhile without sudo it recognizes e-gcc. So I guess sudo uses a different 'PATH', which makes me think, is it possible that libmpfr4 is installed on the path of su and when I run eclipse as a normal user it doesn't work? This is a bit confusing.

Thanks,
User avatar
Suleyman
 
Posts: 15
Joined: Tue May 21, 2013 7:20 am

Re: Hello World - Building Error

Postby ysapir » Thu May 23, 2013 9:36 am

Is there a particular reason why you run eclipse w/ sudo?
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Hello World - Building Error

Postby Suleyman » Thu May 23, 2013 9:50 am

No special reason. I was just testing.
User avatar
Suleyman
 
Posts: 15
Joined: Tue May 21, 2013 7:20 am

Re: Hello World - Building Error

Postby simoncook » Thu May 23, 2013 12:38 pm

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

Re: Hello World - Building Error

Postby ysapir » Thu May 23, 2013 3:02 pm

User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Hello World - Building Error

Postby simoncook » Thu May 23, 2013 4:25 pm

With sudo, -E allows environment variables to be preserved and make it through to the executing command, though some don't (I assume security). However we can still do "sudo VAR=somevalue mycommand" and mycommand will know those variables. Running a combination of -E and VAR=somevalue enables us to preserve the environment variables that do pass through and reset those that don't to the values we want.

(I have also realised that my previous post is actually highly misleading and should read sudo -E PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH <command> <args...> as to not suggest that -E is related to the environment variable setting. It isn't, I just unintentionally put it twice in what just happens to be a misleading place)
Useful SDK Links: - - -
User avatar
simoncook
 
Posts: 50
Joined: Mon Dec 17, 2012 3:25 am
Location: United Kingdom

Re: Hello World - Building Error

Postby Suleyman » Fri May 24, 2013 11:39 am

I followed the steps in SDK Wiki and installed the sdk. Previously I have downloaded from the ftp site.

In the SDK I got from git, there is no eclipse. Therefore I tried to use the one that I have downloaded from ftp site. I created a multi-core Hello World project and tried to build. This time I got some other problems then I merged the one I downloaded from the ftp site with the one that I got from git. Finally I got a

fatal error: e_coreid.h: No such file or directory.

e_coreid.h is added by default to the common.c in the commonlib project. I found this header file in the esdk/tools/e-gnu.armv7l/epiphany-elf/sys-include directory of the sdk which i downloaded from ftp. In the new installation it doesn't exist. So I guess I have different version for the eclipse plugin and the libraries.
User avatar
Suleyman
 
Posts: 15
Joined: Tue May 21, 2013 7:20 am

Re: Hello World - Building Error

Postby ysapir » Fri May 24, 2013 11:56 am

This Git repo is actually intended for building the GNU toolchain, which is a part of the full eSDK. The epiphany specific headers and libraries are created by the repo from Adapteva's Git page. (Sorry, the integration of the two sites is only half baked).

What you can do is copy the newly created e-gnu directory over the old directory in the eSDK installation that does not work well for you.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 12 guests