First deinstall sysutils/bareos-server before trying again.
It seems that bareos-server-17.2.5_1 builds fine
http://beefy5.nyi.freebsd.org/data/latest-per-pkg/bareos-server/17.2.5_1/104i386-default.log
http://beefy6.nyi.freebsd.org/data/latest-per-pkg/bareos-server/17.2.5_1/104amd64-default.log
Yes, it should work since the problematic libbareos.so is provided by sysutils/bareos-client.I would delete the old packages first;pkg delete bareos\*
. Don't worry about your configuration files, they will remain in place.
I suspect it's trying to build the new server version using libraries from the old client.