exim don't cross-compile correctly as it start by building a tool (buildconfig) which build the configure. As it is used runtime on compilation, it should be build with HOSTCC instead of TARGETCC : make[1]: Entering directory `/usr/i586-geode-linux-uclibc/tmp/portage/mail-mta/exim-4.69/work/exim-4.69/build-exim-gentoo' /bin/sh ../scripts/Configure-os.h /bin/sh ../scripts/Configure-os.c i586-geode-linux-uclibc-gcc buildconfig.c /bin/sh ../scripts/Configure-config.h "make" make[2]: Entering directory `/usr/i586-geode-linux-uclibc/tmp/portage/mail-mta/exim-4.69/work/exim-4.69/build-exim-gentoo' make[2]: `buildconfig' is up to date. make[2]: Leaving directory `/usr/i586-geode-linux-uclibc/tmp/portage/mail-mta/exim-4.69/work/exim-4.69/build-exim-gentoo' /bin/sh: line 77: ./buildconfig: No such file or directory make[1]: *** [config.h] Error 1 make[1]: Leaving directory `/usr/i586-geode-linux-uclibc/tmp/portage/mail-mta/exim-4.69/work/exim-4.69/build-exim-gentoo' make: *** [go] Error 2 exim-BJA-buildconfig-HOSTCC.diff fix that issue really simply. then, exim should depend on virtual/libiconv which is not available on uclibc, so just a thin patch to the dependencie. You still need to export LDFAGS="-liconv" manually (I don't think that should be included in ebuild). >>> exim_checkaccess script built i586-geode-linux-uclibc-gcc exim_dbmbuild.c In file included from exim_dbmbuild.c:33: exim.h:460:19: iconv.h: No such file or directory make[1]: *** [exim_dbmbuild.o] Error 1 make[1]: Leaving directory `/usr/i586-geode-linux-uclibc/tmp/portage/mail-mta/exim-4.69/work/exim-4.69/build-exim-gentoo' make: *** [go] Error 2 Reproducible: Always Steps to Reproduce: 1. crossdev -t i586-geode-linux-uclibc 2. emerge-wrapper --init 3. i586-geode-linux-uclibc -vat exim
Created attachment 188741 [details, diff] build buildconfig using HOSTCC
Created attachment 188743 [details, diff] mail-mta/exim-4.69.ebuild diff
patch exim-BJA-buildconfig-HOSTCC.diff have been reported upstream : http://thread.gmane.org/gmane.mail.exim.devel/3382
Created attachment 188803 [details, diff] mail-mta/exim-4.69.ebuild.diff This also fix building with ldap,sql,ssl support by using propre ROOT and libdir
Reassign to net-mail herd as peitolm retires
ROOT and libdir now handled in exim-4.69-r2, other fixes not yet applied
libiconv issue handled in the ebuild now
(In reply to comment #3) > patch exim-BJA-buildconfig-HOSTCC.diff have been reported upstream : > http://thread.gmane.org/gmane.mail.exim.devel/3382 This patch does not work for me in a non-cross compile setting. Can you explain where HOSTCC is supposed to be coming from? Also, could you please look at the latest version of exim-4.69-r2 to see what you still need?
(In reply to comment #8) > (In reply to comment #3) > > patch exim-BJA-buildconfig-HOSTCC.diff have been reported upstream : > > http://thread.gmane.org/gmane.mail.exim.devel/3382 > > This patch does not work for me in a non-cross compile setting. Can you > explain where HOSTCC is supposed to be coming from? Also, could you please > look at the latest version of exim-4.69-r2 to see what you still need? Ah yes, I always define HOSTCC. This should be the host compiler as 'buildconfig' binary is used runtime during compilation, so it need to be build for the host, not the target. HOSTCC can be define in src_compile anyway, via HOSTCC="$CHOST-gcc" for example.
That's a bit hacky and non-generic, e.g. that won't make the patch acceptable upstream. We probably need a solution where HOSTCC defaults to CC if it isn't set.
HOSTCC & CC are generic in autofoo lands, it would just be import from another land. but this is pretty standart I think Makefile could be like : CC ?= gcc HOSTCC ?= $(CC) Don't you think ?
that would be ok, and then from the ebuild CC is set to the right value because we do emake CC=$(tc-getCC) ... but that still doesn't set HOSTCC to the right compiler if you cross. Does crossdev wrapper facilitate in setting HOSTCC?
(In reply to comment #12) > that would be ok, and then from the ebuild CC is set to the right value because > we do emake CC=$(tc-getCC) ... but that still doesn't set HOSTCC to the right > compiler if you cross. Does crossdev wrapper facilitate in setting HOSTCC? Yes, It define HOSTCC in make.conf : /usr/share/crossdev/etc/make.conf: HOSTCC=__CBUILD__-gcc Replaced after. Also, people cross-compilating generally known that it need to be defined.
Created attachment 281325 [details, diff] exim-4.76.ebuild This patch is a refresh for exim-4.76
Committed in 4.67-r1, thanks for your patience.