Bug 1252860

Summary: Fix compilation of rxtx on ppc64le: no sys/io.h
Product: [Fedora] Fedora Reporter: Rafael Fonseca <rdossant>
Component: rxtxAssignee: Levente Farkas <lfarkas>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan, lfarkas
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: rxtx-2.2-0.14.20100211.fc24.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-02 16:57:42 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: 1051573    
Attachments:
Description Flags
no io.h patch updated
none
Fix compilation on ppc64le none

Description Rafael Fonseca 2015-08-12 11:53:45 UTC
Created attachment 1061921 [details]
no io.h patch updated

Description of problem: rxtx build fails with

 gcc -I/builddir/build/BUILD/rxtx-20100211 -Ipowerpc64le-redhat-linux-gnu -I. -I/usr/lib/jvm/java/include -I/usr/lib/jvm/java/include/./linux/ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mcpu=power7 -mtune=power8 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /builddir/build/BUILD/rxtx-20100211/./src/RawImp.c  -fPIC -DPIC -o /builddir/build/BUILD/rxtx-20100211/powerpc64le-redhat-linux-gnu/.libs/RawImp.o
In file included from /usr/include/stdio.h:27:0,
                 from /usr/lib/jvm/java/include/jni.h:39,
                 from ./gnu_io_Raw.h:2,
                 from /builddir/build/BUILD/rxtx-20100211/./src/RawImp.c:70:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^
/builddir/build/BUILD/rxtx-20100211/./src/RawImp.c:106:20: fatal error: sys/io.h: No such file or directory
compilation terminated.
libtool: link: `/builddir/build/BUILD/rxtx-20100211/powerpc64le-redhat-linux-gnu/RawImp.lo' is not a valid libtool object
Makefile:592: recipe for target 'powerpc64le-redhat-linux-gnu/librxtxRaw.la' failed
make: *** [powerpc64le-redhat-linux-gnu/librxtxRaw.la] Error 1


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


How reproducible: build rxtx on ppc64le


Additional info: According to this page [1], the right variable to use is "__PPC__" not "PPC". Patch attached.

[1] http://sourceforge.net/p/predef/wiki/Architectures/

Comment 1 Rafael Fonseca 2015-09-02 16:28:55 UTC
Created attachment 1069520 [details]
Fix compilation on ppc64le

Complete patch with spec file changes.