Problem With Compiling On -Dtools Option


On first - sorry if that post is not in this category what should - and for my English. /emoticons/default_smile.png

I have problem with compiling TrinityCore using option -DTOOL when set up that option on cmake config then compiler show me error:


Linking CXX executable worldserver

[ 98%] Built target worldserver

Scanning dependencies of target mapextractor

[ 98%] Building CXX object src/tools/map_extractor/CMakeFiles/mapextractor.dir/dbcfile.cpp.o

[ 98%] Building CXX object src/tools/map_extractor/CMakeFiles/mapextractor.dir/loadlib.cpp.o

[ 99%] Building CXX object src/tools/map_extractor/CMakeFiles/mapextractor.dir/adt.cpp.o

[ 99%] Building CXX object src/tools/map_extractor/CMakeFiles/mapextractor.dir/System.cpp.o

[ 99%] Building CXX object src/tools/map_extractor/CMakeFiles/mapextractor.dir/wdt.cpp.o

[ 99%] Building CXX object src/tools/map_extractor/CMakeFiles/mapextractor.dir/mpq_libmpq.cpp.o

Linking CXX executable mapextractor

…/…/…/dep/libmpq/libmpq.a(extract.c.o): In function `libmpq__decompress_bzip2’:

extract.c:(.text+0xad): undefined reference to `BZ2_bzDecompressInit’

extract.c:(.text+0xdc): undefined reference to `BZ2_bzDecompress’

extract.c:(.text+0xed): undefined reference to `BZ2_bzDecompressEnd’

…/…/…/dep/libmpq/libmpq.a(extract.c.o): In function `libmpq__decompress_zlib’:

extract.c:(.text+0x1f9): undefined reference to `inflateInit_’

extract.c:(.text+0x214): undefined reference to `inflate’

extract.c:(.text+0x225): undefined reference to `inflateEnd’

collect2: ld returned 1 exit status

make[2]: *** [src/tools/map_extractor/mapextractor] Error 1

make[1]: *** [src/tools/map_extractor/CMakeFiles/mapextractor.dir/all] Error 2

make: *** [all] Error 2[/CODE]

all tools about bzip2 and zlib is installed. Cmake found everything.

I’m using:

Distributor ID: Ubuntu

Description: Ubuntu 11.10

Release: 11.10

Codename: oneiric

If do not set up option -DTOOL=1 on cmake configuration . Then compiling everything well 100% Complete, but dont working without maps.

Show Wiki

Installing libMPQ (MoPaQ) MPQ-reader library

Installation of the libMPQ library is only required if you want to extract the datafiles, and/or compile the tools.

Do note that the library has been hardlinked to the binary in later revisions, and is not “enforced” unless the tools are required.

Configuring, compiling and installing libMPQ

IMPORTANT : If you are the owner of the machine, and at this stage want the MPQ-library to be available for other users on your Linux-machine (and also making it easier for yourself at later stages), please follow alternative 2

Change directory to ~/TrinityCore/dep/libmpq/ before doing this

Alternative 1 : Local installation

sh ./

./configure --prefix=/home//.sys/


make install

Again, replace with the username you chose when creating the account.

Alternative 2 : Systemwide installation

sh ./



sudo make install

As stated above, alternative 2 will build the library as a user without any specific privileges, and then install it into /usr/local as root (the superuser), reachable for other users that wish to use it for their own projects.

It is safe to allow this library to be installed systemwide.

Or disable the Tools.


Thanks for the explanation - I did according to ( and I used the version of libMPQ Systemwide Installation because I am "owner of the machine" . /emoticons/default_smile.png

When I am giving without this option -DTOOL=false then all compilation is running impeccably … but how now to get the map without tools?

Actually, it refers to a missing bzip2.a/ file (static link library), maybe CMAKE just did not find it, its not marked as REQUIRED in the CMakeLists.txt: find_package(BZip2)

I think this is the same:

Yes, it is the same problem.

please someone share compiled vmap4extractor.exe[SIZE=12px][FONT=sans-serif], [/FONT][/SIZE]vmap4assembler.exe please

sorry for off-top


Stop asking multiple times.

This has been fixed in