awl1
2017-May-25 10:49 UTC
"@LIBICU_CFLAGS@: No such file or directory" during libtool command for lib-fts (cross compile)
Hello, I am a complete newbie to dovecot, but do have reasonable experience in compiling Unix/Linux software. I am currently trying to do a cross-compile of dovecot-2.29.1 to be used on my home office Thecus NAS (host: Thecus kernel 2.6.33 on 32-bit Intel Atom: "i686-nptl-linux-gnu"; my build machine has Ubuntu 16.04.2 LTS) "from ground up", i.e. I need to build and provide all dovecot dependencies from within my module. My compiler toolchain (using gcc-5.2.0) has been set up properly using ct-ng and works completely fine. I also have already successfully cross-compiled/built almost all dovecot dependencies (zlib, bzip2, xz, lz4, openssl-1.0.2, clucene-git, snowball-git, libexttextcat, icu) - i.e. including icu - and installed them properly into my cross-compile build root (/raid/data/module/Dovecot/sys as defined by Thecus module spec). My dovecot configure/make command is as follows: ==export PKG_CONFIG=/usr/bin/pkg-config export PKG_CONFIG_PATH=/raid/data/module/Dovecot/sys/lib/pkgconfig export CC=$HOME/Thecus/n4200pro-5.2.0-toolchain/i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu-gcc export CFLAGS="" export LDFLAGS="-L/raid/data/module/Dovecot/sys/lib -Wl,-rpath,/raid/data/module/Dovecot/sys/lib" export LIBS="" # -llib export CPPFLAGS=-I/raid/data/module/Dovecot/sys/include export CPP=$HOME/Thecus/n4200pro-5.2.0-toolchain/i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu-cpp export CXX=$HOME/Thecus/n4200pro-5.2.0-toolchain/i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu-g++ export CXXFLAGS="" export LT_SYS_LIBRARY_PATH=/raid/data/module/Dovecot/sys/lib export CXXCPP=$HOME/Thecus/n4200pro-5.2.0-toolchain/i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu-cpp ./configure --host i686-nptl-linux-gnu \ --prefix=/raid/data/module/Dovecot/sys \ --libdir=/raid/data/module/Dovecot/sys/lib \ --localstatedir=/raid/data/module/Dovecot/com \ --sharedstatedir=/raid/data/module/Dovecot/var \ --disable-silent-rules \ --with-notify=inotify \ --with-lucene \ --with-stemmer \ --with-textcat \ --with-icu \ --with-solr \ --with-zlib \ --with-bzlib \ --with-lzma \ --with-ssl=openssl \ --with-ssldir=/raid/data/module/Dovecot/sys/etc/ssl \ --with-storages=mdbox,sdbox,maildir,mbox,cydir,imapc,pop3c \ --with-moduledir=/raid/data/module/Dovecot/sys \ --with-gnu-ld \ --with-sysroot=/raid/data/module/Dovecot/sys \ --with-libiconv-prefix=/raid/data/module/Dovecot/sys \ --with-libintl-prefix=/raid/data/module/Dovecot/sys make == and completes configuration just fine, but the make step runs into the following issue which I am unable to resolve even after several hours of investigation, so I am completely stuck at this point... :-( ==(...) make[3]: Leaving directory '/home/andreas/Thecus/Dovecot/dovecot-2.2.29.1/src/lib-dovecot' Making all in lib-fts make[3]: Entering directory '/home/andreas/Thecus/Dovecot/dovecot-2.2.29.1/src/lib-fts' make all-am make[4]: Entering directory '/home/andreas/Thecus/Dovecot/dovecot-2.2.29.1/src/lib-fts' /bin/bash ../../libtool --tag=CC --mode=compile /home/andreas/Thecus/n4200pro-5.2.0-toolchain/i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -I../../src/lib-mail -I../../src/lib-fts -I/raid/data/module/Dovecot/sys/include/libexttextcat/ @LIBICU_CFLAGS@ -DUDHRDIR=\""../../src/lib-fts"\" -DDATADIR=\"/raid/data/module/Dovecot/sys/share/dovecot\" -DTEST_STOPWORDS_DIR=\""../../src/lib-fts/stopwords"\" -I/raid/data/module/Dovecot/sys/include -std=gnu99 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/raid/data/module/Dovecot/sys/include -MT fts-filter.lo -MD -MP -MF .deps/fts-filter.Tpo -c -o fts-filter.lo fts-filter.c libtool: compile: /home/andreas/Thecus/n4200pro-5.2.0-toolchain/i686-nptl-linux-gnu/bin/i686-nptl-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -I../../src/lib-mail -I../../src/lib-fts -I/raid/data/module/Dovecot/sys/include/libexttextcat/ @LIBICU_CFLAGS@ -DUDHRDIR=\"../../src/lib-fts\" -DDATADIR=\"/raid/data/module/Dovecot/sys/share/dovecot\" -DTEST_STOPWORDS_DIR=\"../../src/lib-fts/stopwords\" -I/raid/data/module/Dovecot/sys/include -std=gnu99 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/raid/data/module/Dovecot/sys/include -MT fts-filter.lo -MD -MP -MF .deps/fts-filter.Tpo -c fts-filter.c -fPIC -DPIC -o .libs/fts-filter.o i686-nptl-linux-gnu-gcc: error: @LIBICU_CFLAGS@: No such file or directory Makefile:714: recipe for target 'fts-filter.lo' failed make[4]: *** [fts-filter.lo] Error 1 make[4]: Leaving directory '/home/andreas/Thecus/Dovecot/dovecot-2.2.29.1/src/lib-fts' Makefile:562: recipe for target 'all' failed == As far as I can tell, my pkgconfig file (/raid/data/module/Dovecot/sys/lib/pkgconfig/icu-i18n.pc) also seems to be fine: ==# Copyright (C) 2016 and later: Unicode, Inc. and others. # License & terms of use: http://www.unicode.org/copyright.html # Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved. # CFLAGS contains only anything end users should set CFLAGS # CXXFLAGS contains only anything end users should set CXXFLAGS = -std=c++11 # DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h DEFS prefix = /raid/data/module/Dovecot/sys exec_prefix = ${prefix} #bindir = ${exec_prefix}/bin libdir = ${exec_prefix}/lib includedir = ${prefix}/include baselibs = -lpthread -ldl -lm #datarootdir = ${prefix}/share #datadir = ${datarootdir} #sbindir = ${exec_prefix}/sbin #mandir = ${datarootdir}/man #sysconfdir = ${prefix}/etc UNICODE_VERSION=9.0 ICUPREFIX=icu ICULIBSUFFIXLIBICU=lib${ICUPREFIX} #SHAREDLIBCFLAGS=-fPIC pkglibdir=${libdir}/icu${ICULIBSUFFIX}/59.1 #pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/59.1 ICUDATA_NAME = icudt59l #ICUPKGDATA_DIR=${exec_prefix}/lib #ICUDATA_DIR=${pkgdatadir} ICUDESC=International Components for Unicode Version: 59.1 Cflags: -I${includedir} # end of icu.pc.in Description: International Components for Unicode: Internationalization library Name: icu-i18n Requires: icu-uc Libs: -licui18n == Note that even adding a line stating LIBICU_CFLAGS=-I/raid/data/module/Dovecot/sys/include (just in order to set it to any non-null value) to the icu-i18n.pc file and/or setting an environment variable export LIBICU_CFLAGS=-I/raid/data/module/Dovecot/sys/include before running configure does NOT help to get rid of the above error... So do you have any idea why variable substitution for LIBICU_CFLAGS does not work, and what could be done to work around this? Many thanks in advance for your kind help with this! Best regards, Andreas awl1 at gmx.net
awl1
2017-May-25 21:43 UTC
[Resolved] Re: "@LIBICU_CFLAGS@: No such file or directory" during libtool command for lib-fts (cross compile)
Sorry, Am 25.05.2017 um 12:49 schrieb awl1:> So do you have any idea why variable substitution for LIBICU_CFLAGS > does not work, and what could be done to work around this?after some more hours of investigation I have to apologize: The issue turned out to be a combination of my fault (I had modified configure.ac and intoduced a small but subtle bug) and tricky autoconf behavior when it cannot properly locate pkgconfig files... Switched back to the tarball version of the configure script, and everything is fine now with the following configure parameters: ==./configure --host i686-nptl-linux-gnu \ --prefix=/raid/data/module/Dovecot/sys \ --libdir=/raid/data/module/Dovecot/sys/lib \ --localstatedir=/raid/data/module/Dovecot/var \ --sharedstatedir=/raid/data/module/Dovecot/var/lib \ --disable-silent-rules \ --with-notify=inotify \ --with-lucene \ --with-stemmer \ --with-textcat \ --with-icu \ --with-solr \ --with-zlib \ --with-bzlib \ --with-lzma \ --with-ssl=openssl \ --with-ssldir=/raid/data/module/Dovecot/sys/etc/ssl \ --with-storages=mdbox,sdbox,maildir,mbox,cydir,imapc,pop3c \ --with-moduledir=/raid/data/module/Dovecot/sys/lib/dovecot/modules \ --with-gnu-ld \ --disable-static == Now everything compiled and installed fine - will try to run the newly created dovecot binary on my NAS box tomorrow... ;-) Sorry for the noise & best regards Andreas
Reasonably Related Threads
- 2nd try: Lots of RPC-related compile errors (conflicting types, too many arguments, ...) trying to update Samba from 3.5 to 4.6
- Lots of RPC-related compile errors (conflicting types, too many arguments, ...) trying to update Samba from 3.5 to 4.6
- Friendly Reminder: Huge number of small files performance regression from 3.5.16 to 4.6.5 with identical smb.conf
- [PATCH]: libexttextcat from libreoffice
- Friendly Reminder: Would you please comment on my findings?