-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Incorrect CMake module paths since aws-crt-cpp dependency was added #1648
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
I am getting this issue as well for 1.9.19 as well. Where as it works perfectly for 1.8.186 |
Yep, it was introduced with version 1.9.0 which contains the commit bb96468. |
Hi @glaubitz , |
On May 20, 2021, at 7:24 PM, Gilberto Lopez Zayas ***@***.***> wrote:
Hi @glaubitz ,
Yea we got a few problems with adding the dependencies as submodules, still working on that.
Having said that I can make it work on my environment, so unless there is something specific going on in openSUSE (which I think shouldn't be the case) it could just be an environment configuration problem.
Well, I have been in touch with CMake upstream regarding the CMake issues with the various AWS C++ packages and they explicitly told me that the paths used and the way packages are included is wrong.
I’ll try to loop in someone from CMake upstream in this discussion to help resolve this issue.
FWIW, distributions don’t use git submodules but we rather split every dependency into a separate package to ease security maintenance.
|
I'm having the same issue. I'm using the tar.gz release (and not a git clone). For 1.9.25:
Then I get the same error as above. This used to work with 1.8 releases. I'm also pulling specifc tar.gz releases in my own CMakeLists.txt files, so this is quite surprising that it stopped working. |
@ncoder-1 ,
Does this mean that you just downloaded the project and built? (either via git or zip file), because then yea the same answer is going to apply to you and the only workaround for now is to keep using 1.8 since 1.9 requires the submodules to run. |
Yes, downloaded from the tarball. Most distributions will use the tarball for creating a package, not check out the sources from git. Distributions usually create individual packages for every upstream project which includes shared libraries. Having shared libraries in separate packages and not bundling them is an important security aspect for a distribution. |
@KaibaLopez , |
To clarify, I am not saying this is correct, I am trying to verify that was the cause and give a recommendation so this doesn't block you. |
Building from .tar.gz is just as unsupported as building from git, i.e. it doesn't work. |
Hi, as an update on this, we included a script that can be run to get the dependencies and build the sdk from the .zip file. See here |
HI, I appreciate the gesture, but that won't allow for offline building if you are using |
I agree with @ncoder-1 . It's just a workaround and not addressing the actual problem which is the incorrect use of CMake module paths. FWIW, it can be helpful to ask CMake upstream (IRC, mailing list etc), they are very helpful when it comes to these problems. |
Any update or progress on this issue? I see tar.gz/zip "releases" being pushed out daily, which is surprising as you can't actually build them without a side script. I appreciate the time put into getting bug fixes, optimizations and improvements out, but I would hope that making the sdk releases buildable again would be a higher priority. |
I see similar issue at Arch Linux:
What is the way to fix/workaround this problem? |
@anatol you need to add the aws-c-common package's cmake files to CMAKE_MODULE_PATH. It looks like on arch linux these are sent to /usr/lib/cmake so -DCMAKE_MODULE_PATH=/usr/lib/cmake might do the trick. Reading between the lines, if you're trying to bump arch's aws-sdk-cpp package to 1.9.x, feel free to take a look at my nixpkgs bump to see what other dependencies are required |
@r-burns The problem is that the package ignores the common standard paths for cmake which is why it's so difficult to get it to build as a package. I have shown the If properly done, it should work on just any distribution. |
Hey you're preaching to the choir here, I'm just throwing out some workarounds until this issue is resolved. |
@r-burns thanks a lot for the reference to nixos package changes! It helped. |
OK, I actually found the time for some digging now. I completely forgot that I was already patching |
I have finally packaged all the dependencies in openSUSE now:
However, I'm still not sure how to proceed with all the custom commands that the @r-burns I tried your patch on openSUSE but it doesn't solve the issue for me. |
Wdym, what's the issue? Are you saying that the AwsFindPackage include still fails? Not sure what you mean about add_sdks, afaict that function is only used at aws-sdk-cpp configure time so it doesn't need to be packaged. |
Yes. The NixOS patch doesn't seem to be sufficient for current SDK versions.
Well, it's the configure that fails ;). |
We have been working on improving the build process and have made some changes that might have fixed this already. You can track the progress here |
Can you trying updating the submodules to the latest version? You can do that with this:
|
Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one. |
Nope, still an issue. Aws-c-common adds modules to PREFIX/lib/cmake (which is nonstandard), which needs to be manually added to downstream packages' CMAKE_MODULE_PATH to be detected. A more proper mechanism would be to expose AwsCRuntime etc. through e.g. find_package(aws-c-common). |
This solution worked for me. To check the submodules in the /aws-sdk-cpp run : To check their status, if they are installed: You can manually the contents of the /home/glaubitz/upstream/aws-sdk-cpp/crt/aws-crt-cpp folder, whether it has CMakeLists.txt or not. If there is nothing in the aws-crt-cpp, then do The essence of the solution is, if a submodule is empty. Do a manual git clone |
Sorry, but this completely misses the point. First of all, a lot of packages of the AWS C++ SDK did not use the standard paths for placing CMake files as defined by upstream. Luckily, most packages have been fixed in the mean time. And, secondly, I'm building distribution packages, so I cannot use Anyway, this works fine now and I guess this can be closed now. |
yes this was fixed with awslabs/aws-c-common#1178, will resolve, give a shout if you have any questions about it |
This issue is now closed. Comments on closed issues are hard for our team to see. |
In bb96468,
CMakeLists.txt
was modified to use non-standard CMake modules paths which is incompatible with most standard distributions.Trying to configure
aws-sdk-cpp
on openSUSE/SLE therefore currently fails with:Please see also: awslabs/aws-c-event-stream#15
The text was updated successfully, but these errors were encountered: