Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935352 - games-emulation/pcsx2-1.7.5835 SPU2/defs.h:101:17: error: unknown type name 'FILE'
Summary: games-emulation/pcsx2-1.7.5835 SPU2/defs.h:101:17: error: unknown type name '...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: nE0sIghT
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-02 14:36 UTC by David Duchesne
Modified: 2024-07-02 15:55 UTC (History)
4 users (show)

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


Attachments
games-emulation_pcsx2-1.7.5835 build log (gcc12 / musl) (games-emulation_pcsx2-1.7.5913_20240702-142354.txt,591.48 KB, text/plain)
2024-07-02 14:36 UTC, David Duchesne
Details
pcsx2-1.7.5835-musl-header.patch (pcsx2-1.7.5835-musl-header.patch,247 bytes, patch)
2024-07-02 14:58 UTC, Ionen Wolkens
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Duchesne 2024-07-02 14:36:02 UTC
Hello,
games-emulation/pcsx2-1.7.5835 fails to build on my gentoo musl hardened system.
See log attached.

Reproducible: Always




Portage 3.0.63 (python 3.12.3-final-0, default/linux/amd64/23.0/split-usr/musl/hardened, gcc-12, musl-1.2.4-r1, 6.6.30-gentoo-hardened x86_64)
=================================================================
System uname: Linux-6.6.30-gentoo-hardened-x86_64-AMD_A10-6800K_APU_with_Radeon-tm-_HD_Graphics-with-libc
KiB Mem:    32351832 total,  15022668 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Tue, 02 Jul 2024 11:30:00 +0000
Head commit of repository gentoo: 058013d9998fdb77fdd7dba3451ce6e88624b8d3
Timestamp of repository localrepo: Mon, 01 Jul 2024 07:41:06 +0000
Timestamp of repository mv: Thu, 20 Jun 2024 07:33:59 +0000
Head commit of repository mv: ab284eb93675a067e4ea8582bca795deb20d5bde

Timestamp of repository vapoursynth: Tue, 25 Jun 2024 15:18:59 +0000
Head commit of repository vapoursynth: e29917b8900d40326add71bea11ad097c5d35db5

sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r6::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.11.9-r1::gentoo, 3.12.3-r1::gentoo
dev-lang/rust:             1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             12.3.1_p20240209::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.4-r1::gentoo
Repositories:

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

localrepo
    location: /var/db/repos/localrepo
    sync-type: rsync
    sync-uri: rsync://master.lan/localrepo
    masters: gentoo
    volatile: False
    sync-rsync-extra-opts: 

mv
    location: /var/db/repos/mv
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/mv.git
    masters: gentoo
    volatile: False

vapoursynth
    location: /var/db/repos/vapoursynth
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/vapoursynth.git
    masters: gentoo
    volatile: False

Installed sets: @dbuspkg, @fonts, @games, @librsvg, @localrepo, @localrepo_emu, @phone, @themes, @vm, @wm
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-musl"
CFLAGS="-march=bdver2 -O2 -pipe"
CHOST="x86_64-pc-linux-musl"
CONFIG_PROTECT="/etc /etc/portage/savedconfig/sys-kernel/linux-firmware /usr/bin/startx /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/thumbnailers/ffmpegthumbnailer.thumbnailer /usr/share/thumbnailers/imagemagick-pdf.thumbnailer"
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"
CXXFLAGS="-march=bdver2 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--usepkg --binpkg-respect-use=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-march=bdver2 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=bdver2 -O2 -pipe"
GENTOO_MIRRORS="https://mirror.leaseweb.com/gentoo/"
INSTALL_MASK="/etc/sysctl.d/               /etc/systemd/               /lib/systemd/               /usr/lib/sysctl.d/               /usr/lib/systemd/               /run/systemd/               -/lib/systemd/systemd-udevd"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en fr"
MAKEOPTS="-j5"
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"
SHELL="/bin/bash"
USE="X a52 aac acl acpi aio alsa amd64 btrfs bzip2 cairo cdda cdr cet cli crypt cryptsetup cups dbus device-mapper dri dts dvd elogind encode exif fam fftw flac gif gpm graphite gtk hardened iconv icu ipv6 jpeg libnotify libtirpc lto lvm lz4 lzo mad mp3 mp4 ncurses nfs nls ogg opengl openmp openssl opus pam pango pcre pdf pgo pic pie png policykit readline sdl seccomp sftp split-usr ssh ssl ssp startup-notification svg system-av1 system-binutils system-cairo system-clang system-cmark system-compress system-digest system-ffmpeg system-harfbuzz system-heimdal system-icu system-images system-jpeg system-jsoncpp system-lcms system-leveldb system-libevent system-libmspack system-libs system-libvpx system-libyaml system-llvm system-lua system-lz4 system-nss system-openjpeg system-pixman system-png system-renpy system-snappy system-sqlite system-tbb system-uulib system-vpx system-zlib test-rust tiff truetype udev udisks unicode upower usb vaapi vdpau verify-sig vorbis webp wxwidgets x264 xattr xcb xml xtpax xv xvid xxhash zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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" CPU_FLAGS_X86="aes avx f16c fma3 fma4 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="fr" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="aarch64 arm ppc ppc64 i386 x86_64" QEMU_USER_TARGETS="aarch64 arm armeb ppc ppc64 i386 x86_64" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="radeon r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 David Duchesne 2024-07-02 14:36:46 UTC
Created attachment 896803 [details]
games-emulation_pcsx2-1.7.5835 build log (gcc12 / musl)
Comment 2 David Duchesne 2024-07-02 14:38:58 UTC
While the previous reported bug (error: unknown type name 'cpu_set_t') : https://bugs.gentoo.org/935298 was fixed, a new bug appeared.
Comment 3 Ionen Wolkens gentoo-dev 2024-07-02 14:58:22 UTC
Created attachment 896806 [details, diff]
pcsx2-1.7.5835-musl-header.patch

Built fine for me, albeit it was ~testing llvm-musl (libcxx) and with clang18. So maybe it fails with one of clang17, libstdc++, or with hardened somehow while combined with musl.

No time to test right now but if I take a guess I think the attached patch would work. Would be helpful if you could try it so I won't have to setup an environment to reproduce later.
Comment 4 David Duchesne 2024-07-02 15:16:18 UTC
(In reply to Ionen Wolkens from comment #3)
> Created attachment 896806 [details, diff] [details, diff]
> pcsx2-1.7.5835-musl-header.patch
> 
> Built fine for me, albeit it was ~testing llvm-musl (libcxx) and with
> clang18. So maybe it fails with one of clang17, libstdc++, or with hardened
> somehow while combined with musl.
> 
> No time to test right now but if I take a guess I think the attached patch
> would work. Would be helpful if you could try it so I won't have to setup an
> environment to reproduce later.

oops, I pasted the wrong log (1.7.5913) instead of stable (1.7.5835); anyway both were failing with: error: unknown type name 'FILE'
I applied your patch on 1.7.5835 & 1.7.5913, now it builds fine, problem solved!
Thanks Ionen!
Comment 5 Ionen Wolkens gentoo-dev 2024-07-02 15:50:00 UTC
(In reply to David Duchesne from comment #4)
> I applied your patch on 1.7.5835 & 1.7.5913, now it builds fine, problem
> solved!
Thanks, guess I'll just go ahead and add it to the ebuilds then.
Comment 6 Larry the Git Cow gentoo-dev 2024-07-02 15:55:34 UTC
The bug has been closed via the following commit(s):

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

commit a977584dd98fc70320153189c12fdeb8e33ed432
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-07-02 15:52:24 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-07-02 15:52:30 +0000

    games-emulation/pcsx2: further fix build with musl
    
    Due to a missing header, likely only fails with some
    specific combination of clang+libstdc+musl or so.
    
    Closes: https://bugs.gentoo.org/935352
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 games-emulation/pcsx2/files/pcsx2-1.7.5835-musl-header.patch | 9 +++++++++
 games-emulation/pcsx2/pcsx2-1.7.5835.ebuild                  | 1 +
 games-emulation/pcsx2/pcsx2-1.7.5913.ebuild                  | 1 +
 games-emulation/pcsx2/pcsx2-9999.ebuild                      | 1 +
 4 files changed, 12 insertions(+)