EasyCwmp - easycwmp
View Issue Details
0000037easycwmp[All Projects] Bugpublic2015-02-23 07:482015-02-27 09:01
resolvedno change required 
0000037: make fails with struct storage size of 'tm' isn't known
When trying to build 1.0.4 or later on Debian, the make fails with the following (all prereqs are installed, and earlier versions build fine):

XXX:/opt/dev/easycwmp-1.1.0# make
Making all in bin
make[1]: Entering directory '/opt/dev/easycwmp-1.1.0/bin'
gcc -DPACKAGE_NAME=\"easycwmpd\" -DPACKAGE_TARNAME=\"easycwmpd\" -DPACKAGE_VERSION=\"1.1.0\" -DPACKAGE_STRING=\"easycwmpd\ 1.1.0\" -DPACKAGE_BUGREPORT=\"mohamed.kallel@pivasoftware.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"easycwmpd\" -DVERSION=\"1.1.0\" -DACS_MULTI=1 -DJSONC=1 -DDEBUG=1 -DDEVEL=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -I. -D_THREAD_SAFE -D_REENTRANT -g -O2 -MT easycwmpd-backup.o -MD -MP -MF .deps/easycwmpd-backup.Tpo -c -o easycwmpd-backup.o `test -f '../src/backup.c' || echo './'`../src/backup.c
mv -f .deps/easycwmpd-backup.Tpo .deps/easycwmpd-backup.Po
gcc -DPACKAGE_NAME=\"easycwmpd\" -DPACKAGE_TARNAME=\"easycwmpd\" -DPACKAGE_VERSION=\"1.1.0\" -DPACKAGE_STRING=\"easycwmpd\ 1.1.0\" -DPACKAGE_BUGREPORT=\"mohamed.kallel@pivasoftware.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"easycwmpd\" -DVERSION=\"1.1.0\" -DACS_MULTI=1 -DJSONC=1 -DDEBUG=1 -DDEVEL=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -I. -D_THREAD_SAFE -D_REENTRANT -g -O2 -MT easycwmpd-config.o -MD -MP -MF .deps/easycwmpd-config.Tpo -c -o easycwmpd-config.o `test -f '../src/config.c' || echo './'`../src/config.c
../src/config.c: In function ‘config_init_acs’:
../src/config.c:125:12: error: storage size of ‘tm’ isn’t known
  struct tm tm;
Makefile:454: recipe for target 'easycwmpd-config.o' failed
make[1]: *** [easycwmpd-config.o] Error 1
make[1]: Leaving directory '/opt/dev/easycwmp-1.1.0/bin'
Makefile:343: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
as above
No tags attached.
Issue History
2015-02-23 07:48tomdjpnNew Issue
2015-02-25 05:42tomdjpnNote Added: 0000129
2015-02-25 16:40mohamed.kallelNote Added: 0000131
2015-02-25 16:40mohamed.kallelStatusnew => resolved
2015-02-25 16:40mohamed.kallelResolutionopen => fixed
2015-02-25 16:40mohamed.kallelAssigned To => mohamed.kallel
2015-02-26 01:36tomdjpnNote Added: 0000137
2015-02-26 01:36tomdjpnStatusresolved => feedback
2015-02-26 01:36tomdjpnResolutionfixed => reopened
2015-02-26 10:22mohamed.kallelNote Added: 0000140
2015-02-27 09:01mohamed.kallelStatusfeedback => resolved
2015-02-27 09:01mohamed.kallelResolutionreopened => no change required

2015-02-25 05:42   
This can be fixed by:
(1) changing "struct tm tm" => "struct tm *tm" in config_init_acs in config.c
(2) removing the redundant "struct tm tm" in cwmp.c

Also, I was getting a build error due to undefined "is_error" in json-c.
This is apparently deprecated, and an apparent fix is to replace all is_error(XX) with !XX in json.c

After that, the build completed successfully and seems to be running fine
2015-02-25 16:40   
Fixed in the version EasyCwmp-1.1.1
2015-02-26 01:36   
Thanks for looking into this so quickly.
Perhaps I'm missing something, but I don't see any fixes for this in the commit for version 1-1.1
https://github.com/pivasoftware/easycwmp/commit/725310ddca570d914826562a361ed75eea55fc19 [^]
2015-02-26 10:22   
The fix is not on the commit (tagged 1.1.1). It's in the commit:
https://github.com/pivasoftware/easycwmp/commit/675641ce0e7174843ff98e4eedf1227a23ae51e5 [^]

Just 2 commit before the commit tagged 1.1.1