rxtxSerial can build on ppc64 with two small patches attached Reproducible: Always Steps to Reproduce: 1.patch ebuild to add patches 2.emerge -av rxtx 3. Actual Results: builds and finds serial ports $ emerge --info rxtx Portage 2.1.11.31 (default/linux/powerpc/ppc64/10.0/64bit-userland/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.5.7-gentoo-sl ppc64) ================================================================= System Settings ================================================================= System uname: Linux-3.5.7-gentoo-sl-ppc64-PPC970FX,_altivec_supported-with-gentoo-2.1 Timestamp of tree: Tue, 29 Jan 2013 13:00:01 +0000 ld GNU ld (GNU Binutils) 2.22 app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.3-r2, 3.1.4-r3, 3.2.3 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.7.9-r2, 1.9.6-r3, 1.10.3, 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.4.5, 4.5.4, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.6 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo x-portage Installed sets: @sl-www-1, @sl-x11-1 ACCEPT_KEYWORDS="ppc64" ACCEPT_LICENSE="* -@EULA IBM-J1.6" CBUILD="powerpc64-unknown-linux-gnu" CFLAGS="-O2 -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec" CHOST="powerpc64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://mirror.mcs.anl.gov/pub/gentoo/ http://distfiles.gentoo.org/ http://www.ibiblio.org/pub/Linux/distributions/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/mnt/sdc5" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl afp alsa altivec appletalk audio berkdb branding bzip2 cairo caps cdda cdr cli colord consolekit cracklib crypt cups cxx dbus doc dri dtmf dts dvd dvdr eds emboss encode evo examples exif extensions fam ffmpeg fftw firefox flac fontconfig gconf gdbm gif gnome gnome-keyring gnome-online-accounts gnutls gpm graphite gstreamer gtk guile http ibm iconv ieee1394 imagemagick ios ipc ipv6 jpeg jpeg2k lcms ldap libnotify mad mng modules motif mp3 mp4 mpeg mudflap nautilus ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre pdf png policykit ppc64 ppds pulseaudio qt3support qt4 readline sdl session sip sipim socialweb spell sqlite sqlite3 ssl startup-notification stun svg tcl tcpd theora threads tiff truetype udev udisks unicode upower usb v4l v4l2 video vim vorbis wav wxwidgets xcb xine xml xv xvid zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="canon ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= dev-java/rxtx-2.1.7.2-r300 was built with the following: USE="doc -lfd -source"
Created attachment 337280 [details, diff] ebuild patch add epatch lines
Created attachment 337282 [details] sys/io.h patch There is no sys/io.h on ppc/ppc64 linux
Created attachment 337284 [details, diff] ttyPZ0 patch adds Zilog serial ports found on Apple G4 G5 hardware as /dev/ttyPZ{0,1}
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f6f16ac7353a21dbd8a526fd2b1fc1dac13f15f commit 5f6f16ac7353a21dbd8a526fd2b1fc1dac13f15f Author: matoro <matoro@users.noreply.github.com> AuthorDate: 2022-05-06 20:23:28 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-30 21:46:40 +0000 dev-java/rxtx: keyword 2.2_pre2-r2 for ~ppc64 This not only builds but works on ppc64. I tested this on my system with serial ports in use using the below program: $ cat Main.java import gnu.io.*; import java.util.*; public class Main { /** * @return A HashSet containing the CommPortIdentifier for all serial ports that are not currently being used. */ public static HashSet<CommPortIdentifier> getAvailableSerialPorts() { HashSet<CommPortIdentifier> h = new HashSet<CommPortIdentifier>(); Enumeration thePorts = CommPortIdentifier.getPortIdentifiers(); while (thePorts.hasMoreElements()) { CommPortIdentifier com = (CommPortIdentifier) thePorts.nextElement(); switch (com.getPortType()) { case CommPortIdentifier.PORT_SERIAL: try { CommPort thePort = com.open("CommUtil", 50); thePort.close(); h.add(com); } catch (PortInUseException e) { System.out.println("Port, " + com.getName() + ", is in use."); } catch (Exception e) { System.err.println("Failed to open port " + com.getName()); e.printStackTrace(); } } } return h; } public static void main(String[] args) { for (CommPortIdentifier element : getAvailableSerialPorts()) { System.out.println(element.getName()); } } } $ javac -cp /usr/share/rxtx-2/lib/RXTXcomm.jar Main.java $ java -Djava.library.path=/usr/lib64/rxtx-2 -cp .:/usr/share/rxtx-2/lib/RXTXcomm.jar Main /dev/ttyUSB0 /dev/ttyUSB1 Closes: https://bugs.gentoo.org/454608 Signed-off-by: matoro <matoro@users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/25356 Signed-off-by: Sam James <sam@gentoo.org> dev-java/rxtx/files/rxtx-2.1-7r2-ppcioh.diff | 16 ++++++++++++++++ dev-java/rxtx/files/rxtx-2.1-7r2-ttyPZ.diff | 20 ++++++++++++++++++++ dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild | 4 +++- 3 files changed, 39 insertions(+), 1 deletion(-)