Use of builtin timezones does not work on Linux

Milan Crha mcrha at redhat.com
Mon Aug 24 03:42:48 EDT 2020


On Sat, 2020-08-15 at 10:52 -0400, Allen Winter wrote:
> In the current 3.0 and master branches I see:
> set(PACKAGE_DATA_DIR "\\\"${CMAKE_INSTALL_PREFIX}/share/libical\\\"")
> 
> Your test program with Fedora32 (compiled exactly as you show):
> $ ./icaltz
> main: tz:0x775078 id:'/freeassociation.sourceforge.net/Indian/Cocos'
> 
> I don't know why you have a different setting for PACKAGE_DATA_DIR

	Hi,
the Fedora 32 package does not configure libical with
-DUSE_BUILTIN_TZDATA=ON, which is the reason why it works for you.

Try this:

   $ cd /tmp
   $ git clone --depth=1 https://github.com/libical/libical.git
   $ cd libical && \
     mkdir _build && \
     cd _build && \
     cmake -DCMAKE_INSTALL_PREFIX=/tmp/libical-inst/ \
           -DCMAKE_BUILD_TYPE=Debug \
           -DCMAKE_INSTALL_LIBDIR:PATH=/tmp/libical-inst/lib \
           -DGOBJECT_INTROSPECTION=ON \
           -DUSE_BUILTIN_TZDATA=ON \
           -DICAL_GLIB_VAPI=ON \
           -G "Unix Makefiles" \
           .. && \
     make && make install
   $ cd /tmp (and create the icaltz.c file here)
   $ export PKG_CONFIG_PATH=/tmp/libical-inst/lib/pkgconfig
   $ export LD_LIBRARY_PATH=/tmp/libical-inst/lib
   $ gcc `pkg-config --cflags --libs libical` icaltz.c -g -O0 -o icaltz && ./icaltz

You can verify with `ldd icaltz`, which libical libraries are loaded.

	Bye,
	Milan




More information about the libical-devel mailing list