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

Fails on armv7: fatal error: 'wiringPi.h' file not found #180

Closed
yurivict opened this issue Jul 13, 2022 · 12 comments
Closed

Fails on armv7: fatal error: 'wiringPi.h' file not found #180

yurivict opened this issue Jul 13, 2022 · 12 comments

Comments

@yurivict
Copy link
Contributor

The code includes wiringPi.h on ARM platforms but where does it come from?

@sasagawa888
Copy link
Owner

sasagawa888 commented Jul 13, 2022

The judgment of RaspberryPI may be insufficient. In Raspberry PI it has wiringpi installed before. Therefore, in the case of raspberry PI, I try to compile it including wiring pi. However, this judgment was too simple. At compile time, the implementation must more strictly determine if it is a Raspberry PI. It misidentifies an ARM machine other than the Raspberry PI.

@sasagawa888
Copy link
Owner

I will review the OS judgment by #ifdef. #ifdef TARGET_LINUX_ARM This may be better.
I gave my second son a Raspberry PI as a gift.
I don't have it now. Please wait.

@yurivict
Copy link
Contributor Author

Does Linux always install wiringPi.h on ARM?

@sasagawa888
Copy link
Owner

Perhaps No. Perhaps that way the C compiler will not be able to determine the raspbian OS. Is there any good way?

@yurivict
Copy link
Contributor Author

Here people are trying to detect Raspberrian OS at the makefile level. Not sure if this exact example works today. But in general GNU Make can set C flags based on presence of some files/commands.

@sasagawa888
Copy link
Owner

Thank you. I will try it when I get Pi-400.

@sasagawa888
Copy link
Owner

I repurchased the pi-400. I will test with pi-400 from next week.

@sasagawa888
Copy link
Owner

Fixed. Please test.

@sasagawa888
Copy link
Owner

Mr. Poldy,I learned a lot about how to write a makefile. Is this fix okay?

@yurivict
Copy link
Contributor Author

Fixed. Please test.

Thanks!
I've updated the FreeBSD port. I'll report if I see further failures.

@poldy
Copy link
Contributor

poldy commented Jul 26, 2022

Mr. Poldy,I learned a lot about how to write a makefile. Is this fix okay?

Looks good to me, at least from the make point of view. I presume Rasperry Pis default to the hostname "raspberrypi", if someone changes that they can fix it themselves :-)

"Make" may seem archaic, but it's like learning vi or Emacs, at least you can be sure that it will be available on computers in the future. And if you know Prolog, that makes the semantics much easier to understand.

@sasagawa888
Copy link
Owner

Thank you. Mr. Poldy.

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

3 participants