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

Can't compile on TrueNAS Scale #28

Closed
kowalcj0 opened this issue Aug 15, 2022 · 3 comments
Closed

Can't compile on TrueNAS Scale #28

kowalcj0 opened this issue Aug 15, 2022 · 3 comments

Comments

@kowalcj0
Copy link

kowalcj0 commented Aug 15, 2022

Hi,

When I tried to compile the latest version of the driver on TrueNAS Scale (based on Debian Linux) running kernel 5.10.120 I got following error:

make
make -C /lib/modules/`uname -r`/build M=$PWD modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.120+truenas'
  CC [M]  /mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.o
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c: In function 'aqc_is_visible':
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c:398:9: error: 'hwmon_pwm_auto_channels_temp' undeclared (first use in this function)
  398 |    case hwmon_pwm_auto_channels_temp:
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c:398:9: note: each undeclared identifier is reported only once for each function it appears in
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c: In function 'aqc_read':
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c:495:8: error: 'hwmon_pwm_auto_channels_temp' undeclared (first use in this function)
  495 |   case hwmon_pwm_auto_channels_temp:
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c: In function 'aqc_write':
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c:625:8: error: 'hwmon_pwm_auto_channels_temp' undeclared (first use in this function)
  625 |   case hwmon_pwm_auto_channels_temp:
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c:15:
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c: At top level:
/mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.c:695:44: error: 'HWMON_PWM_AUTO_CHANNELS_TEMP' undeclared here (not in a function)
  695 |       HWMON_PWM_INPUT | HWMON_PWM_ENABLE | HWMON_PWM_AUTO_CHANNELS_TEMP,
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/hwmon.h:420:4: note: in definition of macro 'HWMON_CHANNEL_INFO'
  420 |    __VA_ARGS__, 0 \
      |    ^~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:280: /mnt/git/aquacomputer_d5next-hwmon/aquacomputer_d5next.o] Error 1
make[1]: *** [Makefile:1822: /mnt/git/aquacomputer_d5next-hwmon] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.120+truenas'
make: *** [Makefile:4: modules] Error 2

PS. I had Quadro plugged in during compilation.

Extra details:

make --version      
GNU Make 4.3
Built for x86_64-pc-linux-gnu
...

cc --version
cc (Debian 10.2.1-6) 10.2.1 20210110
...

gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110
...

Thanks

@aleksamagicka
Copy link
Owner

hwmon_pwm_auto_channels_temp was added in 5.18 if I'm not mistaken, and you're on 5.10. You should be able to make it work by modifying the code and commenting out those sections. You won't have that functionality, but it isn't necessary for basic use anyway.

Side note, having Quadro or others plugged in during compilation won't make a difference.

@kowalcj0
Copy link
Author

Thanks @aleksamagicka
Will try to give it a go next week.

Links to 5.18 changes for brevity :)
https://kernelnewbies.org/Linux_5.18#Hardware_monitoring__.28hwmon.29
https://lwn.net/Articles/888736/

@aleksamagicka
Copy link
Owner

Glad to help.

aleksamagicka added a commit that referenced this issue Sep 8, 2022
@aleksamagicka aleksamagicka mentioned this issue Feb 27, 2023
12 tasks
@aleksamagicka aleksamagicka mentioned this issue Apr 18, 2023
17 tasks
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