ambf icon indicating copy to clipboard operation
ambf copied to clipboard

Build Error (cpuid.h: No such file or directory)

Open mikami520 opened this issue 3 years ago • 9 comments

Hi, when I install ambf-2.0 on Ubuntu 20.04, it gave an error that the "cpuid.h" is missing. Could you please help me solve it? 22E77EC2-9D63-405A-AA85-5BEBA0157796

mikami520 avatar Jan 04 '22 00:01 mikami520

What is the architecture of your system? Not sure if this is related, but can you try the suggestions from this issue https://github.com/WPI-AIM/ambf/issues/142.

adnanmunawar avatar Jan 04 '22 00:01 adnanmunawar

What is the architecture of your system? Not sure if this is related, but can you try the suggestions from this issue #142.

My architecture is ARM64, I use the VM on the M1 Macbook

mikami520 avatar Jan 04 '22 00:01 mikami520

Thanks for the info. I don't have access to an M1 Mac and thus haven't tried to build AMBF on a VM. Did you try the solution to Issue #142 and did it change anything?

If that doesn't work for you, I know of a couple of people who tried running AMBF via Docker on the M1 Mac. You can find the instructions for that here:

https://github.com/collaborative-robotics/docker-ambf

adnanmunawar avatar Jan 04 '22 18:01 adnanmunawar

Thanks for the info. I don't have access to an M1 Mac and thus haven't tried to build AMBF on a VM. Did you try the solution to Issue #142 and did it change anything?

If that doesn't work for you, I know of a couple of people who tried running AMBF via Docker on the M1 Mac. You can find the instructions for that here:

https://github.com/collaborative-robotics/docker-ambf

I will have a try and let you know the further result, thanks for your help!

mikami520 avatar Jan 04 '22 22:01 mikami520

Great, could you also try this on your VM. In your local AMBF copy, can you comment out this line: https://github.com/WPI-AIM/ambf/blob/ambf-2.0/external/openal/include/alConfig.h#L74

in the file ambf/external/openal/include/alConfig.h from

#define HAVE_CPUID_H

to

//#define HAVE_CPUID_H

and see if this allows you to compile.

adnanmunawar avatar Jan 05 '22 16:01 adnanmunawar

@adnanmunawar I had the same issue and tested this workaround on my M1 mac mini running parallels VM Ubuntu 20.04 and it works.

radiang avatar Jan 24 '22 19:01 radiang

Thanks, Radian, the new commit should incorporate these changes.

adnanmunawar avatar Jan 24 '22 20:01 adnanmunawar

Thanks, Radian, the new commit should incorporate these changes.

@adnanmunawar hi Adnan, this commit did not prevent the error for me. However, commenting out those lines again did work. I guess the commit implementing the if statement does not always work. Just wanted to let you know. I'm using a M1 macbook air running Ubuntu 18.04 on VMWare Fusion.

youpmac avatar Apr 14 '22 07:04 youpmac

Thanks for reporting this Youp, I shall take a look at it. I might need your help to test it though as I do not have an M1 Mac :)

adnanmunawar avatar Apr 15 '22 04:04 adnanmunawar