facebookresearch / phyre

PHYRE is a benchmark for physical reasoning.
https://phyre.ai
Apache License 2.0
430 stars 61 forks source link

Unable to build from source #73

Closed ZhiyuanChen closed 2 years ago

ZhiyuanChen commented 2 years ago

system: Python: 3.9 thrift: 1.7.0

output:

[ 98%] Built target task_validation_test
/usr/bin/ld: /opt/conda/lib/libthrift.a(TBufferTransports.o): relocation R_X86_64_PC32 against symbol `_ZTVN6apache6thrift9transport19TTransportExceptionE' 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[3]: *** [CMakeFiles/simulator_bindings.dir/build.make:95: ../src/python/phyre/simulator_bindings.cpython-39-x86_64-linux-gnu.so] Error 1
make[3]: Leaving directory '/home/v-zhichen/phyre/cmake_build'
make[2]: *** [CMakeFiles/Makefile2:575: CMakeFiles/simulator_bindings.dir/all] Error 2
make[2]: Leaving directory '/home/v-zhichen/phyre/cmake_build'
make[1]: *** [Makefile:141: all] Error 2
make[1]: Leaving directory '/home/v-zhichen/phyre/cmake_build'
make: *** [Makefile:27: compile] Error 2
ZhiyuanChen commented 2 years ago

solved, when install thrift, make sure to use ./configure CFLAGS=-fPIC CXXFLAGS=-fPIC to configure before make