Closed dragazo closed 1 month ago
I've uninstalled and reinstalled the latest version of Z3 (built from source for my 64-bit target), but the issue persists. The fact that it's mentioning it failed to find gnu/stubs-32.h
seems telling, because that's only included on 32-bit targets (which mine is not)...
Content of stubs.h
:
#if !defined __x86_64__
# include <gnu/stubs-32.h>
#endif
#if defined __x86_64__ && defined __LP64__
# include <gnu/stubs-64.h>
#endif
#if defined __x86_64__ && defined __ILP32__
# include <gnu/stubs-x32.h>
#endif
Digging into it a bit more, I found out the target arch bindgen was deducing was riscv32-esp-unknown-elf
, which was installed via espup
(toolchain manager for espressif chipset targets). After removing the esp targets, I got a lookup error for libclang.so
, which somehow wasn't in path. I'm not certain how this happened, as I've been using both Z3 and espup together without issue in the past. My guess is that a recent espup update cycle broke some symlinks that were being used for libclang. The final fix was explicitly setting LIBCLANG_PATH
in my .bashrc
to point to the real local target version of libclang.
I've been using this crate for over a year without issue, even on this same exact machine. But all of a sudden when I try to build my projects I get the following pointer size error:
I get this same error with and without the
static-link-z3
feature flag. It seems to either be finding a 32-bit installation of Z3 (which should not be the case) or is trying to use a 32-bit version of clang (but I tested that theclang
command is defaulted to 64-bit). And the strangest thing is that my code was running just fine two weeks ago when I last used it without change (on this same machine) and without even cleaning compile artifacts...Does anyone have any advice on how to get this back to working?