Posts: 1
Joined: Mon Apr 15, 2019 1:07 am

Need help with "undefined reference makedev"

Thu Aug 29, 2019 5:01 am

Hello RPi'ers

I have been trying to install WsprryPi app from GitHub and I cannot get it to ‘make’ properly.

I get through the download and the WsprryPi directory is there, but when I go to ‘make’ the program,
there are a lot of warnings and it ends in an error.

It reads ….. undefined reference to ‘makedev’

Then, exits with an ERROR

It looks like there is a missing C++ library, or some part of C++ is not installed.

I have built the RPi system properly and updated the OS.

Can someone please help me out here?


Dave Kenyon

User avatar
Posts: 42889
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Need help with "undefined reference makedev"

Thu Aug 29, 2019 7:19 am

You don't need makedev on a system with device trees and udev.

Write a dumb program makedev.c

Code: Select all

#include <stdlib.h>
int main (int argc, char* argc[]){
return 0;}
compile that and move it to /usr/local/sbin.

That should keep your stuff happy as it will do nothing and set a successful return code.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

User avatar
Posts: 3594
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Need help with "undefined reference makedev"

Thu Aug 29, 2019 11:03 am

The problem is a missing function called makedev, not a program.
makedev() is actually a macro and you need to include the correct header for it. At the top of mailbox.c add the following line

Code: Select all

#include <sys/sysmacros.h>
I assume if the code used to compile under Stretch then one of the other includes used to include sysmacros but no longer does on Buster.
Kira the Koding Kitty, R.I.P. 8/3/24

Posts: 1
Joined: Wed Nov 06, 2019 3:08 pm

Re: Need help with "undefined reference makedev"

Wed Nov 06, 2019 3:09 pm


Fixed my WsprryPi install in seconds....

Thanks. :D :D :D :D :D :D

Return to “Troubleshooting”