More specifically, libffi.pc has: toolexeclibdir=$(libdir)/../lib32 As a result: $ pkg-config --libs libffi -L(libdir)/../lib64 -lffi It should be ${} instead of $().
fixed in -r2
note: this has been reported to libffi-discuss@sourceware.org upstream ML