Skip to content

alpine/musl link error #157

Closed
Closed

Description

@stopusingghpls

error when trying to install through pak::pak('r-lib/systemfonts') or cran

lto-wrapper: warning: using serial compilation of 5 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more information
/usr/include/fortify/stdio.h: In function '__to_xstring.constprop':
/usr/include/fortify/stdio.h:82:28: error: inlining failed in call to 'always_inline' 'vsnprintf': function body can be overwritten at link time
   82 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
      |                            ^
/usr/include/c++/15.2.0/ext/string_conversions.h:115:32: note: called from here
  115 |       const int __len = __convf(__s, __n, __fmt, __args);
      |                                ^
lto-wrapper: fatal error: c++ returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-alpine-linux-musl/15.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: error: lto-wrapper failed

Activity

  1. stopusingghpls commented on Sep 15, 2026

    @stopusingghpls
    Author

    Add this into your cat ~/.R/Makevars and it should work (link time optimizations off):

    CXXFLAGS = -O2 -pipe -fno-lto
    CFLAGS = -O2 -pipe -fno-lto
    FFLAGS = -O2 -pipe -fno-lto
    
  2. thomasp85 commented on Nov 10, 2026

    @thomasp85
    Member

    yes, this does not seem systemfonts specific

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions