CFLAGS=-I/smdk/usr/include LDFLAGS='-L/smdk/lib -L/smdk/usr/lib' CBUILD=i686-pc-linux-gnu PORTAGE_CONFIGROOT=/smdk/ ROOT=/smdk CHOST=arm-unknown-linux-gnu emerge -1 jpeg ... creating jconfig.h ./libtool-wrap --mode=compile arm-unknown-linux-gnu-gcc -I/smdk/usr/include -I. -c ./jcapimin.c ./libtool-wrap --mode=compile arm-unknown-linux-gnu-gcc -I/smdk/usr/include -I. -c ./jcapistd.c libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag' make: *** [jcapistd.lo] Error 1 make: *** Waiting for unfinished jobs.... libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag' make: *** [jcapimin.lo] Error 1 !!! ERROR: media-libs/jpeg-6b-r7 failed. Call stack: ebuild.sh, line 1614: Called dyn_compile ebuild.sh, line 971: Called qa_call 'src_compile' environment, line 3361: Called src_compile jpeg-6b-r7.ebuild, line 34: Called die The problem was that it tried to use system's libtool (which was for i686-pc-linux-gnu). Removing the patch from patchset makes it work. Is it possible to remove that patch from the patchset?
Eh, it's not crosscompile-specific at all, there's tons of duplicates [1] for this issue without any crosscompile, because LIBTOOL is missing --tag=CC in Makefile... [1] http://tinyurl.com/356tef
I should have said clearer. I knew about --tag=CC but after i patched it to support --tag=CC it still failed because it tried to use i686-pc-linux-gnu-gcc as linker.
removing the patch to satisfy the cross-compiling crowd isnt really worth it better to just redo the whole build system ... but that gets us back to the fact that the jpeg package has a friggin dead upstream
*** Bug 185157 has been marked as a duplicate of this bug. ***
I have exactly the same problem when cross compiling media-libs/jpeg-6b-r8. After a quick look at patch applied to libjpeg it seems that this pacth: 06_all_jpeg-libtool.patch is responsible of the bug. As a matter of fact, if I use ./libtool in libtool-wrapper instead of libtool, everything is ok. So I suggest to modify the patch to use ./libtool in libtool-wrapper.
Try >=media-libs/jpeg-7, appears to have more recent autotools ...