The bogus '-L' flag without a directory comes from /usr/lib/pkgconfig/libprojectM.pc. In other words, that file is corrupt. You can check: pkg-config --libs libprojectM you're right, changing /usr/lib/pkgconfig/libprojectM.pc prefix=/usr exec_prefix=/usr libdir= includedir=/usr/include pkgdatadir=/...