-
Hi! I have an interesting issue... Since version Symptoms:
Could it be possible that these symbols are no longer present in Z3, but are still included in |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
Hmm that is very puzzling. I looked through the usage of those symbols and the z3.rs high level API does use them in the RegExp type. On the z3 side, it looks like those symbols are pretty old (introduced in z3 4.8) and have been untouched all the way through z3 4.15. So they should be present in z3 4.13. I can't think what could be happening that would enable the linker to apparently find the z3 library but not find only those symbols. Looks like high level support for these APIs was added in #275 by @Pat-Lafon , perhaps he might have some idea? The low level binding was already present in z3rs 0.12.1. |
Beta Was this translation helpful? Give feedback.
-
I'd be curious if this still happens if you build z3rs with the |
Beta Was this translation helpful? Give feedback.
-
Thank you for the suggestions! I will definitely try to enable Also, I was trying to reproduce the issues on a standalone Debian machine and my experience was again... weird. First, I was testing with z3 4.8, as that is what was available for that version of Debian through |
Beta Was this translation helpful? Give feedback.
-
Oh actually that might explain it! What if z3 4.8 is installed in the CI runner, but it's a version before the point release that added those APIs? Perhaps both 4.8 (from apt) and 4.13 are present but it's trying to link against 4.8? I'm not sure why the link paths would be differing depending on whether it's a coverage job though. We did so a little playing around with some of the link options in 0.13.x. It might be interesting to try it locked to exactly 0.13.0 and see if that works. If it does, that might narrow down if it was a link flag change we made. |
Beta Was this translation helpful? Give feedback.
-
Yeah, that is my only thought. So I think the ubuntu runner comes with 4.8.12(https://packages.ubuntu.com/noble/libz3-4) which was cut on July 13, 2021. The One quick thing to try is if you can set I was trying to look to see if the the object file being linked in for z3 is somehow listed in the log output but I don't think so. |
Beta Was this translation helpful? Give feedback.
-
Awesome, thank you! That indeed sounds like a very plausible explanation. I'm traveling this weekend, so I'm not sure when I'll be able to test it. But I'll try to report back with more information as soon as I can. |
Beta Was this translation helpful? Give feedback.
-
Well, greetings from the SMT workshop in Glasgow! I ran some additional tests, and it seems that the explanation is correct :) (1) Ubuntu runners come pre-installed with a version of Z3 that is not compatible with So, at this point, the most straightforward workaround is to either (a) explicitly install newer Z3 as a However, ideally, I would still like to fix the issue "more universally" if possible. Unfortunately, my knowledge of the build process for rust libraries that interface with C is not amazing. Do you think this is more likely to be an issue in |
Beta Was this translation helpful? Give feedback.
-
Glad to hear it is fixed! As @Pat-Lafon suggested you could try using the As for a more universal fix, I'm not sure where the root cause is here; I'm inclined to blame Thankfully, this is a problem that should "solve itself" within a year when the next Ubuntu LTS comes out and bumps the version of z3 in I do wonder if this library should be more explicit about z3 version: Maybe we could have some features like: [features]
z3_4_8_12 = []
z3_4_9_0 = ["z3_4_8_12"]
z3_4_10_0 = ["z3_4_9_0"]
# etc, etc, etc And then gate high-level APIs with the Z3 version they were added in. |
Beta Was this translation helpful? Give feedback.
-
I see!
Anyway, on my part, feel free to close this issue as resolved. If you want to keep it open until the new Ubuntu LTS version comes out (or simply as documentation for anyone that might have the same issue), that's of course also fine with me as well :) |
Beta Was this translation helpful? Give feedback.
-
Oh I guess I should also say, |
Beta Was this translation helpful? Give feedback.
-
I'll close this and convert into a discussion I think, since the default build works |
Beta Was this translation helpful? Give feedback.
Well, greetings from the SMT workshop in Glasgow!
I ran some additional tests, and it seems that the explanation is correct :)
(1) Ubuntu runners come pre-installed with a version of Z3 that is not compatible with
z3.rs > = 0.13.0
.(2) The
setup-z3
github action seems to be correctly installing a new version of Z3 and adding it toLIBRARY_PATH
andLD_LIBRARY_PATH
(that's why the normal test runs work ok); Also, in a strange twist of faith, it turns out it was me who added this feature (the library paths) to the github action and forgot about it.(3) For reasons unbeknownst to men, when building with
tarpaulin
, the linker insists on using the older version of the library, even though it ca…