Now I'm still clueless about how to fix packages that used pg_config --libdir /usr/lib/postgresql10/lib64 there's no pkg-config able to give the right path. pkg-config libpq --libs give only -lpq I understand that I can add -L%{_libdir} but that one will higly depend of alternatives which I estimate a bit fragile.