Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 842795

Summary: pki-core is FTBFS on ARM
Product: [Fedora] Fedora Reporter: Peter Robinson <pbrobinson>
Component: pki-coreAssignee: Matthew Harmsen <mharmsen>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: alee, awnuk, dennis, dpal, edewata, fenlason, gwync, kwright, mharmsen, nkinder
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-25 15:29:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 245418    

Description Peter Robinson 2012-07-24 15:48:11 UTC
pki-core doesn't build on ARM. All releases to date up to 0.9.21.

rawhide failure: http://arm.koji.fedoraproject.org/koji/buildinfo?buildID=81438

All failures:
http://arm.koji.fedoraproject.org/koji/packageinfo?packageID=12446

Comment 1 Gwyn Ciesla 2012-09-20 14:11:40 UTC
Also FTBFS on primary, currently.

Comment 2 Peter Robinson 2012-10-04 06:43:45 UTC
It's still failing on ARM with pki-core-10.0.0-0.37.a2.fc18

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1167730

It looks to be dependency related. Possible primary arch is getting a dependency pulled in by some other means that doesn't on ARM.

Relevant snippet looks to be:

-- Found Java: /usr/bin/java (found version "10.0.0-0.37.a2.fc18") 
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
  Could NOT find JNI (missing: JNI_LIBRARIES JAVA_AWT_LIBRARY
  JAVA_JVM_LIBRARY) (found version "10.0.0-0.37.a2.fc18")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindJNI.cmake:252 (find_package_handle_standard_args)
  CMakeLists.txt:101 (find_package)
-- Configuring incomplete, errors occurred!

Comment 3 Peter Robinson 2012-10-09 14:27:58 UTC
any update?

Comment 4 Dmitri Pal 2012-10-09 23:46:44 UTC
How urgent is this?

Comment 5 Peter Robinson 2012-10-10 05:09:35 UTC
(In reply to comment #4)
> How urgent is this?

I would like the fix to make it into F-18 final so relatively. It was reported back in July

Comment 6 Peter Robinson 2012-11-07 16:29:35 UTC
Is there a status update on this?

Comment 7 Nathan Kinder 2012-11-07 19:41:49 UTC
This looks like aproblem with CMake determining the proper libpath for Java.  I think we need to add something like this to pki/cmake/Modules/FindJNI.cmake:

--------------------------------------------------
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
        SET(_java_libarch "arm")
--------------------------------------------------

There are currently conditions for i*86, x86_64, ppc, ppc64, and sparc.  We have nothing there for ARM.

Comment 8 Peter Robinson 2012-11-07 20:13:31 UTC
I remember we had an issue with JNI on another package. I think this is the commit they used to fix it.

http://pkgs.fedoraproject.org/cgit/libgda.git/commit/?id=366f5154a6a68be7d3ea967779b22a82ccf43d32

Comment 9 Nathan Kinder 2012-11-07 21:53:18 UTC
Upstream ticket:
https://fedorahosted.org/pki/ticket/402

Comment 10 Matthew Harmsen 2012-11-07 22:21:53 UTC
Applied the following patch:

    diff --git a/cmake/Modules/FindJNI.cmake b/cmake/Modules/FindJNI.cmake
    index a7da5b1..953dc85 100644
    --- a/cmake/Modules/FindJNI.cmake
    +++ b/cmake/Modules/FindJNI.cmake
    @@ -40,6 +40,8 @@ macro(JAVA_APPEND_LIBRARY_DIRECTORIES _var)
                 set(_java_libarch "ppc" "powerpc" "ppc64")
             elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
                 set(_java_libarch "sparc" "sparcv9")
    +        elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
    +            set(_java_libarch "arm")
             else (CMAKE_SYSTEM_PROCESSOR MATCHES "^i[3-9]86$")
                 set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}")
             endif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i[3-9]86$")

An SRPM for F19 was constructed and submitted to Koji as a scratch build where it successfully built.

Committed to Dogtag 'master':

    * 906acfd2c82d195a7c55a2af7c4d7abe8ed2655a

Comment 11 Matthew Harmsen 2012-11-07 22:24:26 UTC
An official build of 'Milestone: 10.0.0-0.X.rc1' is scheduled for November 16, 2012, which should pick up this change.

Comment 12 Jay Fenlason 2012-11-09 16:41:26 UTC
Note that even when FindJNI.cmake is patched as above, pki-core won't actually work on arm because its code is littered with "if arch == i386
... else if arch == x86_64 ... else boom".  This prevents freeipa-sever from working on arm.

Comment 13 Peter Robinson 2012-11-25 15:29:29 UTC
Builds on F-18. Likely needs more in depth testing.