Bug 1333344

Summary: FTBFS on secondary arches
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: mpAssignee: Paulo Andrade <paulo.cesar.pereira.de.andrade>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anto.trande, paulo.cesar.pereira.de.andrade
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mp-3.1.0-2.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-14 23:31: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: 467765, 1071880    

Description Dan Horák 2016-05-05 10:35:03 UTC
I see 2 problems with recent mp on non-x86 arches in general

1. thirdparty/benchmark/src/cycleclock.h requiring a native implementation, which can be easily fixed with something like

diff -up mp-3.1.0/thirdparty/benchmark/src/cycleclock.h.secarch mp-3.1.0/thirdparty/benchmark/src/cycleclock.h
--- mp-3.1.0/thirdparty/benchmark/src/cycleclock.h.secarch      2016-05-05 11:36:28.000000000 +0200
+++ mp-3.1.0/thirdparty/benchmark/src/cycleclock.h      2016-05-05 11:45:38.000000000 +0200
@@ -136,7 +136,9 @@ inline BENCHMARK_ALWAYS_INLINE int64_t N
 // The soft failover to a generic implementation is automatic only for ARM.
 // For other platforms the developer is expected to make an attempt to create
 // a fast implementation and use generic version if nothing better is available.
-#error You need to define CycleTimer for your OS and CPU
+  struct timeval tv;
+  gettimeofday(&tv, nullptr);
+  return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
 #endif
 }
 }  // end namespace cycleclock

2. JNI detection when built with "jacop"

in solvers/jacop/CMakeLists.txt see 
  ...
  if (CMAKE_SIZEOF_VOID_P EQUAL 4)
    # Set CMAKE_SYSTEM_PROCESSOR to make sure FindJNI finds the correct
    # AWT and JVM libraries.
    set(CMAKE_SYSTEM_PROCESSOR i586)
  endif ()

which is simply wrong (and I suppose the reason for %ifnarch %{arm} aarch64 in the spec file)

Version-Release number of selected component (if applicable):
mp-3.1.0-1.fc25

Comment 1 Dan Horák 2016-05-05 12:10:50 UTC
both fixed with http://pkgs.fedoraproject.org/cgit/rpms/mp.git/commit/?id=10970618e300d24825061886f3aa1e41d02d1623

If there are no objection I'll submit builds in Rawhide and F-24.

Comment 2 Antonio T. (sagitter) 2016-05-05 13:19:32 UTC
No objection from me.
Thanks.

Comment 3 Fedora Update System 2016-05-05 16:02:26 UTC
mp-3.1.0-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-310bf36b11

Comment 4 Fedora Update System 2016-05-06 11:26:53 UTC
mp-3.1.0-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-310bf36b11

Comment 5 Fedora Update System 2016-05-14 23:31:27 UTC
mp-3.1.0-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.