Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#27891 closed defect (fixed)

openjdk6: Cannot install openjdk6 for the arch(s) 'powerpc'

Reported by: zoltan.orosz@… Owned by: landonf (Landon Fuller)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: powerpc Cc: ryandesign (Ryan Carsten Schmidt)
Port: openjdk6

Description

After trying to install OpenJDK on my PowerBook 12" I get the following error:

$ sudo port install openjdk6
Password:
Error: Cannot install openjdk6 for the arch(s) 'powerpc' because
Error: its dependency libiconv is only installed for the arch 'ppc'
Error: and the configured universal_archs 'i386 ppc' are not sufficient.
Error: Unable to execute port: architecture mismatch
To report a bug, see <http://guide.macports.org/#project.tickets>
$

Seems like there is a mismatch for the architecture, could you please correct it?

Change History (5)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Your macports.conf file incorrectly contains the line "build_arch powerpc"; there was a bug in the MacPorts installer that inserted this incorrect value into the macports.conf on PowerPC machines. The line should read "build_arch ppc"; just change that line in the file to fix the problem.

comment:2 Changed 14 years ago by zoltan.orosz@…

Thanks for the speedy answer. I changed the line to "build_arch ppc" (although it was commented out, I removed the # from the beginning of the line), did a port selfupdate but still getting the same problem. If you'd like, I can upload my macports.conf somewhere, but I did as you told and it still doesn't work :(

comment:3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: openjdk removed
Owner: changed from macports-tickets@… to landonf@…
Summary: Unable to install OpenJDK6 on PowerPCopenjdk6: Cannot install openjdk6 for the arch(s) 'powerpc'

I've now actually sat down at a Power Mac running Leopard, and I see you're correct: I see the same problem.

This problem was previously brought up on the mailing list, where fixing the build_arch in macports.conf was suggested (and there was no follow-up to indicate that didn't work), however that appears not to be the whole story.

The problem relates to the line in the portfile that reads "supported_archs i386 x86_64", which means the port is not expected to work on PowerPC systems. I'm not sure if that line is accurate, though, since further down in the portfile there is special-case code for the ppc architecture. Possibly the port will work on ppc, if this line is removed from the portfile (or changed to include the ppc architecture in the list).

Certainly, it is bizarre that, in the presence of that line, MacPorts doesn't produce a sensible error message to the effect that the port cannot be used on this architecture, but instead tries to build for an architecture that is not a valid architecture at all. That is a bug in MacPorts base that needs to be investigated.

comment:4 Changed 14 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Fixed, r74926. What's happening is that get_canonical_archs falls back to os.arch (mainly for labelling archives). Trunk has a better error message.

comment:5 in reply to:  4 Changed 14 years ago by zoltan.orosz@…

Replying to jmr@…:

Fixed, r74926. What's happening is that get_canonical_archs falls back to os.arch (mainly for labelling archives). Trunk has a better error message.

I fixed it the same way in my local portfile, but the build didn't succeed, because the openjdk6_bootstrap binaries are i386 only (I tried symlinking my system java files, but then it failed with complaints about trying to compile openjdk6 with java5). Should I open a new ticket for this or keep this one open?

Note: See TracTickets for help on using tickets.