Failed db initialisation

What could be the cause of the following error:

Creating Pg database rt3.
DBD::Pg::db do failed: ERROR: CREATE DATABASE: may not be called in a
transaction block at //opt/rt3/sbin/rt-setup-database line 182,
line 1.
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
DBI connect(‘dbname=rt3;host=localhost’,‘postgres’,…) failed: FATAL
1: Database “rt3” does not exist in the system catalog. at
//opt/rt3/sbin/rt-setup-database line 88
FATAL 1: Database “rt3” does not exist in the system catalog. at
//opt/rt3/sbin/rt-setup-database line 88, line 1.
make: *** [initialize-database] Error 255

This happens during

make initialize-database