[bug] Regression: PR #8740 breaks adding objects to link through sharedlinkflags
See original GitHub issuemimalloc/1.6.7 uses self.cpp_info.sharedlinkflags and self.cpp_info.exelinkflags to add objects to link.
(Do note, I am not the maintainer of this package, just a user)
https://github.com/conan-io/conan/pull/8740 makes a change that assumes any ‘sharedlinkflags’ starting with / is a msvc flag changes it to -.
This breaks absolute unix urls, like a full path to an object, by changing /some/path.o to -some/path.o.
I’m not sure if this is a regression due to the assumption made in #8740 or due to miss-use of sharedlinkflags by mimalloc. But it’s regressed usage of mimalloc which previously worked.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Changelog — conan 1.46.2 documentation
Bugfix: Revert regression that replaces first / by - in cpp_info.xxxxlinkflags in _CMake_ generators because it can break passing objects and other paths ......
Read more >Software regression - Wikipedia
A software regression is a type of software bug where a feature that has worked before stops working. This may happen after changes...
Read more >Update jwt dependency from dgrijalva/jwt-go to golang-jwt/jwt - pgx
My first though was: why does a database driver have a dependency on a JWT library? ... [bug] Regression: PR #8740 breaks adding...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It is not possible to use a normal static library while at the same time guaranteeing that the overrides work. This has to be done using an object file. self.cpp_info.objects would be great, but it doesn’t solve the ordering problem below:
This is why link flags is used, because link flags come before any other object files on the commandline. It’s a pretty dirty workaround, but personally i don’t see any obvious other ways to do it, unless we can directly modify the object file list.
On windows builds there is a similar problem; somehow we have to guarantee the .lib for the override dll comes first on the commandline, otherwise the overrides will not actually override everything correctly. Currently i deal with this seperately in cmake by setting the linker command.
It seems difficult to come with an ordering definition for this. If we treat objects that could have transitive dependencies to other objects in dependencies packages, then the rule should be the same as the libs linkage order that is happening now, and objects shouldn’t just go before everything else… It doesn’t seem possible that we just put the objects first always.
So yes, I don’t see at the moment any solution that does not look a workaround and that is general enough. Lets revert this and lets keep thinking about this. All feedback and ideas welcome.