You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run nix build github:nixos/nixpkgs/cd286b21e4acb0d10ba8e8d190abeaebbc59ab1d#super-slicer-latest -L
Build log
....
super-slicer> In file included from /build/source/src/jpeg-compressor/jpge.cpp:937:
super-slicer> In file included from /nix/store/n15bxkd7id2gvlwpihm4kp675aqkrwmj-glibc-2.40-36-dev/include/stdio.h:970:
super-slicer> /nix/store/n15bxkd7id2gvlwpihm4kp675aqkrwmj-glibc-2.40-36-dev/include/bits/stdio2.h:128:13: error: use of undeclared identifier '__builtin___vfprintf_chk'; did you mean '__builtin___sprintf_chk'?
super-slicer> 128 | int __r = __builtin___vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1,
super-slicer> | ^
super-slicer> /nix/store/n15bxkd7id2gvlwpihm4kp675aqkrwmj-glibc-2.40-36-dev/include/bits/stdio2.h:128:13: note: '__builtin___sprintf_chk' declared here
super-slicer> /nix/store/n15bxkd7id2gvlwpihm4kp675aqkrwmj-glibc-2.40-36-dev/include/bits/stdio2.h:128:39: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'FILE *const __restrict' (aka 'jpge::_IO_FILE *const __restrict')
super-slicer> 128 | int __r = __builtin___vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1,
super-slicer> | ^~~~~~~~
super-slicer> [ 4%] Building CXX object src/imgui/CMakeFiles/imgui.dir/imgui.cpp.o
....
Additional context
This can be fixed with a simple patch. I'm very surprised upstream has not done so already
diff --git a/src/jpeg-compressor/jpge.cpp b/src/jpeg-compressor/jpge.cpp
index f2605ad..8641ed5 100644
--- a/src/jpeg-compressor/jpge.cpp+++ b/src/jpeg-compressor/jpge.cpp@@ -30,8 +30,9 @@
#include "jpge.h"
-#include <stdlib.h>-#include <string.h>+#include <cstdlib>+#include <cstring>+#include <cstdio>
//#include <malloc.h> // not needed, even create bugs in macos
#define JPGE_MAX(a,b) (((a)>(b))?(a):(b))
@@ -934,7 +935,6 @@ namespace jpge {
}
// Higher level wrappers/examples (optional).
-#include <stdio.h>
class cfile_stream : public output_stream
{
Steps To Reproduce
Steps to reproduce the behavior:
nix build github:nixos/nixpkgs/cd286b21e4acb0d10ba8e8d190abeaebbc59ab1d#super-slicer-latest -L
Build log
Additional context
This can be fixed with a simple patch. I'm very surprised upstream has not done so already
Notify maintainers
@cab404 @Moredread @hesiod
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: