as I recall, the blockchain database uses leveldb, but the wallet uses bdb. So if you build with a different bdb version and then create and uses a wallet with that version, then your wallet cannot be opened with a standard ( bdb v4.8 ) version of bitcoin-core. This could be an issue for you years down the road, when maybe you are trying to restore the wallet on some other computer/os.