Open onemikedelta opened 5 years ago
I had this issue. I saw another post somewhere which fixed it by declaring the index before the for loop, but I cannot find it now. This is more recent anyway. I didn't want to fix every for loop, so I found the place in the rpitx/src/Makefile that caused the problem.
CFLAGS = -Wall -g -O2 -Wno-unused-variable
I added the -std=gnu11 to the CFLAGS in the rpitx/src/Makefile
I originally tried -std=c11 or -std=c99 which fixed this error but it introduced another error: error: ‘struct tm’ has no member named ‘tm_gmtoff’
I wonder why everyone hasn't experienced the for loop problem. My version of c and libraries: $ cc --version cc (Raspbian 4.9.2-10+deb8u2) 4.9.2 $ ldd --version ldd (Debian GLIBC 2.19-18+deb8u10) 2.19 $ /lib/arm-linux-gnueabihf/libc.so.6 GNU C Library (Debian GLIBC 2.19-18+deb8u10) stable release version 2.19, by Roland McGrath et al. Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.8.4. Compiled on a Linux 3.16.7 system on 2017-06-19.
I hope this helps at least one person. I am new to radio after buying #034 Kit from hackerboxes.com. This is not in the kit but I ran into it and had a Raspberry Pi around. by the way, happy belated Pi day. I found that I am not very good at searching the internet, so maybe everyone already knows this.
I also put this issue onto groups.io https://groups.io/g/rpitx/message/317
During compile pifmrds related C files causes problem. When I define these i and j variables outside of for loop line, problem solved, and compiled. Runs successfully now.