Modify

Opened 7 years ago

Last modified 4 years ago

#8100 assigned defect

zoneinfo package fails to build on OS X

Reported by: Diego Biurrun <diego@…> Owned by: nbd
Priority: normal Milestone: Barrier Breaker 14.07
Component: luci Version: Trunk
Keywords: Cc:

Description

Building the zoneinfo package on OS X results in the following compilation error:

make[3]: Entering directory `/Volumes/caseSensitive2/openwrt/trunk/feeds/luci/zo einfo'
WARNING: skipping zoneinfo-simple -- package not selected
WARNING: skipping zoneinfo-core -- package not selected
WARNING: skipping zoneinfo-africa -- package not selected
WARNING: skipping zoneinfo-northamerica -- package not selected
WARNING: skipping zoneinfo-southamerica -- package not selected
WARNING: skipping zoneinfo-poles -- package not selected
WARNING: skipping zoneinfo-asia -- package not selected
WARNING: skipping zoneinfo-atlantic -- package not selected
WARNING: skipping zoneinfo-australia-nz -- package not selected
WARNING: skipping zoneinfo-pacific -- package not selected
CFLAGS="-O2 -I/Volumes/caseSensitive2/openwrt/trunk/staging_dir/host/include" ma e -C /Volumes/caseSensitive2/openwrt/trunk/build_dir/target-mipsel_r2_uClibc-0.9 30.1/zoneinfo-2009c -f Makefile  CC="gcc" LD="\$(CC)" CPPFLAGS="" LDFLAGS="-L/Vo umes/caseSensitive2/openwrt/trunk/staging_dir/host/lib" TOPDIR="/Volumes/caseSen itive2/openwrt/trunk/build_dir/target-mipsel_r2_uClibc-0.9.30.1/zoneinfo-2009c/i kg-install" TZDIR="/Volumes/caseSensitive2/openwrt/trunk/build_dir/target-mipsel r2_uClibc-0.9.30.1/zoneinfo-2009c/ipkg-install/zoneinfo" install
gcc    -c -o localtime.o localtime.c
localtime.c:1159: error: static declaration of 'tzsetwall' follows non-static de laration
/usr/include/time.h:150: error: previous declaration of 'tzsetwall' was here
make[4]: *** [localtime.o] Error 1
make[3]: *** [/Volumes/caseSensitive2/openwrt/trunk/build_dir/target-mipsel_r2_u libc-0.9.30.1/zoneinfo-2009c/.built] Error 2
make[3]: Leaving directory `/Volumes/caseSensitive2/openwrt/trunk/feeds/luci/zon info'
make[2]: *** [package/feeds/luci/zoneinfo/compile] Error 2
make[2]: Leaving directory `/Volumes/caseSensitive2/openwrt/trunk'
make[1]: *** [/Volumes/caseSensitive2/openwrt/trunk/staging_dir/target-mipsel_r2 uClibc-0.9.30.1/stamp/.package_compile] Error 2
make[1]: Leaving directory `/Volumes/caseSensitive2/openwrt/trunk'
make: *** [world] Error 2

The static tzsetwall() declaration clashes with the non-static declaration in /usr/include/time.h (slightly abridged):

#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
void tzsetwall(void);
#endif /* neither ANSI nor POSIX */

There are multiple ways to solve or work around this issue. The attached patch makes tzsetwall() non-static in the zoneinfo package. An alternative would be to set appropriate CPPFLAGS so that tzsetwall is not exposed in the system header.

Attachments (1)

localtime.diff (599 bytes) - added by Diego Biurrun <diego@…> 7 years ago.
patch to work around the compilation failure

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Diego Biurrun <diego@…>

patch to work around the compilation failure

comment:1 Changed 4 years ago by florian

  • Owner set to nbd
  • Status changed from new to assigned

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.