Building apr-util-1.5.4 resulted in the error, ld: unrecognized option '--dynamic' The gcc command line included -Wl,--dynamic-linker Which had been transformed into -Wl,--dynamic The culprit was the following ind build/dbd.m4 mysql_LDFLAGS="`MYSQL_CONFIG --libs_r | sed -e 's/-l[^ ]\+//g'`" One fix possible fix (maybe not the best): mysql_LDFLAGS="`MYSQL_CONFIG --libs_r | sed -e 's/\s-l[^ ]\+//g'`"