Skip to content
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

include could not find requested file #1094

Closed
johnramsden opened this issue Mar 5, 2024 · 13 comments
Closed

include could not find requested file #1094

johnramsden opened this issue Mar 5, 2024 · 13 comments
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@johnramsden
Copy link

Describe the bug

Im attempting to follow instructions for building at aws-c-s3. The common Library builds successfully, but when I attempt to use it in all of the other projects they fail with the following (or similar):

cmake -S aws-checksums -B aws-checksums/build -DCMAKE_INSTALL_PREFIX=$IPATH -DCMAKE_PREFIX_PATH=$IPATH
cmake --build aws-checksums/build --target install
CMake Error at /data/john/libs/aws-c-common/cmake/aws-c-common-config.cmake:8 (include):
  include could not find requested file:

    /data/john/libs/aws-c-common/cmake/shared/@[email protected]
Call Stack (most recent call first):
  /data/john/libs/aws-c-common/cmake/aws-c-common-config.cmake:22 (aws_load_targets)
  /data/john/libs/lib/cmake/AwsFindPackage.cmake:19 (find_package)
  CMakeLists.txt:130 (aws_use_package)

Expected Behavior

Other packages build correctly

Current Behavior

Build fails

Reproduction Steps

Follow aws-c-s3 on Ubuntu 22.04

Possible Solution

No response

Additional Information/Context

No response

aws-c-common version used

0.9.14

Compiler and version used

gcc version 11.4.0

Operating System and version

Ubuntu 22.04

@johnramsden johnramsden added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 5, 2024
@graebm
Copy link
Contributor

graebm commented Mar 6, 2024

install-path must be an absolute path in the following instructions.

Are you doing this?

@johnramsden
Copy link
Author

@graebm Yes:

IPATH=/data/john/libs

@jmklix
Copy link
Member

jmklix commented Mar 7, 2024

Have you build aws-lc and s2n-tls?

If you are building on Linux, you will need to build aws-lc and s2n-tls first.

@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 2 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Mar 7, 2024
@johnramsden
Copy link
Author

@jmklix Yes, built and installed per aws-c-s3 readme

@bretambrose
Copy link
Contributor

bretambrose commented Mar 7, 2024

Can you attach the full command line and output from building and installing aws-c-common. Also what is the full directory path you are building from?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 2 days. label Mar 7, 2024
@johnramsden
Copy link
Author

@bretambrose Uploaded output o.txt of:

IPATH=/data/john/libs
cd /data/john/libs

git clone https://github.com/awslabs/aws-c-common.git
cmake -S aws-c-common -B aws-c-common/build -DCMAKE_INSTALL_PREFIX=$IPATH
cmake --build aws-c-common/build --target install

git clone https://github.com/awslabs/aws-checksums.git
cmake -S aws-checksums -B aws-checksums/build -DCMAKE_INSTALL_PREFIX=$IPATH -DCMAKE_PREFIX_PATH=$IPATH
cmake --build aws-checksums/build --target install

Already ran (to success):

IPATH=/data/john/libs
cd /data/john/libs
git clone https://github.com/awslabs/aws-lc.git
cmake -S aws-lc -B aws-lc/build -DCMAKE_INSTALL_PREFIX=$IPATH
cmake --build aws-lc/build --target install

git clone https://github.com/aws/s2n-tls.git
cmake -S s2n-tls -B s2n-tls/build -DCMAKE_INSTALL_PREFIX=$IPATH -DCMAKE_PREFIX_PATH=$IPATH
cmake --build s2n-tls/build --target install

@bretambrose
Copy link
Contributor

bretambrose commented Mar 7, 2024

You're installing into and building from the same tree/directory. Try installing to an unrelated directory.

@johnramsden
Copy link
Author

You mean different CMAKE_INSTALL_PREFIX each lib? Instructions say to use the same one

@johnramsden
Copy link
Author

They are using individual build directories:

./aws-lc/build
./s2n-tls/build
./aws-c-common/build
./aws-checksums/build

@johnramsden
Copy link
Author

Tried building in /data/john/src:

IPATH=/data/john/libs
cd /data/john/src
git clone https://github.com/awslabs/aws-lc.git
cmake -S aws-lc -B aws-lc/build -DCMAKE_INSTALL_PREFIX=$IPATH
cmake --build aws-lc/build --target install

git clone https://github.com/aws/s2n-tls.git
cmake -S s2n-tls -B s2n-tls/build -DCMAKE_INSTALL_PREFIX=$IPATH -DCMAKE_PREFIX_PATH=$IPATH
cmake --build s2n-tls/build --target install

git clone https://github.com/awslabs/aws-c-common.git
cmake -S aws-c-common -B aws-c-common/build -DCMAKE_INSTALL_PREFIX=$IPATH
cmake --build aws-c-common/build --target install

git clone https://github.com/awslabs/aws-checksums.git
cmake -S aws-checksums -B aws-checksums/build -DCMAKE_INSTALL_PREFIX=$IPATH -DCMAKE_PREFIX_PATH=$IPATH
cmake --build aws-checksums/build --target install
CMake Error at /data/john/libs/aws-c-common/cmake/aws-c-common-config.cmake:8 (include):
  include could not find requested file:

    /data/john/libs/aws-c-common/cmake/shared/@[email protected]
Call Stack (most recent call first):
  /data/john/libs/aws-c-common/cmake/aws-c-common-config.cmake:22 (aws_load_targets)
  /data/john/libs/lib/cmake/AwsFindPackage.cmake:19 (find_package)
  CMakeLists.txt:130 (aws_use_package)

@bretambrose
Copy link
Contributor

Did you completely delete the full tree (/data/john/libs)?

I just ran the same steps only with a different IPATH value and everything works as expected.

@johnramsden
Copy link
Author

@bretambrose Thanks I tried that and it was successful. I'm not sure what the cause of the conflict was

@bretambrose
Copy link
Contributor

I suspect cmake was searching a directory that contained both the repository source (which includes pre-config cmake files) and the installed cmake files (post-config) and getting really confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

4 participants