Bug 1140146

Summary: k3d uses legacy syscall not supported on AArch64
Product: [Fedora] Fedora Reporter: Marcin Juszkiewicz <mjuszkie>
Component: k3dAssignee: Ralf Corsepius <rc040203>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: rc040203
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: k3d-0.8.0.2-30.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-11 10:28:00 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: 922257    
Attachments:
Description Flags
patch + spec changeset none

Description Marcin Juszkiewicz 2014-09-10 11:20:16 UTC
Created attachment 936107 [details]
patch + spec changeset

Description of problem:

k3d uses inotify_init legacy syscall which is not supported on AArch64

Version-Release number of selected component (if applicable):

0.8.0.2-29

How reproducible:

always

Steps to Reproduce:
1. build on aarch64

Actual results:

In file included from /builddir/build/BUILD/k3d-source-0.8.0.2/modules/inotify/file_change_notifier.cpp:25:0:
/builddir/build/BUILD/k3d-source-0.8.0.2/modules/inotify/inotify-cxx.h:36:34: fatal error: sys/inotify-syscalls.h: No such file or directory
 #include <sys/inotify-syscalls.h>
                                  ^
compilation terminated.

Expected results:

builds

Additional info:

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2653045 is failed build

Comment 1 Ralf Corsepius 2014-09-11 06:04:12 UTC
I am not sure what to do with this BZ and have some question on it.

1. AFAIS, none of the architectures fedora currently supports seems to provide a sys/inotify-syscalls.h header (Not even EPEL5).

Therefore I think, I could completely remove this #include <sys/inotfiy-syscall.h>, because backward compatibility not much of importance to Fedora.

Debian, however seems to carry a newer version of k3d than Fedora, whose origins are unknown to me. Could be a debian specific fork. 

They apply this patch, which is similar to what I wrote above:

diff -Naur k3d-source-0.8.0.2/modules/inotify/inotify-cxx.h k3d-0.8.0.3/modules/inotify/inotify-cxx.h
--- k3d-source-0.8.0.2/modules/inotify/inotify-cxx.h    2010-07-03 04:27:55.000000000 +0200
+++ k3d-0.8.0.3/modules/inotify/inotify-cxx.h   2013-07-22 00:29:39.000000000 +0200
@@ -27,15 +27,8 @@
 #include <deque>
 #include <map>
 
-// Please ensure that the following headers take the right place
-#include <sys/syscall.h>
 #include <sys/inotify.h>
 
-// Use this if syscalls not defined
-#ifndef __NR_inotify_init
-#include <sys/inotify-syscalls.h>
-#endif // __NR_inotify_init
-
 /// Event struct size
 #define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event))
 


2. aarch64 currently is not on the set of archs Fedora supports. 
Is it a secondary arch? How to (test-) build for them, say in koji, bodhi?

Comment 2 Marcin Juszkiewicz 2014-09-11 06:47:03 UTC
1. Debian patch is even better than mine.

2. AArch64 is secondary arch. You can do scratch builds against fc21 and rawhide using "arm-koji" command. We have http://arm.koji.fedoraproject.org/ service with several builders available.

Comment 3 Ralf Corsepius 2014-09-11 10:28:00 UTC
Debian patch applied to rawhide.

Arm scatch build did not fail:
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2657922

I going to push this to f21, also.

Comment 4 Fedora Update System 2014-09-11 13:36:42 UTC
k3d-0.8.0.2-30.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/k3d-0.8.0.2-30.fc21

Comment 5 Fedora Update System 2014-09-23 04:22:27 UTC
k3d-0.8.0.2-30.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.