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

darling-dkms: fortify-string.h:358:63: error: expected identifier or ‘(’ before ‘{’ token #1179

Closed
bquast opened this issue Jun 16, 2022 · 4 comments

Comments

@bquast
Copy link

bquast commented Jun 16, 2022

Build Log
What is the build error?

./include/linux/fortify-string.h:358:63: error: expected identifier or ‘(’ before ‘{’ token
  358 |                              p_size_field, q_size_field, op) ({         \
      |                                                               ^
./include/linux/fortify-string.h:369:26: note: in expansion of macro ‘__fortify_memcpy_chk’
  369 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
      |                          ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/darling-mach/r3717.26e55e111/build/osfmk/libsa/string.h:63:18: note: in expansion of macro ‘memcpy’
   63 | extern void     *memcpy(void *, const void *, size_t);
      |                  ^~~~~~
./include/linux/fortify-string.h:358:63: error: expected identifier or ‘(’ before ‘{’ token
  358 |                              p_size_field, q_size_field, op) ({         \
      |                                                               ^
./include/linux/fortify-string.h:373:27: note: in expansion of macro ‘__fortify_memcpy_chk’
  373 | #define memmove(p, q, s)  __fortify_memcpy_chk(p, q, s,                 \
      |                           ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/darling-mach/r3717.26e55e111/build/osfmk/libsa/string.h:65:18: note: in expansion of macro ‘memmove’
   65 | extern void     *memmove(void *, const void *, size_t);
      |                  ^~~~~~~
./include/linux/fortify-string.h:115:9: error: expected identifier or ‘(’ before ‘__builtin_choose_expr’
  115 |         __builtin_choose_expr(__is_constexpr(__builtin_strlen(p)),      \
      |         ^~~~~~~~~~~~~~~~~~~~~                                                           ^

Build log (gist) (also attached as darling-dkms.log, further attached terminal output as darling.txt)

System Information
What system are you building with?

Software Version
Clang 13.0.1
CMake 3.23.2
Linux Kernel 5.18.3-arch1-1
Darling 26e55e1

darling-dkms.log
darling.txt

@bquast
Copy link
Author

bquast commented Jun 16, 2022

When I:

sudo pacman -S linux-headers

I get:

warning: linux-headers-5.18.3.arch1-1 is up to date -- reinstalling
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-headers-5.18.3.arch1-1

Total Installed Size:  141.73 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                                                 [----------------------------------------------------------------------------------------] 100%
(1/1) checking package integrity                                                                                                               [----------------------------------------------------------------------------------------] 100%
(1/1) loading package files                                                                                                                    [----------------------------------------------------------------------------------------] 100%
(1/1) checking for file conflicts                                                                                                              [----------------------------------------------------------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
:: Processing package changes...
(1/1) reinstalling linux-headers                                                                                                               [----------------------------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating module dependencies...
(3/4) Install DKMS modules
==> dkms install --no-depmod darling-mach/r3717.26e55e111 -k 5.18.3-arch1-1
Error! Bad return status for module build on kernel: 5.18.3-arch1-1 (x86_64)
Consult /var/lib/dkms/darling-mach/r3717.26e55e111/build/make.log for more information.
==> WARNING: `dkms install --no-depmod darling-mach/r3717.26e55e111 -k 5.18.3-arch1-1' exited 10
==> dkms install --no-depmod darling-mach/0.1 -k 5.18.3-arch1-1
Deprecated feature: REMAKE_INITRD
Error! Bad return status for module build on kernel: 5.18.3-arch1-1 (x86_64)
Consult /var/lib/dkms/darling-mach/0.1/build/make.log for more information.
==> WARNING: `dkms install --no-depmod darling-mach/0.1 -k 5.18.3-arch1-1' exited 10
(4/4) Refreshing PackageKit...

Full log: https://gist.github.com/bquast/69cd0491d7749c9182797ea88352949c

@bquast
Copy link
Author

bquast commented Jun 16, 2022

Okay, I managed to get it working on the LTS kernel (5.15.47-1). Specifically I:

  1. sudo pacman -S linux-lts
  2. sudo grub-mkconfig -o /boot/grub/grub.cfg
  3. reboot
  4. sudo pacman -S linux-lts-headers

@bquast bquast closed this as completed Jun 17, 2022
@chinese-wzq
Copy link

I think this is a kernel source bug.Can you report it?

@bquast
Copy link
Author

bquast commented Jul 19, 2022

It seems to be, I'm on Arch, on more recent version of 5.18 it works again, no problem.

How should I report it?

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

2 participants