Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Rakefile: closure_compile force 32bit mode only when java supports it #1719

Closed
wants to merge 1 commit into from
Closed

Conversation

imrehg
Copy link
Contributor

@imrehg imrehg commented Dec 18, 2012

Some Java installs don't have '-d32' flag (e.g. OpenJDK which is standard
for some Linux systems), and the closure_compile fails because of forcing
that flag. Test, and only run in faster 32bit mode if supported, or
else just run with no flag (default mode).

Some Java installs don't have '-d32' flag (e.g. OpenJDK which is standard
for some Linux systems), and the closure_compile fails because of forcing
that flag. Test, and only run in faster 32bit mode if supported, or
else just run with no flag (default mode).
@pkozlowski-opensource
Copy link
Member

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).

CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form):
http://code.google.com/legal/individual-cla-v1.0.html

For corporations (print, sign and scan+email, fax or mail):
http://code.google.com/legal/corporate-cla-v1.0.html

@imrehg
Copy link
Contributor Author

imrehg commented Dec 31, 2012

Okay, signed it. :)

@imrehg
Copy link
Contributor Author

imrehg commented Jan 12, 2013

Hi, any update on this one?

@geddski
Copy link
Contributor

geddski commented Jan 16, 2013

@imrehg the build is about to be switched over to Grunt in #1544, so we'll want to add this after that.

@imrehg
Copy link
Contributor Author

imrehg commented Jan 16, 2013

Okay, makes sense :) I'll keep an eye out for #1544 ...

@petebacondarwin
Copy link
Contributor

@imrehg : I can't get this to work. The java command line does not return a fail code.

@imrehg
Copy link
Contributor Author

imrehg commented Jan 16, 2013

@petebacondarwin what's your system and java version?

@petebacondarwin
Copy link
Contributor

Windows 7 SP1 - 64bit
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

But you can also see it failing on Travis:
https://travis-ci.org/angular/angular.js/builds/4183531/#L494
and this is using

32-bit Ubuntu Linux 12.04 (server edition) [according to their docs].
java version "1.7.0_09" [according to my tests]
OpenJDK Runtime Environment (IcedTea7 2.3.3) (7u9-2.3.3-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

On 16 January 2013 13:29, Gergely Imreh [email protected] wrote:

@petebacondarwin https://github.com/petebacondarwin what's your system
and java version?


Reply to this email directly or view it on GitHubhttps://github.com//pull/1719#issuecomment-12318338.

@imrehg
Copy link
Contributor Author

imrehg commented Jan 16, 2013

Weird, the previous build has passed: https://travis-ci.org/angular/angular.js/builds/3713996 and I have tested it on Windows 7 SP1 - 64-bit, though at the original submission I think it was 1.7.0_9 or _10, so it feels maybe things have changed since this patch was submitted?

Will double-check these in a bit, I have access to Windows only elsewhere.
On ArchLinux 64Bit it works for me just fine (tested it right now) with pretty much the same environment.

java version "1.7.0_09"
OpenJDK Runtime Environment (IcedTea7 2.3.4) (ArchLinux build 7.u9_2.3.4-1-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

@IgorMinar
Copy link
Contributor

this should do the trick:

d32Supported = `java -version -d32 2>&1`.match(/Error/i) == nil

@IgorMinar
Copy link
Contributor

I made some changes to your commit and landed it as 3c8583e

thanks!

@IgorMinar IgorMinar closed this Jan 17, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants