-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[zeroc-ice] x64-windows-static-md library not found #33589
Comments
@jvbsl For the renaming of the lib, it is possible that it is caused by a conflict in the lib name provided by some ports. I need to investigate it. :) |
You mean whether another port produces a library with the same name? I doubt that, because then there would be a collision with the shared lib as well. |
I think this location is more relevant: The thing is, yes it is upstream behaviour, but only when using the vcxproj msbuild. When using cmake it is different. |
AFAIK, vcpkg does not provide the find_package() for |
I mean we built the libs through the upstream |
Alright, that does make sense. But my guess would be that FindIce.cmake uses the naming scheme you get when you build Ice using cmake instead of using the vcxproj. So we could either patch our vcxproj to use the same naming, perhaps even get it upstream, or we could use cmake directly instead(would probably be a lot more work, and if not careful could result in other unpredictable problems). I opened a issue in the zeroc-ice repo: |
It is very difficult to discover from this discussion: Well, this is what |
but it works for me, for x64-windows, x64-linux, x64-osx, x64-osx-dynamic(haven't tried x64-linux-dynamic), only x64-windows-static doesn't find it. |
Does it correctly find debug libraries? (I don't know.)
Assuming that "that" means |
Well totally forgot: That of course changes things quite a bit I guess. So that means actually all library searches are currently broken, and I just had a workaround for that in place? And what actually would need to be done is the implementation of a |
Yes. It is good that you reported/confirmed your workaround. This is something which the wrapper could do.
It would need to set input/cache variables before calling into the actual Find module, e.g. See ports zlib and tiff for examples. I don't think it is a beginner's task. I even added a test port to protect against regressions for major modules. |
This what I get from
Relevant stderr:
(It is available in |
Hm, the last CI builds of #33648 indicate that
With these prerequisites, user project configuration succeeds in vcpkg CI, also for static x64-windows triplets: |
Damn you are fast :D
Should be fine, if the normal FindIce already does it that way, right?
Don't exactly get what you mean with that. Do you mean it can't be linked in a C project? That would be kinda interesting as I thought, you could even link a cpp library into a C project anyway, as it just needs to be linked to the Cpp runtime as well. But should be fine as well, right? Apart from that the only interesting thing(which probably is vcpkg standard behaviour) that I can add is that Still, anything I could help with? |
My point is that the "normal FindIce" does require components, which is unusual. find_package(Ice REQUIRED) # always fails, unexpectedly
find_package(Ice REQUIRED COMPONENTS Ice++11) # works
If you want the MSVC libs with their long names to be found, you need
Given the debug postfix In any case, external validation of #33648 is welcome. I don't have VS, I can only check vcpkg CI logs. |
Yeah but as it is unusual behaviour already on the original library side of things, imho we do not need to work around that, or do we?
I didn't even know one could do that I mean most modern C compilers are afaik just the C++ compilers with restrictions(could be wrong though). But then again that it does not work with a C project is a FindIce quirk, which isn't our responsibility, right?
Sorry, I think I wasn't too clear there, the test I did was on linux not on windows, and that does afaik not use a
Yeah, I'll try to validate tomorrow. But for me it is also either linux natively, or CI(using tmate, often helps a lot), as well as a VM(on my ultra modern dual core CPU :D) |
x64-windows looks good:
but x64-windows-static is like you noticed:
|
I wanted to try it inside a real project, but I can't build the static version because of the dependencies I need, but I looked into the dependencies and have a quick programmatically collected json of the dependencies
And I would conclude that |
Nice. I will try to pick it up. |
but now:
|
Oh so you are now actually trying to search yourself. With my testing(not including the two commits from 5 hours ago, will do so now). I've actually got another interesting problem, which could perhaps even be a problem of zeroc-ice itself and not of this port. I link to
|
AFAICS this is generated via the |
As the cmake build of zeroc-ice generates ice37++11.lib even for the static build, and zeroc-ice project plans to fix this to use the name with the version in 3.7.10 as well zeroc-ice/ice#1502, I think it would make more sense to just patch the vcxproj to generate the static library with the same name as well, then, wen 3.7.10 comes around we would only need to remove the patch file, and the library search does not need to be changed and is uniform across all configurations. |
We shouldn't change names of binaries in 3.7.9. In particular when upstream isn't interested in supporting static windows builds. (IMO they also don't care enough for static non-windows builds where users need to care for link order.)
??? |
Well for non windows, it just works for me. And for windows it is sooo close and as far as I understood, they at least care enough to fix the naming with 3.7.10.
Uff, now I'm confused I was so sure I used cmake on zeroc-ice. But there are no cmake files, what the hell did I do then^^ Let me look at that and come back to you Edit: Edit2: Possible PR solution dg0yt#23 |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
not yet really fixed. Only when #33648 or something similar gets merged |
Hello there,
I have a little problem with zeroc-ice:x64-windows-static-md, as cmake does not find the library ice37++11.lib.
Which in some way is correct, because it does not exist, only ice++11.lib exists. With the x64-windows(shared) build the lib name is indeed ice37++11.lib.
So now my first question would be which one is the "correct" way for vcpkg library names? Because as far as I can see some packages have the versions in them, some do not. Do we expect a difference between static and shared builds?
Now I know where it stems from in the zeroc-ice build:
If we use cmake to build zeroc-ice the shared and static build are both named the same: ice37++11.lib
If we use vcxproj(used by the vcpkg port) the shared build is named ice37++11.lib and the static build ice++11.lib
I could not track down where the naming scheme inside vcxproj stems from, is that perhaps a Microsoft standard and done by msbuild automatically without it being set anywhere explicitly?Edit: In the ice.cpp.props the
TargetName
property is set forDynamicLibrary
but not forStaticLibrary
, so we could introduce a patch file to output the static library with a version suffix as well.If that is not wanted by the vcpkg library naming, then where can I tell vcpkg that cmake should search for the library name without a version suffix?
Thank you so much in advance for all the help and info you can give me
The text was updated successfully, but these errors were encountered: