sgxwallet
sgxwallet copied to clipboard
Error when building
Describe the bug An error occur when building sgxwallet dependencies with cd scripts; ./build_deps.py; cd .. gcc: error: unrecognized command line option ‘-m486’
hey @20urc3 ! could you please specify which part of the script failed?
Sure, when building dependencies with the scripts build_deps.py (in /scripts) it errors gcc: error: unrecognized command line option ‘-m486’
In /sgxwallet/sgx-gmp/mpn/Makefile
There is the line CFLAGS_CPU = -mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486
-m486 is outdated since a very longtime, just remove it.
However, the problem persist.
It seems that running the script is creating the makefile in sgx-gmp, thus adding again the problematic line "-m486"
The exact part of the script that create issue:
assert subprocess.call(["bash", "-c", "./configure --prefix=" + TGMP_BUILD_DIR + " --disable-shared --enable-static --with-pic --enable-sgx --with-sgxsdk=" + SDK_DIR + "/sgxsdk"]>
assert subprocess.call(["make", "install"]) == 0
assert subprocess.call(["make", "clean"]) == 0
My workaround was to comment the part i mentionned above. Then i use this command to remove "-m486" from configure and makefile: sed -i 's/-m486//g' filename
and then I run that script inside sgx-gmp instead:
import sys
import os
import subprocess
os.chdir("..")
topDir = os.getcwd()
os.chdir("sgx-gmp")
TGMP_BUILD_DIR = topDir + "/tgmp-build"
SDK_DIR = topDir + "/sgx-sdk-build"
assert subprocess.call(["bash", "-c", "./configure --prefix=" + TGMP_BUILD_DIR + " --disable-shared --enable-static --with-pic --enable-sgx --with-sgxsdk=" + SDK_DIR + "/sgxsdk"]) == 0
assert subprocess.call(["make", "install"]) == 0
assert subprocess.call(["make", "clean"]) == 0
@20urc3 sorry I wasn't able to reproduce your issue yet. could you please tell what is your machine configuration? uname -a
and lsb_release -a