• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compile with Optimization fails / timedate missing
#1
Hello,

if I compile the GIT version with this usual gcc flags (in compile.sh)
Code:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-fomit-frame-pointer -march=native -O2" -DCMAKE_CXX_FLAGS="-march=native -O2"

I'll get this (additional) warnings
Code:
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c: In function ‘plua_config_device_datetime_get_table’:
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:301:6: warning: ‘tm.tm_wday’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int weekday = tm.tm_wday;
      ^~~~~~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:295:23: warning: ‘tm.tm_year’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int year = tm.tm_year+1900;
             ~~~~~~~~~~^~~~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:296:23: warning: ‘tm.tm_mon’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int month = tm.tm_mon+1;
              ~~~~~~~~~^~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:297:6: warning: ‘tm.tm_mday’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int day = tm.tm_mday;
      ^~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:298:6: warning: ‘tm.tm_hour’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int hour = tm.tm_hour;
      ^~~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:299:6: warning: ‘tm.tm_min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int minute = tm.tm_min;
      ^~~~~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:300:6: warning: ‘tm.tm_sec’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int second = tm.tm_sec;
      ^~~~~~

but package builds normally (debian stretch / rpi2), just to fail later after install and start complaining about missing timedate protocol.

Any hints, what could have gone wrong?
(btw '-march=native -O0 works')

Stefan
 
Reply
#2
I don't know. I also don't see the reason to change the default compile parameters?
 
Reply
#3
(04-13-2019, 06:31 PM)curlymo Wrote: I don't know. I also don't see the reason to change the default compile parameters?

Too lower memory footprint and reduce execution time. -O2 is the debian default.
(See https://gcc.gnu.org/onlinedocs/gcc/Optim...tions.html)

But ok, I look, where missing "complete boolean eval" will kill timedate..

Stefan


PS: With the latest hardware to lua changes in GIT my sensors only every now and then get results through.
      (1 or 2 messages/min instead of more then 20 ... just to note)
 
Reply
#4
The optimization flag isn't set anywhere so it should use the default.

Regarding the second issue, please open a new topic with it.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  arctech_contact protocol missing open/close signals Niek 2 451 12-23-2017, 07:16 PM
Last Post: Niek
Question window sensor's very first signal goes missing baf 1 511 11-14-2017, 10:36 PM
Last Post: curlymo
  rule fails with ping state pinu 1 759 06-09-2017, 10:14 AM
Last Post: Niek
  cannot compile pilight on SLES 11.4 wseifert 0 603 06-09-2017, 05:59 AM
Last Post: wseifert
  config device #1 "living", missing protocol jjlf 5 1,602 11-08-2016, 11:55 PM
Last Post: jjlf
  new install fails - dev/nightly gneandr 11 8,274 01-29-2016, 11:30 AM
Last Post: WEBcast
  SSDP error and or missing protocol rudig 5 2,093 01-29-2016, 08:57 AM
Last Post: rudig

Forum Jump:


Browsing: 1 Guest(s)