microsoft / malmo

Project Malmo is a platform for Artificial Intelligence experimentation and research built on top of Minecraft. We aim to inspire a new generation of research into challenging new problems presented by this unique environment. --- For installation instructions, scroll down to *Getting Started* below, or visit the project page for more information:
https://www.microsoft.com/en-us/research/project/project-malmo/
MIT License
4.1k stars 600 forks source link

Issue with Malmo Build #893

Open madelynwith5ns opened 4 years ago

madelynwith5ns commented 4 years ago

I'm trying to get set up with malmo. I went into the scripts directory and ran: chmod +x malmo_build.sh to allow executing the script. Then i ran ./malmo_build.sh and got this error:

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_date_time.a(greg_month.o): relocation R_X86_64_PC32 against symbol `_ZTVN5boost9date_time18all_date_names_putINS_9gregorian17greg_facet_configEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEEE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: [Malmo/src/JavaWrapper/CMakeFiles/MalmoJava.dir/build.make:96: Malmo/src/JavaWrapper/libMalmoJava.so] Error 1 make[1]: [CMakeFiles/Makefile2:1341: Malmo/src/JavaWrapper/CMakeFiles/MalmoJava.dir/all] Error 2 make: *** [Makefile:163: all] Error 2

(I tried running ./malmo_build.sh -fPIC but that didn't work at all. Malmo threw invalid option errors for -f, -P, -I, and -C.)

vectorphresh commented 4 years ago

You can try to compile with static boost library installed. On Ubuntu and Fedora, this is a distinct package from the standard libs. Try to recompile after install. After some research online, I also added the below flag to the top level CMakeList.txt, which is supposed to be equivalent to -fPIC.

set( CMAKE_POSITION_INDEPENDENT_CODE ON )

Kathund commented 1 year ago

@MadelynWith5Ns Did u ever find a fix?