-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hello,
pip install
will bug out with the following error for me:
[...]
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions │
-fcf-protection -fPIC -D_GNU_SOURCE -D_DEFAULT_SOURCE -Dlinux -DUNIX -D_GLIBCXX_USE_CXX11_ABI=1 -I/tmp/pip-build-env-03ykrg0g/overlay/lib64/python3.12/site-pa│
ckages/epicscorelibs/include -Isoftioc/iocStats/devIocStats -Isoftioc/iocStats/devIocStats/os/Linux -Isoftioc/iocStats/devIocStats/os/default -I/usr/include/p│
ython3.12 -c softioc/iocStats/devIocStats/devIocStatsSub.c -o build/temp.linux-x86_64-cpython-312/softioc/iocStats/devIocStats/devIocStatsSub.o -g0 -std=c99 │
softioc/iocStats/devIocStats/devIocStatsSub.c: In function ‘scanMonInit’: │
softioc/iocStats/devIocStats/devIocStatsSub.c:91:16: error: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration] │
91 | psub->dpvt = malloc(sizeof(epicsTimeStamp)); │
| ^~~~~~ │
softioc/iocStats/devIocStats/devIocStatsSub.c:26:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’ │
25 | #include "devIocStats.h" │
+++ |+#include <stdlib.h> │
26 | │
softioc/iocStats/devIocStats/devIocStatsSub.c:91:16: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mis│
match] │
91 | psub->dpvt = malloc(sizeof(epicsTimeStamp)); │
| ^~~~~~ │
softioc/iocStats/devIocStats/devIocStatsSub.c:91:16: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’ │
error: command '/usr/bin/gcc' failed with exit code 1
Essentially, gcc
is right: there's no <stdlib.h>
in devIocStatsSub.c
. I'm guessing it's a 14 year old upstream error of EPICS.
I don't know why it used to work until now, but it might have something to do with the fact that it's a gcc 14.1 environment?... Maybe something changed in the way the standard prototype is being interpreted (which I belive is int malloc()
, with ()
generally meaning "no arguments", but also being a valid replacement for "(...)" in the past -- maybe not anymore?)
Or it's because of Python 3.12.4, the one I'm using?
I'm running this on what most likely amounts to a clean install of Fedora 40. (Technically, it's a freshly created "Toolbox" on a recent "Fedora CoreOS"...) Here is the complete script to reproduce:
toolbox create
toolbox enter
sudo dnf install python3-pip python3-devel
sudo dnf group install "C Development Tools and Libraries"
pip install softioc
Cheers,
F.