Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems building the SDK for Mac #18

Open
glouis14 opened this issue May 29, 2014 · 11 comments
Open

Problems building the SDK for Mac #18

glouis14 opened this issue May 29, 2014 · 11 comments
Assignees
Labels

Comments

@glouis14
Copy link

Mac build doesn't work for me.
Initial error message was:
ld: 255 duplicate symbols for architecture x86_64

After following suggestions by user rsneekes the toolchain builds OK.
The SDK however stopped with this message:
make: arm-linux-gnueabihf-g++: No such file or directory

After applying the changes made by jeremeybennett this changed to:
/bin/sh: -Wall: command not found

Please check this forum discussion for details:
http://forums.parallella.org/viewtopic.php?f=13&t=966

Thanks,
Sukandar

OS X 10.9.2
XCode 5.1.1

@jeremybennett
Copy link
Contributor

To clarify the change I recommended was overriding by hand the CROSS_COMPILE variable in build-libs.sh.

One for Ben to look at.

@bcxcube
Copy link
Contributor

bcxcube commented May 29, 2014

With the latest sources you can define the environment variable CROSS_PREFIX prior to building the epiphany-libs tree. Set the prefix to your specific toolchain prefix.

Regards,
Ben

----- Original Message -----
From: "Jeremy Bennett" [email protected]
To: "adapteva/epiphany-sdk" [email protected]
Cc: "Ben Chaco" [email protected]
Sent: Thursday, May 29, 2014 9:36:45 AM
Subject: Re: [epiphany-sdk] Problems building the SDK for Mac (#18)

To clarify the change I recommended was overriding by hand the CROSS_COMPILE variable in build-libs.sh .

One for Ben to look at.


Reply to this email directly or view it on GitHub .

@glouis14
Copy link
Author

sorry if I'm a little obtuse here, but could you elaborate what that prefix would be for a Mac build and where exactly I should set it? Line 141 in build-libs.sh?

thanks, Sukandar

@mtaveniku
Copy link

Ben: if you want to try it use the MAC in my office

Mikael
From mobile device

On May 29, 2014, at 15:56, Ben Chaco [email protected] wrote:

With the latest sources you can define the environment variable CROSS_PREFIX prior to building the epiphany-libs tree. Set the prefix to your specific toolchain prefix.

Regards,
Ben

----- Original Message -----
From: "Jeremy Bennett" [email protected]
To: "adapteva/epiphany-sdk" [email protected]
Cc: "Ben Chaco" [email protected]
Sent: Thursday, May 29, 2014 9:36:45 AM
Subject: Re: [epiphany-sdk] Problems building the SDK for Mac (#18)

To clarify the change I recommended was overriding by hand the CROSS_COMPILE variable in build-libs.sh .

One for Ben to look at.


Reply to this email directly or view it on GitHub .

Reply to this email directly or view it on GitHub.

@bcxcube
Copy link
Contributor

bcxcube commented May 29, 2014

glouis14, I'm not familiar with the arm toolchain for OSX, but the toolchain binaries should contain a prefix. Fo example, on Linux the arm cross tools have the prefix 'arm-linux-gnueabihf-'. So, for example:

[ben@benvm epiphany_workspace]$ ls -1 /usr/bin/arm-linux-gnueabihf-*
/usr/bin/arm-linux-gnueabihf-addr2line*
/usr/bin/arm-linux-gnueabihf-ar*
/usr/bin/arm-linux-gnueabihf-as*
/usr/bin/arm-linux-gnueabihf-c++filt*
/usr/bin/arm-linux-gnueabihf-cpp@
/usr/bin/arm-linux-gnueabihf-cpp-4.6*
/usr/bin/arm-linux-gnueabihf-elfedit*
/usr/bin/arm-linux-gnueabihf-g++@
/usr/bin/arm-linux-gnueabihf-g++-4.6*
/usr/bin/arm-linux-gnueabihf-gcc@
/usr/bin/arm-linux-gnueabihf-gcc-4.6*
/usr/bin/arm-linux-gnueabihf-gcov@
/usr/bin/arm-linux-gnueabihf-gcov-4.6*
/usr/bin/arm-linux-gnueabihf-gprof*
/usr/bin/arm-linux-gnueabihf-ld*
/usr/bin/arm-linux-gnueabihf-ld.bfd*
/usr/bin/arm-linux-gnueabihf-ld.gold*
/usr/bin/arm-linux-gnueabihf-nm*
/usr/bin/arm-linux-gnueabihf-objcopy*
/usr/bin/arm-linux-gnueabihf-objdump*
/usr/bin/arm-linux-gnueabihf-ranlib*
/usr/bin/arm-linux-gnueabihf-readelf*
/usr/bin/arm-linux-gnueabihf-size*
/usr/bin/arm-linux-gnueabihf-strings*
/usr/bin/arm-linux-gnueabihf-strip*

So, on Linux under the Bourne shell, I would export the environment variable CROSS_PREFIX as follows:

export CROSS_PREFIX=arm-linux-gnueabihf-

@glouis14
Copy link
Author

Dear Ben,
thanks for your comments. I don't have anything starting with arm- in /usr/bin (nor /usr/sbin, /usr/local/bin, /usr/local/sbin). Neither do I find it in ${EPIPHANY_HOME}

So are the arm cross tools something I have to install separately from the steps outlined in https://github.com/adapteva/epiphany-sdk/wiki/Building-the-SDK ?
If yes, it would be nice to update the documentation!
Or should these tools have been installed during the build&install of the toolchain? If yes, then something's wrong in this step.

Also, on a different note - if Jeremy directs these questions at you, but you're saying you're not familiar with the Mac OS X toolchain, is there anyone else who is??
Or should I switch to Linux to make my life easier?

thanks,
Sukandar

@zhongliangong
Copy link

Dear Ben and Sukandar
I did a build at the same time on my mac OSX 10.9.3 and ubuntu 14.04 64bit. There is no arm compiler for mac using brew. Ports people might have a package. I tried to install the package from https://launchpadlibrarian.net/135590305/gcc-arm-none-eabi-4_7-2013q1-20130313-mac.tar.bz2 (i covered it in this forum post - http://forums.parallella.org/viewtopic.php?f=13&t=966&start=10#p8044) . But the compilation failed, whereas the default ubuntu package works.

I agree with Sukandar though that something should be done to note the dependencies for both linux and macs and not everyone getting their parallella boards would have an ARM embedded systems setup ready.

On that note - I also found 1) having and sdk inside a the epiphany-sdk directory extremely confusing and lost 1-2 hours figuring out what was wrong with my computers, 2) it should have been made clear that gmp, mpfr and mpc should have been downloaded, placed in the gcc/ folder BUT NOT INSTALLED.

Just my 2 cents.

@bcxcube
Copy link
Contributor

bcxcube commented May 29, 2014

Hi Sukandar,

In order to cross compile the epiphany-sdk (Epiphany toolchain, epiphany-libs, etc.) you will need a ARM cross toolchain that executes on your build host and generates code for the Parallella Linux ARM platform. The Epiphany toolchain is built as part of the Epiphany-SDK and is used for generating code that executes on the Epiphany cores.

The epiphany-libs (eXml, eHal, eLoader, etc.), and the epiphany-examples must be compiled for the Parallella ARM/Linux platform. In order to build these from a build platform other than ARM/Linux, you will need an ARM cross toolchain for the particular host platform.

I'll try to determine the appropriate toolchain package, and process, required for building the epiphany-sdk under Mac OSX and get the documentation updated.

Regards,
Ben

----- Original Message -----
From: "glouis14" [email protected]
To: "adapteva/epiphany-sdk" [email protected]
Cc: "Ben Chaco" [email protected]
Sent: Thursday, May 29, 2014 11:03:46 AM
Subject: Re: [epiphany-sdk] Problems building the SDK for Mac (#18)

Dear Ben,
thanks for your comments. I don't have anything starting with arm- in /usr/bin (nor /usr/sbin, /usr/local/bin, /usr/local/sbin). Neither do I find it in ${EPIPHANY_HOME}

So are the arm cross tools something I have to install separately from the steps outlined in https://github.com/adapteva/epiphany-sdk/wiki/Building-the-SDK ?
If yes, it would be nice to update the documentation!
Or should these tools have been installed during the build&install of the toolchain? If yes, then something's wrong in this step.

Also, on a different note - if Jeremy directs these questions at you, but you're saying you're not familiar with the Mac OS X toolchain, is there anyone else who is??
Or should I switch to Linux to make my life easier?

thanks,
Sukandar


Reply to this email directly or view it on GitHub .

@zhongliangong
Copy link

Thanks Ben for the extended explanation!

@glouis14
Copy link
Author

Thanks Zhong Liang Ong for your remarks and thanks Ben for looking into the toolchain.

I must say though that I'm a bit taken aback by the assumption that everyone already has an ARM toolchain installed and not even mention it on the page with the prerequisites.
(Although it just occurred to me that I actually do have an ARM toolchain "installed" as part of my Arduino package - something that runs out of the box)
Also, even if I had something installed - how am I supposed to know it's a matching toolchain for the Zynq? Ports lists a dozen options (attached below).

About 2)
I have actually both downloaded (to /gcc/) and installed (via ports) gmp, mpfr and mpc. So are you saying I should de-install the latter?

About Mac development in general: I do appreciate the effort, but if it'll always be a second-class citizen I suggest we safe all each other's time and stick with Linux (or migrate there in my case)

thanks,
Sukandar

arm-aout-binutils @2.22_1 (cross, devel), FSF Binutils for arm-aout cross development
arm-aout-gcc @3.3.6 (cross, devel), gcc cross-compilers for arm-aout, with newlib runtime library
arm-elf-binutils @2.21.52.0.2_1 (cross, devel), FSF Binutils for arm-elf cross development
arm-elf-gcc @4.7.3 (cross, devel), gcc cross-compilers for arm-elf, with newlib runtime library
arm-elf-gcc3 @3.4.6_2 (cross, devel), gcc 3.x cross-compilers for arm-elf, with newlib runtime library.
arm-elf-gdb @7.1 (cross, devel), GDB for the ARM processors
arm-none-eabi-binutils @2.23.1_2 (cross, devel), FSF Binutils for arm-none-eabi cross development
arm-none-eabi-gcc @4.7.3_1 (cross, devel), The GNU compiler collection for arm-none-eabi
arm-none-eabi-gdb @7.5.1 (cross, devel), GDB: The GNU Project Debugger for arm-none-eabi
arm-none-linux-gnueabi-binutils @2005q3-2 (cross, devel), FSF Binutils for arm-none-linux-gnueabi cross development, with Code Sourcery patches (for Nokia Internet Tablet)
arm-none-linux-gnueabi-gcc @2005q3-2 (cross, devel), gcc 3.x cross-compilers for arm-none-linux-gnueabi.
arm-none-linux-gnueabi-runtime @cs2005q3.2 (cross, devel), headers and precompiled libraries arm-none-linux-gnueabi (Nokia Internet Tablet), obtained from scratchbox.
arm-rtems-binutils @2.18 (cross, devel), FSF Binutils for arm-rtems cross development
arm-rtems-gcc @4.2.3 (cross, devel), gcc cross-compilers for arm-rtems, with newlib runtime library

@bcxcube
Copy link
Contributor

bcxcube commented May 29, 2014

FYI, I've been trying to install the arm-none-linux-gnuabi-gcc cross tools package on OSX via MacPorts but I'm running into build issues.

It seems that the Macports arm-none-linux-gnuabi-gcc package is currently broken. It does not appear that this package is being maintained by anyone.

-ben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants