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

[question] No clang 10 configurations? #8913

Closed
barower opened this issue Jan 14, 2022 · 18 comments
Closed

[question] No clang 10 configurations? #8913

barower opened this issue Jan 14, 2022 · 18 comments
Assignees
Labels
question Further information is requested

Comments

@barower
Copy link

barower commented Jan 14, 2022

10 is default clang version on Ubuntu 20.04, why has support for it been removed? It complicates building with Conan in environments with no possibility to download sources from Internet

@barower barower added the question Further information is requested label Jan 14, 2022
@barower barower changed the title [question] No clang 10? [question] No clang 10 configurations? Jan 14, 2022
@uilianries
Copy link
Member

Good question and it's a long history. You need to read conan-io/conan-docker-tools#205 to understand all.

To summarize: Maintainability is the word.

After almost 5 years supporting, patching, fixing, doing all kind of amend, we decided to use a single base Docker image and install the compiler there. Ubuntu releases a new version every 6 months, between this time, we have new compilers available, so we need to install via non-stable ppa, and find out some way to update as soon as available on stable branch. With the time, it's harder and harder to maintain.

@uilianries
Copy link
Member

To complement, clang-10 is there and there are packages available built by Clang 10.

Also, there are 2 Docker images with Clang 10: conanio/clang10 and conanio/clang10-ubuntu16.04. The first is the older, which have been using in CCI. The second is the new approach, single Docker image with a specific compiler installed.

@pgeler
Copy link
Contributor

pgeler commented Feb 4, 2022

Faced same issues with openssl-1.1.1m no package for clang-10 which is default for 20.04. 20.04 is LTS version which is end of life in 2030, 22.04 LTS has not been even released yet. I do understand that it's hart do support and maintain everything, but maybe need more socializing on long term support. this is usually coming uunnoticible 😢 ...

@barower
Copy link
Author

barower commented Feb 7, 2022

@pgeler it was the same problem for me, but with bzip2. I instructed my team to download clang-11 and modify their conan profiles accordingly, didn't have any issues since then

@pgeler
Copy link
Contributor

pgeler commented Feb 7, 2022

@barower yes thank you!!! Build image we are using shared across the projects with same clang/gcc version (not all projects using conan). I'm trying to install and use it in parallel/ another way we are looking is to use our own binary packages... but is not this a step back 🤔

@SSE4
Copy link
Contributor

SSE4 commented Feb 7, 2022

we have to move forward, and we cannot build for everything - we have limited resources, and supported configuration is always about a balance in build times, maintenance cost, and reasonable coverage.
there are a lot of distros, and a lot of distro versions, all of them are using various compiler versions. we can't afford to support all of that.
from our point of view, 3 latest Clang versions provide good enough coverage right now, and 4th Clang version doesn't bring too much benefit while requiring reasonable maintenance in CI.
but if some configurations aren't built on CI - that doesn't mean they aren't supported, for those needing one more compiler, there is always --build missing.

@barower
Copy link
Author

barower commented Feb 8, 2022

--build missing works only as long as you have full access to the Internet. Until there is a way to cache sources in offline environment, there should be more binary packages available

@vdsbenoit
Copy link
Contributor

vdsbenoit commented Mar 23, 2022

@uilianries Is it possible that some packages that used to be pre-built with clang 10 have been removed from Conan Center ?

I noticed that one of my CI jobs that used to pass last month, is now failing with this error, on the same commit ID :

Installing (downloading, building) binaries...
ERROR: Missing binary: xapian-core/1.4.18:a0e99a2fb2badc7066c6de0f5b7d202a5377dbfc
ERROR: Missing binary: zlib/1.2.11:2b1e5ff9df96aaf5924c273e1368c632fcb32dd2
zlib/1.2.11: WARN: Can't find a 'zlib/1.2.11' package for the specified settings, options and dependencies:
- Settings: arch=x86_64, build_type=Release, compiler=clang, compiler.version=10, os=Linux
- Options: fPIC=True, shared=False
- Dependencies: 
- Requirements: 
- Package ID: 2b1e5ff9df96aaf5924c273e1368c632fcb32dd2
ERROR: Missing prebuilt package for 'xapian-core/1.4.18', 'zlib/1.2.11'
Use 'conan search zlib/1.2.11 --table=table.html -r=remote' and open the table.html file to see available packages
Or try to build locally from sources with '--build=xapian-core --build=zlib'
More Info at 'https://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'

I ran this command and saw that there is no more pre-built package for clang 10:

conan search zlib/1.2.11@ --table=table.html -r=conancenter

@vdsbenoit
Copy link
Contributor

Forget what I've just said. The root cause of my issue is that I've just enabled the conan revisions.

@vdsbenoit
Copy link
Contributor

vdsbenoit commented Mar 23, 2022

That said, I don't fully understand how packages are indexed on Conan Center. Are the outdated packages not listed ?

Also, outdated packages seem to be listed in the results of a conan search zlib/1.2.11@ -r conancenter command but not in the results of conan search zlib/1.2.11@ -r conancenter --table=table.html (e.g. clang 10).

In regards to the revisions, is there a way to install outdated packages when the revision feature is enabled?

In my use case, I had to enable the revision feature in order to use a private conan repository on Artifactory. But since then, I cannot install some packages from Conan Center that I used to install (because they are outdated).

Here are the logs of the same operation, with and without the revision feature enabled.

With revisions -> failure
export CONAN_REVISIONS_ENABLED=1
conan install zlib/1.2.11@ -s compiler=clang -s compiler.version=10
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

zlib/1.2.11: Not found in local cache, looking in remotes...
zlib/1.2.11: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.33k]
Downloading conanfile.py completed [5.36k]
Downloading conan_export.tgz completed [0.33k]
Decompressing conan_export.tgz completed [0.00k]
zlib/1.2.11: Downloaded recipe revision 4b38406da00104befece594b529fd155
Installing package: zlib/1.2.11
Requirements
    zlib/1.2.11 from 'conancenter' - Downloaded
Packages
    zlib/1.2.11:2b1e5ff9df96aaf5924c273e1368c632fcb32dd2 - Missing

Installing (downloading, building) binaries...
ERROR: Missing binary: zlib/1.2.11:2b1e5ff9df96aaf5924c273e1368c632fcb32dd2

zlib/1.2.11: WARN: Can't find a 'zlib/1.2.11' package for the specified settings, options and dependencies:
- Settings: arch=x86_64, build_type=Release, compiler=clang, compiler.version=10, os=Linux
- Options: fPIC=True, shared=False
- Dependencies:
- Requirements:
- Package ID: 2b1e5ff9df96aaf5924c273e1368c632fcb32dd2

ERROR: Missing prebuilt package for 'zlib/1.2.11'
Use 'conan search zlib/1.2.11 --table=table.html -r=remote' and open the table.html file to see available packages
Or try to build locally from sources with '--build=zlib'

More Info at 'https://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'
Without revisions -> success
export CONAN_REVISIONS_ENABLED=0
conan install zlib/1.2.11@ -s compiler=clang -s compiler.version=10
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=10
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

zlib/1.2.11: Not found in local cache, looking in remotes...
zlib/1.2.11: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.33k]
Downloading conanfile.py completed [5.36k]
Downloading conan_export.tgz completed [0.33k]
Decompressing conan_export.tgz completed [0.00k]
zlib/1.2.11: Downloaded recipe revision 0
Installing package: zlib/1.2.11
Requirements
    zlib/1.2.11 from 'conancenter' - Downloaded
Packages
    zlib/1.2.11:2b1e5ff9df96aaf5924c273e1368c632fcb32dd2 - Download

Installing (downloading, building) binaries...
zlib/1.2.11: Retrieving package 2b1e5ff9df96aaf5924c273e1368c632fcb32dd2 from remote 'conancenter'
Downloading conanmanifest.txt completed [0.25k]
Downloading conaninfo.txt completed [0.39k]
Downloading conan_package.tgz completed [86.68k]
Decompressing conan_package.tgz completed [0.00k]
zlib/1.2.11: Package installed 2b1e5ff9df96aaf5924c273e1368c632fcb32dd2
zlib/1.2.11: Downloaded package revision 0
Aggregating env generators

We clearly see that conan first says that the package is missing and then installs it, for the same package ID (2b1e5ff9df96aaf5924c273e1368c632fcb32dd2)

Is there a way to force conan to use revision 0 of the recipe ? Or list the revisions ?

I tried conan install zlib/1.2.11@#0 -s compiler=clang -s compiler.version=10 but it does not work.

@SSE4
Copy link
Contributor

SSE4 commented Mar 23, 2022

we never remove existing packages, so they should be there, until some data corruption has happened (which to my knowledge didn't).
yes, revisions are recommended, and will be mandatory in v2. in order to consume old prebuilt Clang 10 binaries, you'll have to specify recipe revision explicitly.
as I have checked, these Clang 10 binaries are still available on conancenter remote, for instance:

conan search zlib/1.2.11@#683857dbd5377d65f26795d4023858f9 -r conancenter -q "compiler=clang AND compiler.version=10"
Existing packages for recipe zlib/1.2.11:

Existing recipe in remote 'conancenter':

    Package_ID: 2b1e5ff9df96aaf5924c273e1368c632fcb32dd2
        [options]
            fPIC: True
            shared: False
        [settings]
            arch: x86_64
            build_type: Release
            compiler: clang
            compiler.version: 10
            os: Linux
        Outdated from recipe: False

(attaching the full log, just in case)
zlib_clang_10.txt

they should be available for the consumption with command like:

conan install zlib/1.2.11@#683857dbd5377d65f26795d4023858f9 -s compiler=clang -s compiler.version=10 -s os=Linux -s arch=x86_64

you may use conan search zlib/1.2.11@ -r conancenter --rev to list currently available revisions.

@vdsbenoit
Copy link
Contributor

Thank you @SSE4 ! 🙏 The conan search --rev command is what I was looking for.

However, how do your define the latest revision a configuration exists for ?

For instance, in your example, how did you know 683857dbd5377d65f26795d4023858f9 would work with clang 10 ? Did you try all the revisions listed by conan search --rev until you got a successful result ?

@SSE4
Copy link
Contributor

SSE4 commented Mar 24, 2022

For instance, in your example, how did you know 683857dbd5377d65f26795d4023858f9 would work with clang 10 ? Did you try all the revisions listed by conan search --rev until you got a successful result ?

yes, I basically run the script to scan all revisions:

import os
import sys
import json

os.system("conan search zlib/1.2.11@ -r conancenter --rev --json out.js")

with open('out.js', 'r') as f:
    js = json.load(f)
    
    for revision in js:
        
        command = 'conan search zlib/1.2.11@#%s -r conancenter -q "compiler=clang AND compiler.version=10"' % revision["revision"]
        print(command)
        sys.stdout.flush()
        os.system(command)

@vdsbenoit
Copy link
Contributor

All right, thank you!

@Croydon
Copy link
Contributor

Croydon commented Feb 11, 2023

I think this issue can be closed?

@vdsbenoit
Copy link
Contributor

I would say yes.

Unless conan developers plan to integrate a solution to transparently do this with the resolver.

@uilianries
Copy link
Member

Clang 10 has been integrated to CCI

@Croydon
Copy link
Contributor

Croydon commented Feb 13, 2023

I would say yes.

Unless conan developers plan to integrate a solution to transparently do this with the resolver.

It is documented here https://github.com/conan-io/conan-center-index/blob/master/docs/supported_platforms_and_configurations.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants