Closed QianNangong closed 6 years ago
Thank you for the report. This may be related to #2.
LOL, do I understand it correctly that you are trying to build RetDec on an IBM mainframe? We have never really tried to build it on anything other than x86, but ok, we can give it a shot.
I fixed #2, but I don't think this will help you.
Lets cut the middleman - do not build entire RetDec, try to build LLVM repo itself:
git clone https://github.com/avast-tl/llvm.git
cd llvm
mkdir build && cd build
cmake ..
make
This should fail with the same message you got before in the cmake ..
step.
Now, there are 2 possibilities:
faster-build-2
branch (merged to master
) screwed something up. Hopefully we can fix this.Find out which one it is - get to the state before the faster-build-2
merge and try to build it. If it passes, we removed something that we should not. If it fails, it never worked.
git clone https://github.com/avast-tl/llvm.git
cd llvm
git checkout e7431aa
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_INCLUDE_TESTS=NO -DLLVM_REQUIRES_RTTI=YES -DLLVM_ENABLE_TERMINFO=YES -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_UTILS=OFF -DLLVM_BUILD_RUNTIME=OFF -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 -DPYTHON_EXECUTABLE=/usr/bin/python3
make
I don't know if setting PYTHON_EXECUTABLE
is really required on you system, but set it to the absolute path to your python3
just to be sure.
Let us know what happened and we will take it from there.
Thanks! I'll have a try.
If step 5. fails, you can also try it with the initial commit (it has slightly different directory and CMake structure compared to the current state - no need for all those defines in cmake ..
):
git clone https://github.com/avast-tl/llvm.git
cd llvm
git checkout 4876ee1
mkdir build && cd build
cmake ..
make
Step 5 does work, I can build a working LLVM on the machine.
Ok, I will try to inspect the changes I made and identify possible causes. However, I'm not able to reproduce this, so it won't be easy.
It occurs only when commit fdabb615a3c221aa31205064d13ad21583e1540d is applied. Any commits older than 18fa1af4afc0c3cbb296b8307df20ad1dc795279 will work.
Ok, thanks.
Try this for the current master
:
git clone https://github.com/avast-tl/llvm.git
cd llvm
mkdir build && cd build
cmake .. -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 -DLLVM_TARGET_ARCH=X86
make
It works, thank you! Should I close this issue?
No, this was just a test that we found the problem. I will make this change directly in LLVM's CMake and update the reference to LLVM in the main RetDec repository. Then, you won't have to define it every time you build. I will close the issue after.
Thank you for helping us identify this problem. Like i said, we have never tried it on other architectures, so I'm not sure it will work and you won't encounter some other problems.
Thanks for your hard work.
Is your system (s390x) big endian? My colleague says he would be very surprised if everything worked ok :-D If you encounter other problems, please report them. Also it would be amazing if you were able to run regression tests and let us know if something fails - upload the log to a new issue. Then we would at least know we have a problem.
Summary of what happened here:
x86
from libs/Target
. We don't actually need the x86
but it is too hard to hack LLVM to build without any targets.-DLLVM_TARGETS_TO_BUILD=X86
.LLVM_TARGETS_TO_BUILD
.x86
systems, the native target is x86
and everything is OK.s390x
that got translated to SystemZ
, and cmake ..
failed because module for this target was removed.x86
to LLVM_TARGET_ARCH
. This variable is used to generate LLVM_NATIVE_ARCH
. Now, x86
module is used on all systems.Yes, the system is big endian. I'm building the RetDec Regression Tests Framework to test if it really works.
Steps to reproduce
Output
Environment
SUSE Linux Enterprise Server 12 SP3 (s390x)