Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building #425

Open
20urc3 opened this issue Sep 19, 2023 · 6 comments
Open

Error when building #425

20urc3 opened this issue Sep 19, 2023 · 6 comments

Comments

@20urc3
Copy link

20urc3 commented Sep 19, 2023

Describe the bug
An error occur when building sgxwallet dependencies with cd scripts; ./build_deps.py; cd ..
gcc: error: unrecognized command line option ‘-m486’

@olehnikolaiev
Copy link
Contributor

hey @20urc3 ! could you please specify which part of the script failed?

@20urc3
Copy link
Author

20urc3 commented Sep 19, 2023

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.

@20urc3
Copy link
Author

20urc3 commented Sep 19, 2023

It seems that running the script is creating the makefile in sgx-gmp, thus adding again the problematic line "-m486"

@20urc3
Copy link
Author

20urc3 commented Sep 19, 2023

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

@20urc3
Copy link
Author

20urc3 commented Sep 19, 2023

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

@olehnikolaiev
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants