JamesP6000 / WsprryPi

Raspberry Pi WSPR transmitter using NTP based frequency calibration
Other
326 stars 66 forks source link

Compile errors on Raspbian Buster #37

Closed dslotter closed 4 years ago

dslotter commented 4 years ago

Attempting to build under Raspbian buster (armhf) image from 2020-05-27 results in these errors:

`pi@raspberrypi:~/hamradio/WsprryPi $ make cc -O2 -march=native -mtune=native -Wall -c mailbox.c mailbox.c: In function ‘mbox_open’: mailbox.c:280:52: warning: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration] if(mknod(LOCAL_DEVICE_FILE_NAME, S_IFCHR|0600, makedev(MAJOR_NUM_A, 0)) >= 0 && ^~~ g++ -O2 -march=native -mtune=native -D_GLIBCXX_DEBUG -std=c++11 -Wall -Werror -fmax-errors=5 -lm -DRPI23 mailbox.o wspr.cpp -owspr wspr.cpp: In function ‘void txon()’: wspr.cpp:338:38: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ACCESS_BUS_ADDR(CM_GP0CTL_BUS) = ((int)&setupword); ~^~~~~ wspr.cpp: In function ‘void wspr(const char, const char, const char, unsigned char)’: *wspr.cpp:597:10: error: ‘char strncpy(char, const char, size_t)’ specified bound 16 equals destination size [-Werror=stringop-truncation]** strncpy(buf, call, 16);


**wspr.cpp:633:12: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 4 equals destination size [-Werror=stringop-truncation]**
     strncpy(l, l_pre, 4);
     ~~~~~~~^~~~~~~~~~~~~
**wspr.cpp:693:30: error: ‘j0’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
           j0 = ((k>>j)&1)|(j0<<1);**
                           ~~~^~~~
**wspr.cpp:640:23: error: ‘ng’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   unsigned long n2=(ng<<7)|(p+64+nadd);**
                    ~~~^~~~
`
chrismaltese commented 4 years ago

Experiencing same, here. Seeing this was closed, I cannot seem to find the fix with my blind old eyes. Any guidance?

dslotter commented 4 years ago

@chrismaltese I switched projects to the original (older) version which still builds successfully: https://github.com/DanAnkers/WsprryPi . Hope this helps you.

chrismaltese commented 4 years ago

@dslotter Thanks, Dave. That came together nicely. Will test with HAT when it arrives.

Much appreciated, --Chris