ps3dev / ps3toolchain

A script to autobuild an open source toolchain for the PS3.
BSD 2-Clause "Simplified" License
283 stars 92 forks source link

mac osx 10.6.6 002-gcc-4.5.2-PPU-stage1.sh #15

Closed pere3 closed 13 years ago

pere3 commented 13 years ago

--with-libelf=/opt/local --with-libiconv-prefix=/opt/local needed for build

pere3 commented 13 years ago

seems like this options needed in all gcc build scripts

ooPo commented 13 years ago

What about when libelf isn't in /opt? What happens then?

When I build in osx, it works fine because brew installs libelf to /usr/local instead.

pere3 commented 13 years ago

macports installs libelf into /opt/local and people use macports often than building libelf from source on their own

jfmherokiller commented 13 years ago

well what if we installed it from source instead of from macports

ooPo commented 13 years ago

The problem is that macports installs libelf outside of the places gcc (and other software) look for it by default. This is why it has to be manually specified.

There's two ways to fix this:

1) Manually specify the new path. 2) Install libelf into a standard location.

Which is the better solution? Both have merit, but I'd like to lean towards ensuring the user has a standardized environment when possible. Otherwise we'll end up with a hundred different specialized exception cases to support.

Comments?

pere3 commented 13 years ago

to be honest, there is not a problem at all, because if you know where your stuff like libelf and libiconv is - you'll compile it anyway i think maybe you can add some variable like LIBELF_PREFIX to ./configure string at gcc scripts, and explain this in readme for whom who has libelf outside of their /usr/local? as said, i had a same problem with iconv lib, so variable for iconv prefix needed too

ooPo commented 13 years ago

Perhaps I wasn't clear enough. The problem isn't that it is hard to manually specify where the software is located. That's very easy.

The problem is I don't see the benefit to adding exceptions and special cases for non-standard installations like your own. It adds a lot of extra maintenance time and sets a bad precedent.

Perhaps you can talk to Macports about installing into /usr/local instead? Or use a package manager like Brew that already does. Manually compile libelf yourself? Maybe GNU will change GCC to search more locations for the software it needs?

ooPo commented 13 years ago

Closing.