Here are some tiny patch to fix cross-compilation of squid 3.0.13. Here host is x86_64-pc-linux-gnu and dest is i586-geode-linux-uclibc. There is a first issue with cf_gen. cf_gen is generated with TARGETCXX and should be build with HOSTCXX as it is used on runtime compilation. squid-3.0.13-BJA-cf_gen-HOSTCXX.diff : libtool: link: ( cd ".libs" && rm -f "libauth.la" && ln -s "../libauth.la" "libauth.la" ) /bin/sh ../libtool --tag=CXX --mode=link i586-geode-linux-uclibc-g++ -Wall -Wpointer-arith -Wwrite-strings -fhuge-objects -D_REENTRANT -Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-uclibc/usr/include/ -I/usr/i586-geode-linux-uclibc/include/ -o cf_gen cf_gen.o debug.o time.o globals.o libsquid.la libauth.la -L../lib -lmiscutil -lpthread -lm -lresolv -lnsl -ldl libtool: link: i586-geode-linux-uclibc-g++ -Wall -Wpointer-arith -Wwrite-strings -fhuge-objects -D_REENTRANT -Os -pipe -march=k6-2 -fomit-frame-pointer -I/usr/i586-geode-linux-uclibc/usr/include/ -I/usr/i586-geode-linux-uclibc/include/ -o cf_gen cf_gen.o debug.o time.o globals.o ./.libs/libsquid.a -L/usr/i586-geode-linux-uclibc/bin ./.libs/libauth.a /usr/lib/gcc/i586-geode-linux-uclibc/3.4.6/libstdc++.so -L/usr/i586-geode-linux-uclibc/lib -L/usr/lib/gcc/i586-geode-linux-uclibc/3.4.6 -L/usr/lib/gcc/i586-geode-linux-uclibc/3.4.6/../../../../i586-geode-linux-uclibc/lib -L/usr/i586-geode-linux-uclibc/usr/lib -lgcc_s -lc -L/usr/i586-geode-linux-uclibc/tmp/portage/net-proxy/squid-3.0.13/work/squid-3.0.STABLE13/lib -lmiscutil -lpthread -lm -lresolv -lnsl -ldl -Wl,-rpath -Wl,/usr/lib/gcc/i586-geode-linux-uclibc/3.4.6 -Wl,-rpath -Wl,/usr/lib/gcc/i586-geode-linux-uclibc/3.4.6 ./cf_gen cf.data ./cf.data.depend make[1]: ./cf_gen: Command not found make[1]: *** [cf_parser.h] Error 127 make[1]: Leaving directory `/usr/i586-geode-linux-uclibc/tmp/portage/net-proxy/squid-3.0.13/work/squid-3.0.STABLE13/src' make: *** [all-recursive] Error 1 I did patch src/Makefile.in which is not the perfect way to do that. I failed to implement that in src/Makefile.am. Then, I got many errors about xstr* which are not totaly cast compliant. squid-3.0.13-BJA-util-cast-xstr.diff correct it : x86_64-pc-linux-gnu-g++ -I. -I. -I../include -I../include -I../lib/libTrie/include -DNDEBUG -DBUILD_HOST_TOOL -o cf_gen \ ./cf_gen.cc ../lib/util.c ../lib/assert.c ../lib/util.c: In function 'char* xstrdup(const char*)': ../lib/util.c:758: error: invalid conversion from 'void*' to 'char*' ../lib/util.c: In function 'char* xstrndup(const char*, size_t)': ../lib/util.c:777: error: invalid conversion from 'void*' to 'char*' ../lib/util.c:777: error: initializing argument 1 of 'char* xstrncpy(char*, const char*, size_t)' ../lib/util.c:781: error: invalid conversion from 'void*' to 'char*' ../lib/util.c: In function 'const char* xint64toa(int64_t)': ../lib/util.c:926: warning: format '%lld' expects type 'long long int', but argument 4 has type 'int64_t' ../lib/util.c:926: warning: format '%lld' expects type 'long long int', but argument 4 has type 'int64_t' make[1]: *** [cf_gen] Error 1 make[1]: Leaving directory `/usr/i586-geode-linux-uclibc/tmp/portage/net-proxy/squid-3.0.13/work/squid-3.0.STABLE13/src' make: *** [all-recursive] Error 1 You can see that correct HOSTCXX is used. But my HOSTCXX is gcc 4.3. Patch have been reported upstream. Reproducible: Always Steps to Reproduce: 1. crossdev -t i586-geode-linux-uclibc 2. emerge-wrapper --init 3. i586-geode-linux-uclibc -vat squid
Created attachment 188726 [details, diff] build cf_gen with HOSTCC
Created attachment 188727 [details, diff] avoid gcc-4.3 errors
Created attachment 188728 [details, diff] net-proxy/squid-3.0.13.ebuild
*** Bug 266418 has been marked as a duplicate of this bug. ***
From upstream: No sign of the mentioned report arriving. Anyways... + gcc char*/void* fixes merged upstream for next releases. - gcc PRId64 fix needs more work for upstream use ('long' cast not guaranteed portable) - cf_gen requires Makefile.am fix for upstream use Thank you.
My email is still in moderation upstream. thanks you for the feeback.
Created attachment 189192 [details, diff] build cf_gen with HOSTCC Second try for HOSTCXX correction, this time it imply src/Makefile.am and configure.in and I think/hope is a bit sexyer. This doesn't break compatibily with existant.
Created attachment 189193 [details, diff] net-proxy/squid-3.0.13.ebuild.diff
Fixed in 3.0.14-r1, thanks!