Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827215 - dev-java/jffi-1.3.6: fails to compile on ppc64 (error: "FFI_TYPE_LAST" is not defined, evaluates to 0), possible bug in dev-libs/libffi?
Summary: dev-java/jffi-1.3.6: fails to compile on ppc64 (error: "FFI_TYPE_LAST" is not...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL: https://github.com/jnr/jffi/issues/107
Whiteboard:
Keywords: PullRequest, UPSTREAM
Depends on:
Blocks: tc-directly 825494
  Show dependency tree
 
Reported: 2021-11-25 02:14 UTC by Sam James
Modified: 2022-07-25 00:28 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_827215.txt,8.71 KB, text/plain)
2021-11-25 02:14 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-25 02:14:38 UTC
Created attachment 756139 [details]
build.log

Seems to be callign CC directly too?
----
cc -O2 -pipe -frecord-gcc-switches -fdiagnostics-show-option -fdiagnostics-color=always -O2 -fno-omit-frame-pointer -fno-strict-aliasing -DNDEBUG -Wundef -Werror -W -Wall -Wno-unused -Wno-parentheses -Wno-unused-parameter -I"build/jni" -I"build/jni"/jni -Ijni -I"jni/jffi" -fPIC -I"/opt/icedtea-bin-3.16.0/include" -I"/opt/icedtea-bin-3.16.0/include/linux" -I/usr/lib64/libffi/include  -D_REENTRANT -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -pthread -c jni/jffi/Exception.c -o build/jni/jffi/Exception.o
In file included from /usr/lib64/libffi/include/ffi.h:58,
                 from jni/jffi/CallContext.c:44:
/usr/lib64/libffi/include/ffitarget.h:161:7: error: "FFI_TYPE_LAST" is not defined, evaluates to 0 [-Werror=undef[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wundef]]
  161 | #if !(FFI_TYPE_LAST == FFI_PPC_TYPE_LAST                \
      |       ^~~~~~~~~~~~~
/usr/lib64/libffi/include/ffitarget.h:154:27: error: "FFI_TYPE_POINTER" is not defined, evaluates to 0 [-Werror=undef[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wundef]]
  154 | #define FFI_PPC_TYPE_LAST FFI_TYPE_POINTER
      |                           ^~~~~~~~~~~~~~~~
----
# emerge --info
Portage 3.0.28 (python 3.9.8-final-0, default/linux/ppc64/17.0, gcc-11.2.0, glibc-2.33-r7, 5.10.78-gentoo-dist-hardened ppc64)
=================================================================
System uname: Linux-5.10.78-gentoo-dist-hardened-ppc64-POWER9_-architected-,_altivec_supported-with-glibc2.33
KiB Mem:    32931440 total,   9382616 free
KiB Swap:   67108860 total,  66091588 free
Timestamp of repository gentoo: Thu, 25 Nov 2021 01:21:28 +0000
sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0-r3::gentoo
dev-lang/python:          3.9.8::gentoo
dev-lang/rust-bin:        1.56.1::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/openrc:          0.44.8::gentoo
sys-apps/sandbox:         2.25::gentoo
sys-devel/autoconf:       2.71-r1::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="ppc64"
ACCEPT_LICENSE="@FREE"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -frecord-gcc-switches -fdiagnostics-show-option -fdiagnostics-color=always"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 -frecord-gcc-switches -fdiagnostics-show-option -fdiagnostics-color=always"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --ask-enter-invalid --jobs=4 --load-average 10 --quiet-build --keep-going --with-bdeps=y --complete-graph --deep"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -frecord-gcc-switches -fdiagnostics-show-option -fdiagnostics-color=always"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -frecord-gcc-switches -fdiagnostics-show-option -fdiagnostics-color=always"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
MAKEOPTS="-j12 -l10"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl big-endian bzip2 cli crypt dbus dri elogind fortran gdbm ibm iconv ipv6 libglvnd ncurses nls nptl openmp pam pcre ppc64 readline seccomp split-usr ssl unicode xattr zlib" ABI_PPC="64" ADA_TARGET="gnat_2019" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev mga nv r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-25 02:23:54 UTC
Keeping toolchain@ CCed as it may be a bug in libffi as per linked bug report.
Comment 2 Larry the Git Cow gentoo-dev 2021-11-28 19:02:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=705038948d6655a23cfc0ea7ec0abc57dad1a850

commit 705038948d6655a23cfc0ea7ec0abc57dad1a850
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-11-28 19:00:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-11-28 19:02:06 +0000

    dev-java/jnr-ffi: keep 2.0.2-r1 only for ppc64
    
    Bug: https://bugs.gentoo.org/827215
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-java/jnr-ffi/jnr-ffi-2.0.2-r1.ebuild |  2 +-
 dev-java/jnr-ffi/jnr-ffi-2.0.2.ebuild    | 60 --------------------------------
 2 files changed, 1 insertion(+), 61 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a5725d2a8405427ede129c720ac18bf3cb1f0fb

commit 2a5725d2a8405427ede129c720ac18bf3cb1f0fb
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2021-11-28 10:03:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-11-28 19:02:05 +0000

    dev-java/jnr-ffi: restrict 2.0.2-r1 to jffi-1.2.9
    
    Bug: https://bugs.gentoo.org/827215
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/23097
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-java/jnr-ffi/jnr-ffi-2.0.2-r1.ebuild | 61 ++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10579138b9895a51dfaad4d6b6bccb5908045ee0

commit 10579138b9895a51dfaad4d6b6bccb5908045ee0
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2021-11-28 09:45:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-11-28 19:02:04 +0000

    dev-java/jnr-ffi: undo 2.0.2 removal
    
    Bug: https://bugs.gentoo.org/827215
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-java/jnr-ffi/Manifest                          |   1 +
 dev-java/jnr-ffi/files/jnr-ffi-2.0.2-junit48.patch |  11 +
 dev-java/jnr-ffi/files/jnr-ffi_maven-build.xml     | 250 +++++++++++++++++++++
 dev-java/jnr-ffi/jnr-ffi-2.0.2.ebuild              |  60 +++++
 4 files changed, 322 insertions(+)
Comment 3 matoro archtester 2022-06-27 03:27:31 UTC
At least by my testing, simply moving the definitions fixes it.  libffi test suite passes, jffi test suite passes.  Submitted to libffi in https://github.com/libffi/libffi/pull/722, I'll wait and see what they have to say about it.
Comment 4 Larry the Git Cow gentoo-dev 2022-07-23 19:43:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cf34d9161de963a4cb6db7501799490c7cf5d31

commit 5cf34d9161de963a4cb6db7501799490c7cf5d31
Author:     matoro <matoro@users.noreply.github.com>
AuthorDate: 2022-07-22 23:13:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-23 19:43:13 +0000

    dev-libs/libffi: revbump 3.4.2-r2, fix ppc64 header defs (backport)
    
    Backports https://github.com/libffi/libffi/pull/722.
    
    Bug: https://github.com/jnr/jffi/issues/107
    Closes: https://bugs.gentoo.org/827215
    Closes: https://github.com/gentoo/gentoo/pull/26529
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/libffi-3.4.2-backport-pr-722.patch       | 88 ++++++++++++++++++++++
 dev-libs/libffi/libffi-3.4.2-r2.ebuild             | 80 ++++++++++++++++++++
 2 files changed, 168 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2022-07-25 00:28:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32a4721f0f3891663540ad831c3c6923cafed8c4

commit 32a4721f0f3891663540ad831c3c6923cafed8c4
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2022-07-24 15:46:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-25 00:27:51 +0000

    dev-java/jffi: depend on >=dev-libs/libffi-3.4.2-r2
    
    3.4.2-r1 was causing issues on PPC64.
    
    Bug: https://bugs.gentoo.org/827215
    Bug: https://github.com/jnr/jffi/issues/107
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/26568
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-java/jffi/jffi-1.3.9-r1.ebuild | 99 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)