Plethora777 / mcpe_viz

Minecraft Pocket Edition (MCPE) World Visualization & Reporting Tool with Web App
GNU General Public License v2.0
167 stars 39 forks source link

Compilation fails with "leveldb/decompress_allocator.h: No such file or directory" #44

Closed phunni closed 7 years ago

phunni commented 7 years ago

When I try and compile the latest version I get:

`/home/paul/mcpe_viz/mcpe_viz.cc:206:10: fatal error: leveldb/decompress_allocator.h: No such file or directory

include "leveldb/decompress_allocator.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. make[3]: [CMakeFiles/mcpe_viz.dir/build.make:63: CMakeFiles/mcpe_viz.dir/mcpe_viz.cc.o] Error 1 make[3]: Leaving directory '/home/paul/mcpe_viz/build' make[2]: [CMakeFiles/Makefile2:68: CMakeFiles/mcpe_viz.dir/all] Error 2 make[2]: Leaving directory '/home/paul/mcpe_viz/build' make[1]: [Makefile:84: all] Error 2 make[1]: Leaving directory '/home/paul/mcpe_viz/build' make: [Makefile:7: cmakebuild] Error 2 `

Plethora777 commented 7 years ago

Sounds like you need to do a 'git pull' on leveldb-mcpe

phunni commented 7 years ago

I did, but it wouldn't compile, so I downloaded the latest tag. Obviously not new enough...

Plethora777 commented 7 years ago

Tell me what's failing w/ leveldb-mcpe

Plethora777 commented 7 years ago

Should be able to just do a new 'git clone' on the current leveldb-mcpe and be good to go. Might need to fiddle with zlib.h include (just edit the source file to change from zlib/zlib.h to zlib.h)

phunni commented 7 years ago

OK - I'll give that a try. Thanks.

phunni commented 7 years ago

Here's the error - not sure it's to do with a zlib include:

`g++ -DDLLX= -I. -I./include -std=c++0x -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -DLEVELDB_ATOMIC_PRESENT -DSNAPPY -O2 -DNDEBUG -fPIC -c db/snappy_compressor.cc -o out-shared/db/snappy_compressor.o db/snappy_compressor.cc:6:10: fatal error: snappy/snappy.h: No such file or directory

include <snappy/snappy.h>

      ^~~~~~~~~~~~~~~~~

compilation terminated. make: *** [Makefile:414: out-shared/db/snappy_compressor.o] Error 1 `

Plethora777 commented 7 years ago

That's odd - it should not try to compile w/ snappy unless you actually have snappy installed.

Let's try a compilation in a new dir to see how that goes:

mkdir new-leveldb-mcpe cd new-leveldb-mcpe git clone https://github.com/Mojang/leveldb-mcpe.git cd leveldb-mcpe make

If that works (which it should :)) you should remove your old mcpe_viz/leveldb-mcpe/ subdir and create a fresh one.

phunni commented 7 years ago

I managed to get it compiling by simply removing -DSNAPPY and now all is happy!

Plethora777 commented 7 years ago

Super! I'll close this.