-
Notifications
You must be signed in to change notification settings - Fork 3
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
Can't build code on Ubuntu 18.04 #46
Comments
I will fix it soon. The following is the reason why code cannot be built on Ubuntu. [NUM_INSTR ... 255] = 0, is a designated initializer usage which is not supported in g++
reference: https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html I implemented the code in Mac OS, and the reason why it works it that when g++ cmd is executed, actually
|
@QiongwenXu am I correct that the issue is fixed? (I'm yet to check on ubuntu) Please merge everything into master. Once both are done, you could ping @anirudhSK to re-try the build. |
@anirudhSK The issue has been addressed in |
I now get: Makefile:1: ../z3/build/config.mk: No such file or directory The first line in the Makefile "include ../z3/build/config.mk" seems to assume that z3 sources (not just libraries) are available on the system. Maybe we should add the exact dependence on z3 to a README? |
Yes, also the path of z3 folder is fixed to superopt folder Could you please try this
install
Then you can use
to show usage. There is also an example in I will add these into README soon: https://github.com/ngsrinivas/superopt/blob/readme/README.md |
I tried building the code on my Ubuntu 18.04 machine after running apt-get install libz3-dev. Here's the error log:
make
g++ -D_MP_INTERNAL -DNDEBUG -D_EXTERNAL_RELEASE -std=c++11 -fvisibility=hidden -c -mfpmath=sse -msse -msse2 -O3 -Wno-unknown-pragmas -Wno-overloaded-virtual -Wno-unused-value -fPIC -o main_z3.o -I../z3/src/api -I../z3/src/api/c++ main.cc
In file included from measure/common.h:5:0,
from main.cc:12:
measure/../inst.h:40:19: error: expected identifier before numeric constant
#define NUM_INSTR 12
^
measure/../inst.h:99:4: note: in expansion of macro ‘NUM_INSTR’
[NUM_INSTR ... 255] = UNUSED_OPS,
^~~~~~~~~
measure/../inst.h: In lambda function:
measure/../inst.h:99:23: error: expected ‘{’ before ‘=’ token
[NUM_INSTR ... 255] = UNUSED_OPS,
^
measure/../inst.h: At global scope:
measure/../inst.h:84:75: error: no match for ‘operator=’ (operand types are ‘<lambda()>’ and ‘int’)
#define UNUSED_OPS (FSTOP(OP_UNUSED) | SNDOP(OP_UNUSED) | TRDOP(OP_UNUSED))
^
measure/../inst.h:99:25: note: in expansion of macro ‘UNUSED_OPS’
[NUM_INSTR ... 255] = UNUSED_OPS,
^~~~~~~~~~
measure/../inst.h:99:21: note: candidate: <lambda()>&<lambda()>::operator=(const<lambda()>&)
[NUM_INSTR ... 255] = UNUSED_OPS,
^
measure/../inst.h:99:21: note: no known conversion for argument 1 from ‘int’ to ‘const<lambda()>&’
measure/../inst.h:40:19: error: expected identifier before numeric constant
#define NUM_INSTR 12
^
measure/../inst.h:115:4: note: in expansion of macro ‘NUM_INSTR’
[NUM_INSTR ... 255] = 0,
^~~~~~~~~
measure/../inst.h: In lambda function:
measure/../inst.h:115:23: error: expected ‘{’ before ‘=’ token
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h: At global scope:
measure/../inst.h:115:25: error: no match for ‘operator=’ (operand types are ‘<lambda()>’ and ‘int’)
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h:115:21: note: candidate: <lambda()>&<lambda()>::operator=(const<lambda()>&)
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h:115:21: note: no known conversion for argument 1 from ‘int’ to ‘const<lambda()>&’
measure/../inst.h:40:19: error: expected identifier before numeric constant
#define NUM_INSTR 12
^
measure/../inst.h:131:4: note: in expansion of macro ‘NUM_INSTR’
[NUM_INSTR ... 255] = 0,
^~~~~~~~~
measure/../inst.h: In lambda function:
measure/../inst.h:131:23: error: expected ‘{’ before ‘=’ token
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h: At global scope:
measure/../inst.h:131:25: error: no match for ‘operator=’ (operand types are ‘<lambda()>’ and ‘int’)
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h:131:21: note: candidate: <lambda()>&<lambda()>::operator=(const<lambda()>&)
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h:131:21: note: no known conversion for argument 1 from ‘int’ to ‘const<lambda()>&’
measure/../inst.h:40:19: error: expected identifier before numeric constant
#define NUM_INSTR 12
^
measure/../inst.h:147:4: note: in expansion of macro ‘NUM_INSTR’
[NUM_INSTR ... 255] = 0,
^~~~~~~~~
measure/../inst.h: In lambda function:
measure/../inst.h:147:23: error: expected ‘{’ before ‘=’ token
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h: At global scope:
measure/../inst.h:147:25: error: no match for ‘operator=’ (operand types are ‘<lambda()>’ and ‘int’)
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h:147:21: note: candidate: <lambda()>&<lambda()>::operator=(const<lambda()>&)
[NUM_INSTR ... 255] = 0,
^
measure/../inst.h:147:21: note: no known conversion for argument 1 from ‘int’ to ‘const<lambda()>&’
Makefile:7: recipe for target 'main_z3.o' failed
make: *** [main_z3.o] Error 1
The g++ version is 7.4.0. I also tried std=c++14 and std=c++17, but I get the same error.
The text was updated successfully, but these errors were encountered: