rszimm / sprinklers_pi

Sprinkling System Control Program for the Raspberry Pi
GNU General Public License v2.0
309 stars 100 forks source link

Compile with OpenWeatherMap hangs #174

Closed haroldp closed 4 years ago

haroldp commented 4 years ago

I finally upgraded my sprinklers_pi install from 1.0.9 on my first-gen Pi 1b. It's been working beautifully, but I wanted to upgrade to OWM support. However, when I try to compile it with WEATHER_OPENWEATHER defined, it pegs the CPU and hangs forever.

pi@raspberrypi:~/sprinklers_pi-1.6.1 $ egrep '^#define WEATHER' config.h
#define WEATHER_OPENWEATHER
pi@raspberrypi:~/sprinklers_pi-1.6.1 $ make clean
rm -rf build sprinklers_pi settings db.sql *.tar.gz
pi@raspberrypi:~/sprinklers_pi-1.6.1 $ make
mkdir -p build
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11  -MF"build/Event.d" -MT"build/Event.d" -c -o "build/Event.o" "Event.cpp"
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11  -MF"build/Logging.d" -MT"build/Logging.d" -c -o "build/Logging.o" "Logging.cpp"
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11  -MF"build/Weather.d" -MT"build/Weather.d" -c -o "build/Weather.o" "Weather.cpp"
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11  -MF"build/Wunderground.d" -MT"build/Wunderground.d" -c -o "build/Wunderground.o" "Wunderground.cpp"
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11  -MF"build/Aeris.d" -MT"build/Aeris.d" -c -o "build/Aeris.o" "Aeris.cpp"
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11  -MF"build/DarkSky.d" -MT"build/DarkSky.d" -c -o "build/DarkSky.o" "DarkSky.cpp"
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11  -MF"build/OpenWeather.d" -MT"build/OpenWeather.d" -c -o "build/OpenWeather.o" "OpenWeather.cpp"

I can compile with any of the other weather APIs defined, or with none, and it's fine. I guess my linux install is pretty old at this point, if you think maybe that's the problem:

pi@raspberrypi:~/sprinklers_pi-1.6.1 $ uname -a
Linux raspberrypi 4.4.9+ #884 Fri May 6 17:25:37 BST 2016 armv6l GNU/Linux
nhorvath commented 4 years ago

Have you tried an apt-get update apt-get upgrade lately? I haven't tested it on a pi 1 but I don't know why it would hang. It's really identical to the dark sky version just different url and fields.

On Sat, Jun 20, 2020, 7:05 PM Harold Paulson notifications@github.com wrote:

I finally upgraded my sprinklers_pi install from 1.0.9 on my first-gen Pi 1b. It's been working beautifully, but I wanted to upgrade to OWM support. However, when I try to compile it with WEATHER_OPENWEATHER defined, it pegs the CPU and hangs forever.

pi@raspberrypi:~/sprinklers_pi-1.6.1 $ egrep '^#define WEATHER' config.h

define WEATHER_OPENWEATHER

pi@raspberrypi:~/sprinklers_pi-1.6.1 $ make clean rm -rf build sprinklers_pi settings db.sql *.tar.gz pi@raspberrypi:~/sprinklers_pi-1.6.1 $ make mkdir -p build gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11 -MF"build/Event.d" -MT"build/Event.d" -c -o "build/Event.o" "Event.cpp" gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11 -MF"build/Logging.d" -MT"build/Logging.d" -c -o "build/Logging.o" "Logging.cpp" gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11 -MF"build/Weather.d" -MT"build/Weather.d" -c -o "build/Weather.o" "Weather.cpp" gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11 -MF"build/Wunderground.d" -MT"build/Wunderground.d" -c -o "build/Wunderground.o" "Wunderground.cpp" gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11 -MF"build/Aeris.d" -MT"build/Aeris.d" -c -o "build/Aeris.o" "Aeris.cpp" gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11 -MF"build/DarkSky.d" -MT"build/DarkSky.d" -c -o "build/DarkSky.o" "DarkSky.cpp" gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION=\"1.6.1\" -Wno-psabi -std=c++11 -MF"build/OpenWeather.d" -MT"build/OpenWeather.d" -c -o "build/OpenWeather.o" "OpenWeather.cpp"

I can compile with any of the other weather APIs defined, or with none, and it's fine. I guess my linux install is pretty old at this point, if you think maybe that's the problem:

pi@raspberrypi:~/sprinklers_pi-1.6.1 $ uname -a Linux raspberrypi 4.4.9+ #884 Fri May 6 17:25:37 BST 2016 armv6l GNU/Linux

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABIJXAWWUQ7RLUTHVLHM63RXU6CZANCNFSM4ODSR6VQ .

haroldp commented 4 years ago

I guess I knew that was coming. :)

I ran sudo apt-get update && sudo apt-get upgrade (434 packages) and then recompiled sprinklers_pi with OWM support.

[4 hours later]

Yeah, sprinklers_pi compiles fine now. My new rule is to update packages every 5 years, whether it needs it or not! ;)

nhorvath commented 4 years ago

Yeah no one ever claimed a pi 1 was fast ;) Glad it's working.