postgresql: add host-zic dependency
PATCH 1/1 postgresql: add host-zic dependency
Fixes zic related build failure [1], patch suggested by Yann E. MORIN [2].
[1] http://autobuild.buildroot.net/results/9ec69f92a48c1adc50bdb3096008243d842c27e6/
[2] http://lists.busybox.net/pipermail/buildroot/2014-April/094767.html
--- package/postgresql/postgresql.mk | 3 +++ 1 file changed, 3 insertions(+)
package/postgresql/postgresql.mk +3 -0
@@ -29,6 +29,9 @@ endif ifeq ($(BR2_PACKAGE_TZDATA),y) POSTGRESQL_DEPENDENCIES += tzdata POSTGRESQL_CONF_OPT += --with-system-tzdata=/usr/share/zoneinfo +else + POSTGRESQL_DEPENDENCIES += host-zic + POSTGRESQL_CONF_ENV += ZIC=$$(ZIC) endif ifeq ($(BR2_PACKAGE_OPENSSL),y)
Signature · 1 line
1.8.1.4
PATCH 1/1 postgresql: add host-zic dependency
Dear Peter Seiderer,
package/postgresql/postgresql.mk endif · line 35
Quoted 12 lines · Peter Seiderer
package/postgresql/postgresql.mk +3
-0@@ -29,6 +29,9 @@ endif ifeq ($(BR2_PACKAGE_TZDATA),y) POSTGRESQL_DEPENDENCIES += tzdata POSTGRESQL_CONF_OPT += --with-system-tzdata=/usr/share/zoneinfo +else + POSTGRESQL_DEPENDENCIES += host-zic + POSTGRESQL_CONF_ENV += ZIC=$$(ZIC) endif
I'm not entirely sure to understand how this works. If BR2_PACKAGE_TZDATA is not enabled, where will host-zic find the time-zone informations?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 postgresql: add host-zic dependency
Thomas, All,
On 2014-04-22 17:52 +0200, Thomas Petazzoni spake thusly:
Quoted 4 lines
Dear Peter Seiderer,
On Tue, 22 Apr 2014 17:41:25 +0200, Peter Seiderer wrote:
Quoted 16 lines
package/postgresql/postgresql.mk endif · line 35
Quoted 12 lines
package/postgresql/postgresql.mk +3
-0@@ -29,6 +29,9 @@ endif ifeq ($(BR2_PACKAGE_TZDATA),y) POSTGRESQL_DEPENDENCIES += tzdata POSTGRESQL_CONF_OPT += --with-system-tzdata=/usr/share/zoneinfo +else + POSTGRESQL_DEPENDENCIES += host-zic + POSTGRESQL_CONF_ENV += ZIC=$$(ZIC) endifI'm not entirely sure to understand how this works. If
BR2_PACKAGE_TZDATAis not enabled, where will host-zic find the time-zone informations?
host-zin only builds the 'zic' program, which pacakge can access using $(ZIC), so host-zip (our package) does not need the tz-data itslef.
But postgresql needs the time zone info. It can use either the system ones, or it has a limited set bundled in its source tree, in:
postgresql-9.3.3/src/timezone/data/
That's what the error message hints at:
When cross-compiling, either use the option --with-system-tzdata to use existing time-zone data, or set the environment variable ZIC to a zic program to use during the build.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 postgresql: add host-zic dependency
Dear Yann E. MORIN,
Quoted 2 lines · Yann E. MORIN
host-zin only builds the 'zic' program, which pacakge can access using $(ZIC), so host-zip (our package) does not need the tz-data itslef.
Right.
Quoted 4 lines
But postgresql needs the time zone info. It can use either the system ones, or it has a limited set bundled in its source tree, in:
postgresql-9.3.3/src/timezone/data/
What I'm worried about here is *precisely* that even though we build our own host-zic, it might end up time zone infos from the host system. And nowhere we check that these are available/sane/etc.
So I think we should either (1) ensure that PostgreSQL only uses its one limited set of time zone data when --with-system-data is *not* passed, or (2) always build with tzdata.
Quoted 5 lines
That's what the error message hints at:
When cross-compiling, either use the option --with-system-tzdata to use existing time-zone data, or set the environment variable ZIC to a zic program to use during the build.
Yes, I've read this error message. But I'm worried that just pointing ZIC to a zic program is papering over the fact that we in this case rely on the time zone info from the host system.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com