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

[package] boost/ALL: Conan cannot install boost on Windows based on Linux profiles #12028

Closed
SirCosty opened this issue Aug 3, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@SirCosty
Copy link
Contributor

SirCosty commented Aug 3, 2022

Package and Environment Details

  • Package Name/Version: boost/all
  • Operating System+Version: Windows/all
  • Compiler+Version: ALL
  • Conan Version: All
  • Conan Profile: Linux
  • Python Version: All

Conan profile

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.libcxx=libstdc++
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce

Try to install on Windows boost conan packages for Linux
conan install boost/1.79.0@ --profile=Linux_x64_gcc8 --remote=conancenter
Where the Linux_x64_gcc8 profile is the previously specified one

The error is in the file https://github.com/conan-io/conan-center-index/blob/master/recipes/boost/all/conanfile.py
At the line 423
if os.path.abspath(str(self.options.addr2line_location)) != str(self.options.addr2line_location):
This get evaluated by Windows Python into
if "c:\usr\bin\addr2line"!="/usr/bin/addr2line"
Because os.path.abspath(str) has platform dependent implementation

My solution is to replace the previous implementation with
if not os.path.isabs(str(self.options.addr2line_location)):

Logs

Click to expand log
(venv) c:\Users\SirCosty>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19042 N/A Build 19042

(venv) c:\Users\SirCosty>python --version
Python 3.8.4

(venv) c:\Users\SirCosty>conan --version
Conan version 1.51.0

(venv) c:\Users\SirCosty>conan profile show Linux_x64_gcc8
Configuration for profile Linux_x64_gcc8:

[settings]
os=Linux
arch=x86_64
os_build=Linux
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.libcxx=libstdc++
build_type=Release
[options]
[conf]
[build_requires]
[env]

(venv) c:\Users\SirCosty>conan install boost/1.79.0@  --profile=Linux_x64_gcc8 --remote=conancenter
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=8
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

boost/1.79.0: Retrieving from server 'conancenter'
boost/1.79.0: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.79k]
Downloading conanfile.py completed [81.39k]
Downloading conan_export.tgz completed [1.50k]
Decompressing conan_export.tgz completed [0.00k]
boost/1.79.0: Downloaded recipe revision fc9b111980a02a68d80b16070d6bb758
zlib/1.2.12: Retrieving from server 'conancenter'
zlib/1.2.12: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.33k]
Downloading conanfile.py completed [4.19k]
Downloading conan_export.tgz completed [0.31k]
Decompressing conan_export.tgz completed [0.00k]
zlib/1.2.12: Downloaded recipe revision 3b9e037ae1c615d045a06c67d88491ae
bzip2/1.0.8: Retrieving from server 'conancenter'
bzip2/1.0.8: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.17k]
Downloading conanfile.py completed [4.42k]
Downloading conan_export.tgz completed [0.24k]
Decompressing conan_export.tgz completed [0.00k]
bzip2/1.0.8: Downloaded recipe revision b056f852bd2d5af96fc7171aadfd6c0b
libbacktrace/cci.20210118: Retrieving from server 'conancenter'
libbacktrace/cci.20210118: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.28k]
Downloading conanfile.py completed [4.68k]
Downloading conan_export.tgz completed [0.36k]
Decompressing conan_export.tgz completed [0.00k]
libbacktrace/cci.20210118: Downloaded recipe revision b707cfa5d717e9e1401017c741ad8f6c
Installing package: boost/1.79.0
Requirements
    boost/1.79.0 from 'conancenter' - Downloaded
    bzip2/1.0.8 from 'conancenter' - Downloaded
    libbacktrace/cci.20210118 from 'conancenter' - Downloaded
    zlib/1.2.12 from 'conancenter' - Downloaded
Packages
    boost/1.79.0:INVALID - Invalid
    bzip2/1.0.8:a5875aed3fc7ae8dd0488f7e5e99acbc480d721d - Download
    libbacktrace/cci.20210118:1d877a3df840030e6a8abb74c5ffb9088d08b47a - Download
    zlib/1.2.12:1d877a3df840030e6a8abb74c5ffb9088d08b47a - Download

Installing (downloading, building) binaries...
ERROR: There are invalid packages (packages that cannot exist for this configuration):
boost/1.79.0: Invalid ID: addr2line_location must be an absolute path to addr2line

(venv) c:\Users\SirCosty>
@SirCosty SirCosty added the bug Something isn't working label Aug 3, 2022
@jgsogo
Copy link
Contributor

jgsogo commented Aug 3, 2022

Can you submit a pull request with this change so it can be reviewed and considered?

@SirCosty
Copy link
Contributor Author

SirCosty commented Aug 3, 2022

@jgso

Can you submit a pull request with this change so it can be reviewed and considered?

Have made the pull request, but is my first contribution here, and not sure why some parts are red marked

@jgsogo
Copy link
Contributor

jgsogo commented Aug 3, 2022

Main CI is red because you need to request access and be approved (I see you have written in the issue, so you will be approved soon, just a bit of patience).

The other red comes from a linter we have introduced to enforce migration of recipes to v2-compatible syntax. If you check the modified files in the PR you can see those errors:

image

More information about the road to v2 can be read here

Thanks!

@SirCosty
Copy link
Contributor Author

The issue have been solved by
#12031

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants