lfreist/hwinfo

arm linux __get_cpuid_count function undefine

xinsuinizhuan opened this issue · 9 comments

__get_cpuid_count(func_id, sub_func_id, &regs[0], &regs[1], &regs[2], &regs[3]);
__get_cpuid_count function undefine

jetson arm unbuntu linux

ARM does not support the cpuid instructions (x86 specific).

However, I have just looked into the code and fixed an import. Can you try if it is working now? Thank you!

it do not work

I assume the error occurs in cpuid.h. This file is only used if the compiler recognizes your machine as x86. In your case, the file should not be included.

Could you please check what macro makes HWINFO_X86 defined in the following file/line: https://github.com/lfreist/hwinfo/blob/main/include/hwinfo/platform.h#L19

Sadly, I do not have an ARM machine to check it out myself...

how about arm linux,now?

Hi, Could you please provide more information about the issue?
Hardware, Compiler, ...

With this recently accepted PR #28, and this new PR #29 I just did, I've been able to compile and run Example in a Jetson Xavier.

The problem was that Jetsons have Ubuntu 18.04, which has GCC 8.4 by default, which doesn't support C++20, and even with C++17, you need to link to "stdc++fs" to use std::filesystem.

Thank you Facundo!

PR #29 is merged!

Just to fix the wrong comment I made, Ubuntu 18.04 comes with gcc 7 installed by default, which doesn't even have C++17 support. In Jetsons you can install gcc 8, which allows you to use CUDA 10.2, and compile with C++17.