Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

build errors #3

Open
sguillia opened this issue Oct 27, 2019 · 1 comment
Open

build errors #3

sguillia opened this issue Oct 27, 2019 · 1 comment

Comments

@sguillia
Copy link

Problem 1

$ go build
# _/.../go-z3
./error.go:53:20: could not determine kind of name for C.Z3_get_error_msg_ex

Solution: rename C.Z3_get_error_msg_ex to C.Z3_get_error_msg

Problem 2

$ go build
# _/.../go-z3
/usr/bin/ld: ./libz3.a(hwf.o): référence au symbole non défini « fma@@GLIBC_2.2.5 »
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO manquant dans la ligne de commande
collect2: error: ld returned 1 exit status

Solution:

$ ln -s vendor/z3/build/libz3.so ./

$ cat z3.go.patch
-// #cgo LDFLAGS: ${SRCDIR}/libz3.a -lstdc++
+// #cgo LDFLAGS: ${SRCDIR}/libz3.so -lstdc++

Problem 3

$ go build
# _/.../go-z3-fork
./model.go:37:101: cannot convert _Ciconst_Z3_TRUE (type untyped number) to type _Ctype__Bool
./model.go:37:101: invalid operation: (func literal)() != _Ciconst_Z3_TRUE (mismatched types _Ctype__Bool and int)
./model.go:37:57: cannot use _Ciconst_Z3_TRUE (type int) as type _Ctype__Bool in assignment
./optimize.go:73:34: not enough arguments in call to _Cfunc_Z3_optimize_check
	have (_Ctype_Z3_context, _Ctype_Z3_optimize)
	want (*_Ctype_struct__Z3_context, *_Ctype_struct__Z3_optimize, _Ctype_uint, *_Ctype_Z3_ast)

Solution: don't know 😕

@LuneRemer
Copy link

i'm having same problem @sguillia. Did you fix it?

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

No branches or pull requests

2 participants