Opened 13 years ago

Closed 9 years ago

#383 closed patch (fixed)

IZ2114: build failure (and solution) on fedora core 3 to 6 (any platform where /usr/bin/java exists)

Reported by: hintak Owned by:
Priority: normal Milestone:
Component: sge Version: 6.0u9
Severity: minor Keywords: Linux install
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=2114]

        Issue #:      2114             Platform:     All     Reporter: hintak (hintak)
       Component:     gridengine          OS:        Linux
     Subcomponent:    install          Version:      6.0u9      CC:    None defined
        Status:       NEW              Priority:     P3
      Resolution:                     Issue type:    PATCH
                                   Target milestone: ---
      Assigned to:    dom (dom)
      QA Contact:     dom
          URL:
       * Summary:     build failure (and solution) on fedora core 3 to 6 (any platform where /usr/bin/java exists)
   Status whiteboard:
      Attachments:
                      Date/filename:                                   Description:                                    Submitted by:
                      Tue Nov 21 09:04:00 -0700 2006: qmon-nojni.patch patch to exclude /usr as JAVA_HOME (text/plain) hintak

     Issue 2114 blocks:
   Votes for issue 2114:


   Opened: Fri Nov 17 06:43:00 -0700 2006 
------------------------


aimk calls aimk.site, which tries to work out JAVA_HOME from `which java`.
Unfortunately, from fedora core 3 onwards (and mandriva and
enterprise linux 4), and particularly on 64-bit platforms, there are gcj-based
package called java-gcj-compat java-gcj-compat-devel, which provides
a java implementation in /usr/bin/java .

This causes JAVA_HOME to be set to "/usr" from the logic in aimk.site,
which in turn, results in "-I${JAVA_HOME}/${JAVA_INCL}/${JAVA_ARCH}"
inside aimk to resolves to "-I/usr/include/linux". and /usr/include/linux
contains too many includes which are of the same names but different content
to /usr/include, thus resulting in catatrophic failure with
compilation, even on simple ones like "./aimk -only-core" or
"./aimk -only-qmon".

There are a few workarounds, like setting "JAVA_HOME=/nowhere" explicitly,
or explicitly append "-no-jni" in any of aimk's invocation.

suggest fix: test for JAVA_HOME != /usr .

This is the same issue as issue 2035, just with a lot more details:
http://gridengine.sunsource.net/issues/show_bug.cgi?id=2035

feel free to resolve as duplicate of issue 2035

gcj currently seems to be the only JNI implementation on 64-bit linux,
it is a shame that the grid engine gets really confused by it.

(unlike other bugzilla-based site, this site doesn't seem to allow
3rd party to offer advice/workaround/comments on existing bugs. The only option
seems to be attaching a patch - well, it is just going to be a one-liner in
aimk.site to make sure JAVA_HOME is not /usr ).

   ------- Additional comments from hintak Tue Nov 21 09:04:16 -0700 2006 -------
Created an attachment (id=89)
patch to exclude /usr as JAVA_HOME

   ------- Additional comments from hintak Tue Nov 21 09:05:50 -0700 2006 -------
change from defect to patch

Attachments (1)

89 (750 bytes) - added by dlove 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by dlove

comment:1 Changed 9 years ago by dlove

  • Resolution set to fixed
  • Severity set to minor
  • Status changed from new to closed

Should be fixed per #546.

Note: See TracTickets for help on using tickets.