[schilytools] Fail to build on Alpine Linux on a Raspberry 5 ( aarch64 )
Dennis Clarke
dclarke at blastwave.org
Wed Apr 30 15:21:05 CEST 2025
Just a strange message I see today and I have no clue why that would
happen. Has to be an Alpine Linux MUSL LibC weirdness :
==> COMPILING "OBJ/aarch64-linux-gcc/snprintf.o"
In file included from /usr/include/fortify/unistd.h:26,
from ../include/schily/unistd.h:45,
from snprintf.c:21:
/usr/include/fortify/stdio.h:114:1: error: 'snprintf' undeclared here
(not in a function)
114 | _FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n,
| ^~~~~~~~~~~
In file included from ../include/schily/stdio.h:39,
from snprintf.c:22:
/usr/include/fortify/stdio.h:24:1: note: 'snprintf' is defined in header
'<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
23 | #include_next <stdio.h>
+++ |+#include <stdio.h>
24 |
/usr/include/fortify/stdio.h: In function 'snprintf':
/usr/include/fortify/stdio.h:122:16: error: called object
'__orig_snprintf' is not a function or function pointer
122 | return __orig_snprintf(__s, __n, __f,
__builtin_va_arg_pack());
| ^~~~~~~~~~~~~~~
/usr/include/fortify/stdio.h:114:1: note: declared here
114 | _FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n,
| ^~~~~~~~~~~
/usr/include/fortify/stdio.h: In function 'sprintf':
/usr/include/fortify/stdio.h:131:23: error: called object
'__orig_snprintf' is not a function or function pointer
131 | __r = __orig_snprintf(__s, __b, __f,
__builtin_va_arg_pack());
| ^~~~~~~~~~~~~~~
/usr/include/fortify/stdio.h:114:1: note: declared here
114 | _FORTIFY_FN(snprintf) int snprintf(char *__s, size_t __n,
| ^~~~~~~~~~~
smake: *** Code 1 (Operation not permitted) from command line for target
'OBJ/aarch64-linux-gcc/snprintf.o'.
smake: The following command caused the error:
echo " ==> COMPILING \"OBJ/aarch64-linux-gcc/snprintf.o\""; gcc -O
-DSCHILY_BUILD -IOBJ/aarch64-linux-gcc -I../incs/aarch64-linux-gcc
-I../include -Istdio -DUSE_SCANSTACK -DPORT_ONLY
-DNO_GETLINE_COMPAT -D_GNU_SOURCE -c -o
OBJ/aarch64-linux-gcc/snprintf.o snprintf.c
smake: Couldn't make 'all'.
smake: Leaving '/root/schily-2024-03-21/./psmake/smake'[2] from
directory '/root/schily-2024-03-21/libschily'
smake: Default commandline target: 'all'
smake: Doing exit(1)
smake: *** Code 1 (Operation not permitted) from command line for target
'all'.
smake: The following command caused the error:
for MK in libschily.mk libschily_p.mk noshlschily.mk ;
\
do \
( \
if [ -r ./$MK ] ; then \
echo " ==> MAKING \"all\" ON SUBCOMPONENT
\"SRCROOT/libschily/$MK\""; "/root/schily-2024-03-21/./psmake/smake" -f
$MK XARCH=aarch64-linux-gcc all;\
else \
echo "NOTICE: Partial source
(SRCROOT/libschily/$MK) missing";\
fi \
); \
done
smake: Couldn't make 'all'.
smake: Leaving '/root/schily-2024-03-21/./psmake/smake'[1] from
directory '/root/schily-2024-03-21/libschily'
smake: Default commandline target: 'all'
smake: Doing exit(1)
smake: *** Code 1 (Operation not permitted) from command line for target
'all'.
smake: The following command caused the error:
list=""; \
if [ -d TARGETS -a -f TARGETS/__slot ]; then
\
list=`echo TARGETS/[0123456789][0123456789]* |
\
sed -e 's;TARGETS/[0123456789][0123456789];;g'
| sed -e 's;!@!;/;g'`;\
fi;
\
for DIR in ${list} ;
\
do
\
(
\
echo " ==> MAKING \"all\" ON SUBDIRECTORY
\"SRCROOT/$DIR\"";\
if [ -d ./$DIR -a -r ./$DIR/Makefile ] ; then
\
cd ./$DIR &&
"/root/schily-2024-03-21/./psmake/smake" XARCH=aarch64-linux-gcc
DIRNAME=SRCROOT/$DIR all; \
else
\
echo "NOTICE: Partial source (SRCROOT/$DIR)
missing";\
fi
\
);
\
done
smake: Couldn't make 'all'.
Command exited with non-zero status 1
Yep.
hermes#
hermes# uname -a
Linux hermes.bw.genunix.com 6.12.13-0-rpi #1-Alpine SMP PREEMPT Thu Feb
13 22:15:47 UTC 2025 aarch64 Linux
hermes#
hermes# cat /proc/version
Linux version 6.12.13-0-rpi (buildozer at build-3-21-aarch64) (gcc (Alpine
14.2.0) 14.2.0, GNU ld (GNU Binutils) 2.43.1) #1-Alpine SMP PREEMPT Thu
Feb 13 22:15:47 UTC 2025
hermes#
hermes# gcc --version
gcc (Alpine 14.2.0) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
hermes#
hermes# ldd --version
musl libc (aarch64)
Version 1.2.5
Dynamic Program Loader
Usage: /lib/ld-musl-aarch64.so.1 [options] [--] pathname
hermes#
Weird.
--
--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
More information about the schilytools
mailing list