Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953565 - app-misc/anki-25.02 Cannot find module @rollup/rollup-linux-x64-musl
Summary: app-misc/anki-25.02 Cannot find module @rollup/rollup-linux-x64-musl
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Lucio Sauer
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-04-12 03:50 UTC by ktoupt
Modified: 2025-05-04 06:08 UTC (History)
3 users (show)

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


Attachments
build.log (build.log.xz,58.81 KB, application/x-xz)
2025-04-12 03:50 UTC, ktoupt
Details
Proposed fix that switches to platform-agnostic node_modules (0001-app-misc-anki-switch-to-platform-agnotic-node_module.patch,3.20 KB, patch)
2025-04-26 11:09 UTC, Lucio Sauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ktoupt 2025-04-12 03:50:31 UTC
Created attachment 924417 [details]
build.log

The @rollup/rollup-linux-x64-musl node module seems to be missing.

Also, just curious, does the vendored @rollup/rollup-linux-x64-gnu work
on x86? "~x86" is listed in KEYWORDS.


[ebuild  N    ] app-misc/anki-25.02  USE="gui -debug -doc -test" PYTHON_SINGLE_TARGET="python3_12 -python3_11 -python3_13" 


Portage 3.0.67 (python 3.12.10-final-0, default/linux/amd64/23.0/musl/hardened, gcc-14, musl-1.2.5-r3, 6.14.2-gentoo-dist-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.14.2-gentoo-dist-hardened-x86_64-Intel-R-_Core-TM-_i7-8565U_CPU_@_1.80GHz-with-libc
KiB Mem:    16083560 total,   1897256 free
KiB Swap:   33554428 total,  33536512 free
Timestamp of repository gentoo: Fri, 11 Apr 2025 06:50:20 +0000
Head commit of repository gentoo: 543f29caed8f99da630df41f49330187a59adcee

Timestamp of repository guru: Thu, 10 Apr 2025 14:38:12 +0000
Head commit of repository guru: 972e41f943792af5ddf42a995eb27eb04b8a43a0

Timestamp of repository haskell: Thu, 10 Apr 2025 14:37:55 +0000
Head commit of repository haskell: dda278f55d24a1268785f87e0bea890e0c254df8

sh dash 0.5.12-r1
ld GNU ld (Gentoo 2.44 p1) 2.44.0
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.31.5::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.0::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0-r1::gentoo
dev-lang/python:           3.12.10::gentoo, 3.13.3::gentoo
dev-lang/rust:             1.86.0::gentoo
llvm-core/clang:           18.1.8-r6::gentoo, 19.1.7::gentoo
llvm-core/lld:             18.1.8::gentoo, 19.1.7::gentoo
llvm-core/llvm:            18.1.8-r6::gentoo, 19.1.7::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.56::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.12::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.5-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: true

cross-i686-w64-mingw32
    location: /var/db/repos/cross-i686-w64-mingw32
    masters: gentoo
    volatile: False

cross-x86_64-w64-mingw32
    location: /var/db/repos/cross-x86_64-w64-mingw32
    masters: gentoo
    volatile: False

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

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

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: rsync://hostname.localdomain/gentoo-x86-64_musl-hardened-binpkg

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-musl"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=x86-64 -mtune=generic"
CHOST="x86_64-pc-linux-musl"
CONFIG_PROTECT="/etc /usr/share/config /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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=x86-64 -mtune=generic"
DISTDIR="/var/cache/distfiles"
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="-O2 -pipe -fomit-frame-pointer -march=x86-64 -mtune=generic"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live clean-logs 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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -fomit-frame-pointer -march=x86-64 -mtune=generic"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--new-compress"
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"
RUSTFLAGS="-C opt-level=3"
SHELL="/bin/bash"
USE="X a52 aac acl alsa amd64 avif bash-completion blake2 bluetooth brotli bzip2 cdda cdr cet cjk cpudetection crypt cups dav1d dbus dist-kernel dri dts dvd dvdr dynamic egl encode eselect-ldso exif fdk ffmpeg flac gif gles1 gles2 gles3 hardened harfbuzz heif hip iconv ipv6 jit jpeg jpeg2k jpegxl lame libaom libass libtirpc lto lv2 lz4 lzip lzma lzo mad mng mp3 mp4 mpeg ncurses nls ogg opencl openexr opengl openh264 openmp opus orc pam pango pcre pgo pic pie pipewire png pulseaudio rav1e raw readline rocm screencast seccomp snappy ssl ssp svg svt-av1 test-rust theora tiff truetype udev unicode v4l vaapi vim-syntax vorbis vpx vulkan wavpack wayland webp wmf x264 x265 xattr xcb xft xpm xtpax xxhash zlib zstd" ABI_X86="64" ADA_TARGET="gcc_14" AMDGPU_TARGETS="gfx1031" 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="mmx mmxext sse sse2 aes pclmul popcnt rdrand sse3 sse4_1 sse4_2 ssse3" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="*" 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="postgres17" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu intel radeonsi" 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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Lucio Sauer 2025-04-26 11:09:56 UTC
Created attachment 926209 [details, diff]
Proposed fix that switches to platform-agnostic node_modules

Thanks for the bug report! 

(In reply to ktoupt from comment #0)
> Created attachment 924417 [details]
> build.log
> 
> The @rollup/rollup-linux-x64-musl node module seems to be missing.

Yep, I used to pre-generate a platform-specific (read amd64+glibc) node_modules. Sorry! I now switched to generate it using `yarn install --ignore-platforms` and I can confirm it builds successfully on amd64 with a musl profile.
Due to a build error for one of the runtime deps, I cannot verify that the musl build actually runs as expected. Could you apply my patch and report back?

> 
> Also, just curious, does the vendored @rollup/rollup-linux-x64-gnu work
> on x86? "~x86" is listed in KEYWORDS.

It's unlikely. Once my 32-bit chroot is up-to-date and I can confirm that the patched ebuild builds successfully, I'll open a PR.

Note:
The new node_modules.tar.xz quadruples the file size from 61.2MiB to 289.8 MiB.
I also considered shipping the cached sources instead of a pre-built node_modules, but that blows up the size elevenfold to 698.2MiB on top of losing the tests against the JS portion of Anki.
Comment 2 ktoupt 2025-04-27 01:47:18 UTC
(In reply to Lucio Sauer from comment #1)
> Due to a build error for one of the runtime deps, I cannot verify that
> the musl build actually runs as expected. Could you apply my patch and
> report back?

Hi. Thanks. Applying the patch makes Anki build on my system. I aslo
tried running it a bit and it seems okay.
Comment 3 Larry the Git Cow gentoo-dev 2025-04-29 19:45:19 UTC
The bug has been referenced in the following commit(s):

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

commit ca324d3ed46adadd49324b2b751f3ad9f7f265df
Author:     Lucio Sauer <watermanpaint@posteo.net>
AuthorDate: 2025-04-27 00:38:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-04-29 19:43:51 +0000

    app-misc/anki: add 25.02.4
    
    Bug: https://bugs.gentoo.org/953565
    Bug: https://bugs.gentoo.org/954770
    Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
    Part-of: https://github.com/gentoo/gentoo/pull/41783
    Closes: https://github.com/gentoo/gentoo/pull/41783
    Signed-off-by: Sam James <sam@gentoo.org>

 app-misc/anki/Manifest            |   3 +
 app-misc/anki/anki-25.02.4.ebuild | 312 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 315 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2025-05-04 06:08:06 UTC
The bug has been closed via the following commit(s):

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

commit a82fffe3bf6c9fc44b8c54102eaf5f0eed385e39
Author:     Lucio Sauer <watermanpaint@posteo.net>
AuthorDate: 2025-05-03 08:45:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-04 06:07:18 +0000

    app-misc/anki: drop 25.02
    
    Closes: https://bugs.gentoo.org/953565 (obsolete)
    Bug: https://bugs.gentoo.org/954770
    Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
    Part-of: https://github.com/gentoo/gentoo/pull/41898
    Signed-off-by: Sam James <sam@gentoo.org>

 app-misc/anki/Manifest          |   3 -
 app-misc/anki/anki-25.02.ebuild | 312 ----------------------------------------
 2 files changed, 315 deletions(-)