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

debug build fails #38

Closed
ice-phoenix opened this issue Apr 13, 2015 · 4 comments
Closed

debug build fails #38

ice-phoenix opened this issue Apr 13, 2015 · 4 comments

Comments

@ice-phoenix
Copy link

When trying to compile z3 (unstable branch) with mk_make.py -d, it fails with:

g++ -o z3  shell/main.o shell/dimacs_frontend.o shell/z3_log_frontend.o shell/mem_initializer.o shell/datalog_frontend.o shell/smtlib_frontend.o shell/install_tactic.o shell/gparams_register_modules.o api/api.a parsers/smt/smtparser.a tactic/portfolio/portfolio.a tactic/ufbv/ufbv_tactic.a tactic/smtlogics/smtlogic_tactics.a muz/fp/fp.a muz/duality/duality_intf.a muz/bmc/bmc.a muz/tab/tab.a muz/clp/clp.a muz/pdr/pdr.a muz/rel/rel.a muz/transforms/transforms.a muz/base/muz.a duality/duality.a qe/qe.a tactic/sls/sls_tactic.a tactic/fpa/fpa_tactics.a smt/tactic/smt_tactic.a tactic/bv/bv_tactics.a smt/user_plugin/user_plugin.a smt/smt.a smt/proto_model/proto_model.a smt/params/smt_params.a ast/rewriter/bit_blaster/bit_blaster.a ast/pattern/pattern.a ast/macros/macros.a ast/fpa/fpa.a ast/simplifier/simplifier.a ast/proof_checker/proof_checker.a parsers/smt2/smt2parser.a cmd_context/extra_cmds/extra_cmds.a cmd_context/cmd_context.a interp/interp.a solver/solver.a tactic/aig/aig_tactic.a math/subpaving/tactic/subpaving_tactic.a nlsat/tactic/nlsat_tactic.a tactic/arith/arith_tactics.a sat/tactic/sat_tactic.a tactic/core/core_tactics.a math/euclid/euclid.a math/grobner/grobner.a parsers/util/parser_util.a ast/substitution/substitution.a tactic/tactic.a model/model.a ast/normal_forms/normal_forms.a ast/rewriter/rewriter.a ast/ast.a math/subpaving/subpaving.a math/realclosure/realclosure.a math/interval/interval.a math/hilbert/hilbert.a nlsat/nlsat.a sat/sat.a math/polynomial/polynomial.a util/util.a  -lpthread -Wl,-O1,--sort-common,--as-needed,-z,relro -fopenmp -lrt
parsers/smt/smtparser.a(smtparser.o): In function `proto_region::~proto_region()':
smtparser.cpp:(.text._ZN12proto_regionD2Ev[_ZN12proto_regionD5Ev]+0x12a): undefined reference to `region::reset()'
parsers/smt/smtparser.a(smtparser.o): In function `smtparser::make_expression(symbol_table<idbuilder*>&, proto_expr*, obj_ref<expr, ast_manager>&)':
smtparser.cpp:(.text._ZN9smtparser15make_expressionER12symbol_tableIP9idbuilderEP10proto_exprR7obj_refI4expr11ast_managerE[_ZN9smtparser15make_expressionER12symbol_tableIP9idbuilderEP10proto_exprR7obj_refI4expr11ast_managerE]+0x50): undefined reference to `region::region()'
parsers/smt/smtparser.a(smtparser.o): In function `smtparser::read_patterns(unsigned int, symbol_table<idbuilder*>&, proto_expr* const*&, ref_buffer<expr, ast_manager, 16u>&, ref_buffer<expr, ast_manager, 16u>&, int&, symbol&, symbol&)':
smtparser.cpp:(.text._ZN9smtparser13read_patternsEjR12symbol_tableIP9idbuilderERPKP10proto_exprR10ref_bufferI4expr11ast_managerLj16EESE_RiR6symbolSH_[_ZN9smtparser13read_patternsEjR12symbol_tableIP9idbuilderERPKP10proto_exprR10ref_bufferI4expr11ast_managerLj16EESE_RiR6symbolSH_]+0x8e): undefined reference to `region::region()'
parsers/smt/smtparser.a(smtparser.o): In function `smtparser::parse_string(char const*)':
smtparser.cpp:(.text._ZN9smtparser12parse_stringEPKc[_ZN9smtparser12parse_stringEPKc]+0x1f0): undefined reference to `region::region()'
parsers/smt/smtparser.a(smtparser.o): In function `smtparser::parse_stream(std::istream&)':
smtparser.cpp:(.text._ZN9smtparser12parse_streamERSi[_ZN9smtparser12parse_streamERSi]+0x42): undefined reference to `region::region()'
collect2: error: ld returned 1 exit status
Makefile:3216: recipe for target 'z3' failed
make: *** [z3] Error 1
@wintersteiger
Copy link
Contributor

This looks like you might have some stale object files in the build directory. Can you please retry with a completely fresh build directory? Also, what's your system configuration, OS and g++ version, etc.

@ice-phoenix
Copy link
Author

[ice-phoenix@niobium ~]$ uname -a
Linux niobium.local 3.19.2-1-ARCH #1 SMP PREEMPT Wed Mar 18 16:21:02 CET 2015 x86_64 GNU/Linux
[ice-phoenix@niobium ~]$ g++ --version
g++ (GCC) 4.9.2 20150304 (prerelease)

@wintersteiger
Copy link
Contributor

This looks like a linker bug to me. The function region::reset() is an inline function in region.h:42 which is where it should be. Potentially also a misconfiguration problem when enabling -d because in debug mode this function is inline, while in release mode it's defined in region.cpp.

@ice-phoenix
Copy link
Author

After trying with a clean build directory, everything compiled successfully. It does look like some of the libs were left from the previous compilation and were not recompiled with -d. Cheers!

NikolajBjorner added a commit to NikolajBjorner/z3 that referenced this issue Dec 15, 2016
* local changes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add bound extraction for variables

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding fixed equality propagation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding fixed equality propagation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding fixed equality propagation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding bounds propagation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add eager bounds propagation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add configuration parameters for LP solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* remove wrong assert

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix wrong assert

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add timeout, signals to interface

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add stats

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* getting rid of typename

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* outline compound bound propagation functionality

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* disable repropagation on pop

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add compound bound propagation code, remains disabled

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* stronger ad-hoc bounds propagation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* stronger ad-hoc bounds propagation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* merge

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* adding validation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* check assignments and conflicts

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* check assignments and conflicts

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
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