-
Notifications
You must be signed in to change notification settings - Fork 273
Naming collisions prevent linking against libcprover.5.78.0.a
#7586
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
Comments
Namespaces? |
@peterschrammel Are you referring to the C++ language feature? If yes, C++ Namespaces are not going to help with this particular issue, as this is a linking issue, and the linker (more precisely, the archiver - the static library packager) is operating on a more crude basis, taking filenames into account. The exact problem here is that two files of the same name are included in an order that causes one to be shadowed by the other on a file-system basis - at least as far as I understand it. |
I see. There are clashing compilation units. |
Two options:
|
object files coming from different projects. Fixes diffblue#7586 Co-authored-by: Enrico Steffinlongo "[email protected]" Co-authored-by: Fotis Koutoulakis "[email protected]"
object files coming from different projects. Fixes diffblue#7586 Co-authored-by: Enrico Steffinlongo "[email protected]" Co-authored-by: Fotis Koutoulakis "[email protected]"
In #7567 we have implemented a build system enhancement wherein we are packaging CBMC and the assorted tools as a static library, as part of our preparation for building using the external APIs.
In #7493 we also allowed building CBMC by default with support for both
minisat2
andcadical
as sat solvers.The interaction between these two PRs is causing an issue with our static library (which is effectively an archive of object
.o
files): if any of the projects being integrated have naming collisions, only one of the two colliding files is going to be included in the final static archive.This is unfortunate, as CBMC contains (as an example) a file called
message.cpp
undersrc/util/message.cpp
, which collides with a similarly named file (message.cpp
) in cadical undercadical/src/message.cpp
.As a result, we are getting issues when trying to link (this is from the compilation of the Rust API):
In the linking error, you can see some of the files that were included from Cadical (
clause.cpp
,external.cpp
, etc) fail to link because of the reference to a function (CaDiCaL::fatal_message_end()
) defined inmessage.cpp
that wasn't included.The text was updated successfully, but these errors were encountered: