Closed optimus1130 closed 8 years ago
fix -- https://github.com/sslab-gatech/opensgx/commit/986a6fd6fc3976d2afc26bdf219c9c393ab82578 Could you check again? Thanks!
still not ok....
In file included from src/malloc/malloc.c:13:0: src/malloc/malloc.c: In function ‘_malloc_init’: ./include/sgx-lib.h:32:5: error: inconsistent operand constraints in an ‘asm’ asm volatile("movl %0, %%eax\n\t" \ ^ src/malloc/malloc.c:64:6: note: in expansion of macro ‘sgx_exit’ sgx_exit(stub->trampoline); ^ make[1]: *\ [src/malloc/malloc.o] Error 1 make[1]: Leaving directory `/home/sijieding/RA/opensgx/libsgx/musl-libc'
I have no experience with inline asm... Would you please give me a hint on what could possibly cause this? a lot of thanks!
Could you check libsgx/musl-libc/include/sgx-lib.h line 35 is there only one underscore after asm? (e.g., _asm ) or two ( asm )?
there are two..
Hmm.. that's weird, at least I cannot reproduce in my environment. Maybe it really has to do with 32-bit platform. Could you try to download musl-libc 1.0.5 (http://www.musl-libc.org/download.html) and compile to see if it works?
thanks any way.... but, after changing the musl-libc to an older version, I still cannot compile this....... sgx-basics.c: In function ‘_enclu’: sgx-basics.c:32:4: error: inconsistent operand constraints in an ‘asm’ asm volatile(".byte 0x0F\n\t" ^ sgx-basics.c:48:9: error: inconsistent operand constraints in an ‘asm’ asm volatile ("movl %%eax, %0\n\t" ^ make: *\ [sgx-basics.o] Error 1 I have no Idea what's happening
Seems to me the compiler you are using doesn't support in-line assembly correctly. Maybe you can try to verify that. (e.g., write a simple c program using inline assemebly)
reinstalled a Ubuntu 64 bit OS. Now it works!!!!!!! Thanks!!
Compile sgx library $ make -C libsgx
I got In file included from src/malloc/malloc.c:13:0: src/malloc/malloc.c: In function ‘_malloc_init’: ./include/sgx-lib.h:32:5: error: inconsistent operand constraints in an ‘asm’ asm volatile("movl %0, %%eax\n\t" \ ^ is it because I'm compiling this project on an 32 bit operating system but running a 64 bit CPU?