Opened 16 years ago

Closed 14 years ago

#16043 closed defect (fixed)

gcc44 @20080718_0 No Java support

Reported by: macports@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: java gcj gcc Cc: ryandesign (Ryan Carsten Schmidt)
Port: gcc44

Description

I'm trying to get running with GCJ but can't seem to find a version that works with my Intel Mac running 10.4. So far I've tried gcj34 as well as gcc42, gcc43, gcc44-20080712, and gcc44-20080718. From checking the issues lists, it appears that GCC 4.2 should work for Intel; however I get

internal compiler error: in uses_jv_markobj_p, at java/boehm.c:245

trying to compile HelloWorld.java. I was able to Google one or two non-Mac occurrences of this but they didn't lead me to anything useful. The issues list seems to verify that I need to upgrade to 10.5 to run GCC4.3 with Java support so I didn't continue trying to get that version to work. The GCC4.4 port notes that some language front-ends are not yet supported but doesn't say which ones. Is Java supported yet? How can I help?

$ gcc-mp-4.4 DoIt.java 
gcc-mp-4.4: DoIt.java: Java compiler not installed on this system
$ type gcc-mp-4.4
gcc-mp-4.4 is hashed (/opt/local/bin/gcc-mp-4.4)

My installation was pretty simple although I've tried uninstalling/reinstalling a few times and only have 1 MacPorts version of GCC at a time (Apple's GCC is installed at the normal location):

[tmp/foo] > uninstall javatar pircbot gnu-classpathx-comm gnu-classpathx-activation
--->  Deactivating javatar 2.5_0
--->  Uninstalling javatar 2.5_0
--->  Deactivating pircbot 1.4.4_0
--->  Uninstalling pircbot 1.4.4_0
--->  Deactivating gnu-classpathx-comm 20050328_0
--->  Uninstalling gnu-classpathx-comm 20050328_0
--->  Deactivating gnu-classpathx-activation 1.1.1_0
--->  Uninstalling gnu-classpathx-activation 1.1.1_0
[tmp/foo] > uninstall gnu-classpath
--->  Deactivating gnu-classpath 0.93_0
--->  Uninstalling gnu-classpath 0.93_0
[tmp/foo] > install gcc44
--->  Fetching gmp
--->  Verifying checksum(s) for gmp
--->  Extracting gmp
--->  Configuring gmp
--->  Building gmp with target all
--->  Staging gmp into destroot
--->  Installing gmp 4.2.2_2
--->  Activating gmp 4.2.2_2
--->  Fetching mpfr
--->  Verifying checksum(s) for mpfr
--->  Extracting mpfr
--->  Configuring mpfr
--->  Building mpfr with target all
--->  Staging mpfr into destroot
--->  Installing mpfr 2.3.1_0+darwin_i386
--->  Activating mpfr 2.3.1_0+darwin_i386
--->  Fetching gcc44
--->  Verifying checksum(s) for gcc44
--->  Extracting gcc44
--->  Configuring gcc44
--->  Building gcc44 with target bootstrap
--->  Staging gcc44 into destroot
--->  Installing gcc44 4.4-20080718_0
--->  Activating gcc44 4.4-20080718_0

Change History (7)

comment:1 Changed 16 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:2 Changed 16 years ago by jmroot (Joshua Root)

Cc: macports@… removed
Milestone: MacPorts 1.6.1Port Bugs
Owner: changed from macports-tickets@… to mww@…

Assigning to maintainer.

comment:3 Changed 16 years ago by mww@…

Status: newassigned

The port clearly states: The GNU compiler collection, including front ends for C, C++, Objective-C and Objective-C++. This is a prerelease BETA version and does not have all available language front ends enabled.

The point is, that the Java stuff tends to

  • fail often to compile in the beta
  • take looooong time to build

Therefore I've omitted it from the beta (I'm only comitting snapshots that compile here on my machine, on 10.5/x86).

We could bring in Java support but then the updates will get sparse (as snapshots often fail to build Java); as I'm not into gcj perhaps someone else should then take over maintainership.
Plan B would be a java variant (like the gfortran variant) that enables Java -- of course without guarantee to build (for the beta).

comment:4 in reply to:  3 Changed 16 years ago by macports@…

Replying to mww@macports.org:

The port clearly states: The GNU compiler collection, including front ends for C, C++, Objective-C and Objective-C++. This is a prerelease BETA version and does not have all available language front ends enabled.

Absolutely, and I'm not complaining. I'm just trying to find a way to get GCJ working cleanly in my environment. It appears the 4.2 port is owned by somebody else and is the one I should be able to use, but it doesn't work as stated. I figured it would be better to ask about a port that is under active development.

The point is, that the Java stuff tends to

  • fail often to compile in the beta
  • take looooong time to build

I've noticed! It takes close to an hour to build a full GCC on my machine.

Therefore I've omitted it from the beta (I'm only comitting snapshots that compile here on my machine, on 10.5/x86).

We could bring in Java support but then the updates will get sparse (as snapshots often fail to build Java); as I'm not into gcj perhaps someone else should then take over maintainership.
Plan B would be a java variant (like the gfortran variant) that enables Java -- of course without guarantee to build (for the beta).

As a user, I think a Java variant would be great. I looked for one but couldn't find it; however, it would have saved me lots of time. For instance, the Java variant would have saved me 2 hours to discover that GCC 4.3 + GCJ + Intel only work on OS X 10.5 because port itself would have told me. As it was, I had to download, compile, get the problems, and surf Trac to find an issue that told me.

So I'd like to see how much work it is in general to get some of this stuff working and offer my assistance. If I'm going to get GCC 4.4 Java working on my system, I might as well share it as a variant for others. Is assisting you with a Java variant an option, should I wait because you'll have it soon, or should I just make things work privately from original sources?

comment:5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Replying to macports@…:

Absolutely, and I'm not complaining. I'm just trying to find a way to get GCJ working cleanly in my environment. It appears the 4.2 port is owned by somebody else and is the one I should be able to use, but it doesn't work as stated. I figured it would be better to ask about a port that is under active development.

Actually all the gcc ports are maintained by Markus, according to "port info".

Plan B would be a java variant (like the gfortran variant) that enables Java -- of course without guarantee to build (for the beta).

As a user, I think a Java variant would be great.

For the development version of gcc (currently the gcc44 port) a java variant would be ok, if as Markus says it frequently breaks. However I'd prefer no java variant for the stable gcc ports; keep java support on by default there. That way, installation of ports that require gcj (like pdftk) doesn't get more complicated (before: sudo port install pdftk +gcc42; after: sudo port install gcc42 +java && sudo port install pdftk +gcc42; if java were a variant, and someone didn't know that and/or forgot to first install gcc42 with the +java variant, and just installed pdftk, pdftk wouldn't be able to build because gcc42 would have been built as a dependency without java support, wasting an hour (Intel) or even a day (PowerPC) of the user's time).

I looked for one but couldn't find it; however, it would have saved me lots of time. For instance, the Java variant would have saved me 2 hours to discover that GCC 4.3 + GCJ + Intel only work on OS X 10.5 because port itself would have told me. As it was, I had to download, compile, get the problems, and surf Trac to find an issue that told me.

Until gcc43 was updated to 4.3.2 in r39663, it did not attempt to build java support on Mac OS X 10.4, so you should not have encountered an error. If you did, then that would be a bug in the gcc43 port. Or do you just mean that you were surprised that java support was absent from the gcc43 port? If so, then that surprise should no longer occur on PowerPC due to r39663 (unfortunately Java support for gcc43 cannot be built on Intel with Mac OS X 10.4; see #16409).

So I'd like to see how much work it is in general to get some of this stuff working and offer my assistance. If I'm going to get GCC 4.4 Java working on my system, I might as well share it as a variant for others. Is assisting you with a Java variant an option, should I wait because you'll have it soon, or should I just make things work privately from original sources?

Anyway, long story short, a java variant was added to the gcc44 port in r38947, so this ticket can be closed, can't it?

comment:6 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

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

Port: gcc44 added
Resolution: fixed
Status: assignedclosed
Summary: gcc-4.4@20080718_0 No Java supportgcc44 @20080718_0 No Java support
Note: See TracTickets for help on using tickets.