Closed DavidZemon closed 6 years ago
Maybe the bug that is going to be fixed in release 1.4.5 could be related, as it is package_id related. A possible way to check if it is this bug what is bothering you, is to try with conan 1.3, which seems to work well. The package_id()
of the linux
package might be relevant.
Thanks for the detailed report! Please try running with conan 1.3 and tell me, I will tell when conan 1.4.5 is out.
Changing my Conan client (not the server) to 1.3.3 didn't help:
captain@balrog:~$ conan install 'OpenSSL/1.0.2n@conan/stable' -s build_type=Debug --build OpenSSL
OpenSSL/1.0.2n@conan/stable: Installing package
Requirements
OpenSSL/1.0.2n@conan/stable from local cache
zlib/1.2.11@conan/stable from local cache
Packages
OpenSSL/1.0.2n@conan/stable:7844130be93cd4c54d42e8d4922b936e6832525f
zlib/1.2.11@conan/stable:485addee8a0f673df1a98da864bcbad8924300bc
Cross-build from 'Linux:x86_64' to 'Linux:armv7hf'
OpenSSL/1.0.2n@conan/stable: WARN: Package is corrupted, removing folder: /home/captain/.conan/data/OpenSSL/1.0.2n/conan/stable/package/7844130be93cd4c54d42e8d4922b936e6832525f
zlib/1.2.11@conan/stable: Already installed!
OpenSSL/1.0.2n@conan/stable: WARN: Forced build from source
OpenSSL/1.0.2n@conan/stable: Installing build requirements of: OpenSSL/1.0.2n@conan/stable
OpenSSL/1.0.2n@conan/stable: Build requires: [linux/4.9.59@wsbu/stable]
OpenSSL/1.0.2n@conan/stable: Requirements
OpenSSL/1.0.2n@conan/stable: linux/4.9.59@wsbu/stable from local cache
OpenSSL/1.0.2n@conan/stable: Packages
OpenSSL/1.0.2n@conan/stable: linux/4.9.59@wsbu/stable:5dc7c772e508a33d1fa1c2ffcd8a6aa2a66697b8
OpenSSL/1.0.2n@conan/stable:
linux/4.9.59@wsbu/stable: WARN: Package is corrupted, removing folder: /home/captain/.conan/data/linux/4.9.59/wsbu/stable/package/5dc7c772e508a33d1fa1c2ffcd8a6aa2a66697b8
linux/4.9.59@wsbu/stable: WARN: Can't find a 'linux/4.9.59@wsbu/stable' package for the specified options and settings:
- Settings: arch=armv7hf, build_type=Debug, compiler=gcc, compiler.version=4.9, platform=sitara
- Options: install_source=False
- Package ID: 5dc7c772e508a33d1fa1c2ffcd8a6aa2a66697b8
ERROR: Missing prebuilt package for 'linux/4.9.59@wsbu/stable'
Try to build it from sources with "--build linux"
Or read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package"
captain@balrog:~$ conan --version
Conan version 1.3.3
captain@balrog:~$
If you could please send me details of your package_id() method of the linux
package it might help.
You can also email us privately to info@conan.io with the profile you are using, and the linux
recipe, so we could have a look. Thanks!
The recipe is opensource, we just clone the kernel from our closed-source repo: https://github.com/wsbu/conan-packages/blob/master/linux/conanfile.py
It is weird that it is showing that your local packages are "corrupted", I cannot understand why. I would suggest trying the following things:
conan install --build
but without the build requires to the linux package in the profile? Is still showing this "corrupted" warning? Does it finish succesfully? And if you repeat the command?Today it is going to be impossible, but if you want, we could connect from next Monday on slack and do a "pair-debugging" remote session. Thanks for all the feedback!
I do my cross-compiles inside a Docker container, and I think the problem boiled down to user error. I was previously using this script to start the container:
#!/bin/bash
uid="$(id -u)"
gid="$(id -g)"
dir="$(pwd)"
set -e
mkdir --parents ~/.conan/data
touch ~/.conan/.conan.db
set -x
docker run -it --rm \
--net=host \
-w "${dir}" \
-e uid="${uid}" \
-e gid="${gid}" \
-v "$HOME/.ssh/id_rsa:/home/captain/.ssh/id_rsa" \
-v "$HOME/.ssh/known_hosts:/home/captain/.ssh/known_hosts" \
-v "${dir}:${dir}" \
-v "$HOME/.conan/data:/home/captain/.conan/data" \
-v "$HOME/.conan/.conan.db:/home/captain/.conan/.conan.db" \
wsbu/toolchain-linaro "$@"
And the key part I was missing -v "$HOME/.conan/registry.txt:/home/captain/.conan/registry.txt" \
. Without that, I'd get mismatches between the registry and the cache. Once I mounted the registry, no more issues. I'll close this for now and reopen if I encounter the problem again with the new change in place.
Oh yes, that could explain it. But then you ran the conan 1.3.3 without the docker, so that would be the reason it worked? Thanks for following up and reporting.
Nope, running 1.3.3 was still in Docker. When I realized I had a sync problem with the registry, I ran conan remove
on linux from my host and then added the registry option to my docker script, figuring it would be best to start from scratch with that one.
To help us debug your issue please explain:
Conan v1.4.4 I'm afraid I don't know if you'll be able to reproduce this since I'm using a closed-source package with a locked-down Conan server.
What I'm running into is a problem where my linux package is always being rebuilt from source on my local machine, despite the remote server showing a matching binary with appropriate options.
So the important parts that I see in the above snippet are Conan saying it's missing a package in the local cache with a specific package ID
and then the search function saying "hey, i have these package IDs"... and one of them matches (second one down).
Any ideas why it's trying to build this package from source?