I'm trying to build the i386 version of the fontconfig packages, and the configure script fails to find the expat library, which is installed for both architectures. The failing test app build command:
> gcc-4.8 -m32 -o conftest expat.test.c -lexpat
/usr/bin/ld: cannot find -lexpat
collect2: error: ld returned 1 exit status
Exit 1
ldd: ./conftest: No such file or directory
Yet when I pass in the library's full path instead of -lexpat, the command succeeds:
> gcc-4.8 -m32 -o conftest expat.test.c /lib/i386-linux-gnu/libexpat.so.1 ; ldd conftest
linux-gate.so.1 => (0xf7759000)
libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xf76f8000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7549000)
/lib/ld-linux.so.2 (0xf775a000)
The lib32gcc-4.8-dev package is installed.
Could this be related to the fact that I had to make manual i686-linux-gnu-objcopy and ditto-strip symlinks to /usr/bin/{objcopy,strip} and was also missing an i686-linux-gnu-gcc command?