Problems installing i386-elf-gcc on Snow Leopard

View: New views
5 Messages — Rating Filter:   Alert me  

Problems installing i386-elf-gcc on Snow Leopard

by Björn Swift-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've been trying to get i386-elf-gcc working on my machine, without much luck.

1) i386-elf-binutils

Failed with:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-binutils/work/binutils-2.18.50.0.9/binutils/strings.c:100:8:

Fixed by editing string.c, as described in
http://thread.gmane.org/gmane.os.apple.macports.user/16155

2) i386-elf-gcc

Had to patch Make-lang.in, like
http://trac.macports.org/changeset/57794 does for lang/gcc43, and
update the Portfile, like http://trac.macports.org/changeset/59653
does for cross/i386-mingw32-gcc. I suppose these should be ported to
i386-elf-gcc, right? If so, I can provide patch were that to be of
interest.

After this, the compilation succeeded, but then I got the following error:

--->  Activating i386-elf-gcc @4.3.2_0
Error: Unable to execute port: Image error:
/opt/local/lib/x86_64/libiberty.a is being used by the active
i386-elf-binutils port.  Please deactivate this port first, or use
'port -f activate i386-elf-gcc' to force the activation.

I decided to force the activation, without really knowing the
consequences. That seemed to work.

I tried two gcc binaries (see below), both of which throw errors. One
can't find cc1 and the other crt0.o:

$ /opt/local/i386-elf/bin/gcc -o test-i386 test-i386.c
gcc: error trying to exec 'cc1': execvp: No such file or directory

$ /opt/local/bin/i386-elf-gcc-4.3.2 -o test-i386 test-i386.c
/opt/local/lib/gcc/i386-elf/4.3.2/../../../../i386-elf/bin/ld: crt0.o:
No such file: No such file or directory
collect2: ld returned 1 exit status

Does anyone have any ideas?

Thanks in advance,
Bjorn Swift
_______________________________________________
macports-users mailing list
macports-users@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Re: Problems installing i386-elf-gcc on Snow Leopard

by Joshua Root-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-10-27 04:41, Björn Swift wrote:

> I've been trying to get i386-elf-gcc working on my machine, without much luck.
>
> 1) i386-elf-binutils
>
> Failed with:
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-binutils/work/binutils-2.18.50.0.9/binutils/strings.c:100:8:
>
> Fixed by editing string.c, as described in
> http://thread.gmane.org/gmane.os.apple.macports.user/16155
>
> 2) i386-elf-gcc
>
> Had to patch Make-lang.in, like
> http://trac.macports.org/changeset/57794 does for lang/gcc43, and
> update the Portfile, like http://trac.macports.org/changeset/59653
> does for cross/i386-mingw32-gcc. I suppose these should be ported to
> i386-elf-gcc, right? If so, I can provide patch were that to be of
> interest.

I believe there are tickets for both of these in trac, which you should
be able to find by searching. Please attach your patches to them.

- Josh
_______________________________________________
macports-users mailing list
macports-users@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Re: Problems installing i386-elf-gcc on Snow Leopard

by Björn Swift-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Joshua

2009/10/26 Joshua Root <jmr@...>:
> I believe there are tickets for both of these in trac, which you should
> be able to find by searching. Please attach your patches to them.

Could you be referring to #20816 and #21194? Both of these are closed
and refer to ports other than i386-elf-gcc. Should I still attach
patches to those tickets, rather than opening a new ticket?

In any case, I'd prefer to get the compiler working before submitting
a patch - just in case anything else needs to be added to the patch.
Do you have any idea what could be causing the cc1 or crt0.o errors
described in my previous email?

Thanks for your time,
Björn Swift
_______________________________________________
macports-users mailing list
macports-users@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Re: Problems installing i386-elf-gcc on Snow Leopard

by Joshua Root-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-10-27 08:49, Björn Swift wrote:
> Hey Joshua
>
> 2009/10/26 Joshua Root <jmr@...>:
>> I believe there are tickets for both of these in trac, which you should
>> be able to find by searching. Please attach your patches to them.
>
> Could you be referring to #20816 and #21194? Both of these are closed
> and refer to ports other than i386-elf-gcc. Should I still attach
> patches to those tickets, rather than opening a new ticket?

The open tickets about these ports that I was thinking of are:
<http://trac.macports.org/ticket/21411> (looks like the one you want)
<http://trac.macports.org/ticket/18161>
<http://trac.macports.org/ticket/21706>
<http://trac.macports.org/ticket/21682> (looks like the other one)

I found these using the "Ticket Search" link that is on the left of
every trac page.

> In any case, I'd prefer to get the compiler working before submitting
> a patch - just in case anything else needs to be added to the patch.

Better a partial patch submitted than none. The maintainer may be able
to work out the rest of what needs to be done more easily once these
initial problems are taken care of.

> Do you have any idea what could be causing the cc1 or crt0.o errors
> described in my previous email?

No, sorry.

- Josh
_______________________________________________
macports-users mailing list
macports-users@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Re: Problems installing i386-elf-gcc on Snow Leopard

by Björn Swift-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/10/26 Joshua Root <jmr@...>:
> The open tickets about these ports that I was thinking of are:
> <http://trac.macports.org/ticket/21411> (looks like the one you want)
> <http://trac.macports.org/ticket/18161>
> <http://trac.macports.org/ticket/21706>
> <http://trac.macports.org/ticket/21682> (looks like the other one)

I've updated tickets #21411, #21706 and #21682 - #18161 seems to be
something else.

> I found these using the "Ticket Search" link that is on the left of
> every trac page.

Yes, sorry about that. I'd seen these before, but then somehow forgot
and .. hmm.

> Better a partial patch submitted than none. The maintainer may be able
> to work out the rest of what needs to be done more easily once these
> initial problems are taken care of.

Fair enough. As I used the patches from the previous changesets to
other ports unchanged, I referred to those changesets instead of copy
pasting the patch.

>> Do you have any idea what could be causing the cc1 or crt0.o errors
>> described in my previous email?
>
> No, sorry.

Alright, I'll keep my fingers crossed.

Thanks for your time,
Bjorn Swift
_______________________________________________
macports-users mailing list
macports-users@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users