z3py on MacOSX: cannot get a model
Question: I am seeing a strange problem with z3py on Mac, was wondering if anyone has
seen this before:

    
    
    $ cat bug.py
    from z3 import *       
    x = Int('x')
    s = Solver()
    s.add(x > 5)
    print(s.check())
    print(s.model())
    $ python bug.py
    sat
    [x = ]
    

The value of x is missing from the model. I tried both master and unstable
branches with the same result. However, z3 itself does give the correct model
if run on a similar .smt2 file. My configuration is Mac OSX 10.6.8, Python
2.7.4.


Answer: The problem is very specific for my setup, but maybe someone will run into it
as well: the root cause is that a wrong version of libgomp was picked up by
the dynamic loader -- i.e. the versions used to compile and to run do not
match.

Here is a more severe manifestation of this issue:

    
    
    $ python
    Python 2.7.4 (default, May  9 2013, 18:51:46)
    [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from z3 import *
    >>> IntVal(1)
    
    >>>
    

The numeric value is not printed, i.e. the correct output is

    
    
    >>> IntVal(1)
    1
    >>>
    

Setting DYLD_LIBRARY_PATH to point to the correct version of the library fixes
the issue.

