Bug 194419 - java.io.ProcessBuilder not working in java/openjdk8 on i386
Summary: java.io.ProcessBuilder not working in java/openjdk8 on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-java (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-17 14:58 UTC by Jimmy Kelley
Modified: 2014-10-30 16:32 UTC (History)
1 user (show)

See Also:
ljboiler: maintainer-feedback? (java)


Attachments
Fix platform-specific macros. (1.57 KB, patch)
2014-10-29 17:12 UTC, Jung-uk Kim
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy Kelley 2014-10-17 14:58:43 UTC
The java.io.ProcessBuilder bug has reappeared (BUG 188980), but this time it's affecting the openjdk8 port, and for some strange reason it's only showing up in the i386 architecture version.

I found this while working on updating the Eclipse port to the latest version and building it on my Pourdriere machine.  I get the same error on FreeBSD 8.4, 9.3, and 10.0.

See BUG 188980 for a simple Java program that duplicates the problem.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-10-17 14:58:43 UTC
Auto-assigned to maintainer java@FreeBSD.org
Comment 2 Jimmy Kelley 2014-10-29 12:29:07 UTC
I've tracked the cause of the problem down to the fact that the os.arch system property ( System.getProperty("os.arch") ) that used to return 'i386' on the 32-bit FreeBSD platforms is now returning 'x86'; this causes the ProcessBuilder to fail when it's looking for the process spawner helper in the {java.home}/lib/{os.arch} directory because the installation is putting the arch-specific native stuff in a 'i386' directory.
Comment 3 Jung-uk Kim freebsd_committer freebsd_triage 2014-10-29 17:12:03 UTC
Created attachment 148769 [details]
Fix platform-specific macros.
Comment 4 Jung-uk Kim freebsd_committer freebsd_triage 2014-10-29 17:13:07 UTC
(In reply to Jimmy Kelley from comment #2)
> I've tracked the cause of the problem down to the fact that the os.arch
> system property ( System.getProperty("os.arch") ) that used to return 'i386'
> on the 32-bit FreeBSD platforms is now returning 'x86'; this causes the
> ProcessBuilder to fail when it's looking for the process spawner helper in
> the {java.home}/lib/{os.arch} directory because the installation is putting
> the arch-specific native stuff in a 'i386' directory.

Good catch!  Please try the attached patch.
Comment 5 Jimmy Kelley 2014-10-30 11:55:28 UTC
(In reply to Jung-uk Kim from comment #4)
> (In reply to Jimmy Kelley from comment #2)
> > I've tracked the cause of the problem down to the fact that the os.arch
> > system property ( System.getProperty("os.arch") ) that used to return 'i386'
> > on the 32-bit FreeBSD platforms is now returning 'x86'; this causes the
> > ProcessBuilder to fail when it's looking for the process spawner helper in
> > the {java.home}/lib/{os.arch} directory because the installation is putting
> > the arch-specific native stuff in a 'i386' directory.
> 
> Good catch!  Please try the attached patch.

Works great!  I even have the Eclipse upgrade I've been working on successfully built and running with it.

Thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2014-10-30 16:31:34 UTC
A commit references this bug:

Author: jkim
Date: Thu Oct 30 16:30:37 UTC 2014
New revision: 371759
URL: https://svnweb.freebsd.org/changeset/ports/371759

Log:
  Merge Linux-specific changes to BSD patches.  Most importantly, this change
  corrects 'os.arch' property for i386 to fix regressions.

  PR:		194419

Changes:
  head/java/openjdk8/Makefile
  head/java/openjdk8/files/patch-bsd
  head/java/openjdk8-jre/Makefile