bcachefs icon indicating copy to clipboard operation
bcachefs copied to clipboard

Build error: ./include/linux/alloc_tag.h:140:1: error: expected identifier before ‘(’ token [2b413ed7]

Open Valmar33 opened this issue 1 year ago • 5 comments

Distro is Arch Linux. GCC version is 13.1.1.

First bad commit is https://github.com/koverstreet/bcachefs/commit/2b413ed7bf25b06f352cf7478478f6d0ed8474cf : 2b413ed7 mm: enable page allocation tagging

In file included from ./include/linux/percpu.h:5,
                 from ./include/linux/percpu_counter.h:14,
                 from ./include/linux/mm_types.h:21,
                 from ./include/linux/mmzone.h:22,
                 from ./include/linux/gfp.h:7,
                 from ./include/linux/mm.h:7,
                 from ./include/linux/scatterlist.h:8,
                 from ./include/linux/dma-buf.h:19,
                 from drivers/accel/ivpu/ivpu_gem.c:6:
drivers/accel/ivpu/ivpu_gem.c: In function ‘ivpu_bo_alloc_and_map_pages_locked’:
./include/linux/alloc_tag.h:140:1: error: expected identifier before ‘(’ token
  140 | ({                                                                      \
      | ^
./include/linux/gfp.h:288:49: note: in expansion of macro ‘alloc_hooks’
  288 | #define alloc_pages(...)                        alloc_hooks(alloc_pages_noprof(__VA_ARGS__))
      |                                                 ^~~~~~~~~~~
drivers/accel/ivpu/ivpu_gem.c:200:24: note: in expansion of macro ‘alloc_pages’
  200 |         ret = bo->ops->alloc_pages(bo);
      |                        ^~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:252: drivers/accel/ivpu/ivpu_gem.o] Error 1
make[4]: *** Waiting for unfinished jobs....

Valmar33 avatar Jul 14 '23 08:07 Valmar33

Just a warning about compilaton from master blindy (at this point last commit was: a9b49f1cccaf18de285bbd378d0ab329dacd657f)...

Since kernel did not compile due to error mentioned above, I disabled IVPU and CRAMFS in my kernel config, so kernel compiled. But after that while mounting bcachefs, it went to upgrade FS and it went south with pagefault, now FS is unusable with previous versions of FS and I can not mount it anymore, so I' ll wait for some updates to bcachefs to try to salvage my partition.

Nothing important on that partition, but this is just a warning - don't try to be adept about outsmarting compilation errors, it will bite you in unfortunate place :)

Mjasnik avatar Jul 15 '23 14:07 Mjasnik

Yeah, it can be like that. I stopped after disabling IVPU because it was tiring to figure out what the next broken commit was. So I just gave up and went back to the last working commit, which was before all of the tagging-related stuff.

Valmar33 avatar Jul 15 '23 14:07 Valmar33

Working commit for me is be3ef67f38e1e6a6bdbe2253b6bf4c19be05dcb9

Valmar33 avatar Jul 15 '23 14:07 Valmar33

Thanks, I'll try that.

Mjasnik avatar Jul 15 '23 15:07 Mjasnik

Yeah, thanks, that helped. bcachefs really did not eat my data :smile:

Mjasnik avatar Jul 15 '23 15:07 Mjasnik