What distribution and compiler version are you running? I assume you're running 64-bit userspace on a 64-bit kernel, right? What optimization level is libmthca being built with? - R.