Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duperemove 0.15 fails to build #367

Open
ErichRitz opened this issue Feb 3, 2025 · 3 comments
Open

duperemove 0.15 fails to build #367

ErichRitz opened this issue Feb 3, 2025 · 3 comments

Comments

@ErichRitz
Copy link
Contributor

Attempting to build duperemove 0.15 fails with:

make: *** [<builtin>: dedupe.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from filerec.h:24,
                 from duperemove.c:34:
results-tree.h:25:8: error: redefinition of ‘struct list_head’
   25 | struct list_head {
      |        ^~~~~~~~~
In file included from duperemove.c:32:
list.h:10:8: note: originally defined here
   10 | struct list_head {
      |        ^~~~~~~~~
make: *** [<builtin>: duperemove.o] Error 1
In file included from file_scan.c:49:
filerec.h:54:40: error: unknown type name ‘bool’
   54 | int filerec_open(struct filerec *file, bool quiet);
      |                                        ^~~~
filerec.h:25:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
   24 | #include "results-tree.h"
  +++ |+#include <stdbool.h>
   25 | 
make: *** [<builtin>: file_scan.o] Error 1
system/duperemove: duperemove.SlackBuild failed (status 2)              15:38:54
Unmounting chroot ... 
:-( system/duperemove FAILED )-:

And I think the culprit is here in results-tree.h:

// TODO: delete this
struct list_head {
	struct list_head *next, *prev;
};

Did the TODO get forgotten about?

@autumnontape
Copy link
Contributor

On my Arch Linux system, make CC=gcc works for reasons I don't understand, but make CC=clang fails:

clang -Wall -ggdb --std=c23 -MMD -O2 -D_FILE_OFFSET_BITS=64 -DVERSTRING=\"v0.15-1-ge78b\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid  -DIS_RELEASE=0 -D_GNU_SOURCE   -c -o dedupe.o dedupe.c
In file included from dedupe.c:29:
In file included from ./filerec.h:24:
./results-tree.h:25:8: error: redefinition of 'list_head'
   25 | struct list_head {
      |        ^
./list.h:10:8: note: previous definition is here
   10 | struct list_head {
      |        ^
1 error generated.
make: *** [<builtin>: dedupe.o] Error 1

@jubalh
Copy link

jubalh commented Feb 5, 2025

It fails for me as well with gcc 14.2.1.

@superian
Copy link

superian commented Feb 8, 2025

It builds for me, with gcc 13.3.0 after I accept autumnontape's patches and change a compiler option - --std=c23 to --std=c2x - in the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants