Skip to content

Conversation

@serban-nicusor-toptal
Copy link
Contributor

No description provided.

@andrjohns
Copy link
Contributor

@serban-nicusor-toptal I don't think this PR specified the updated compiler version correctly.

After clang 6, the versioning changed from 6.0 to 7 (i.e., no .0 suffix), so the ENV needs to be:

ENV CLANG_VERSION="7"

@serban-nicusor-toptal
Copy link
Contributor Author

serban-nicusor-toptal commented Apr 2, 2022

Change committed and the image is now live on DockerHub.

Binaries name in case you will need them to debug:

clang                 clang-10              clang-format
clang++               clang-7               clang-format-10
clang++-10            clang-cpp-10          clang-format-diff
clang++-7             clang-cpp-7           clang-format-diff-10

@andrjohns
Copy link
Contributor

Brilliant, thanks!

@andrjohns
Copy link
Contributor

I might be pulling the wrong image down, but it looks like it still can't find clang7:

andrew@HomeLinux:~$ sudo docker run -it stanorg/ci:gpu-cpp17
[sudo] password for andrew: 
root@5f4b9bfd6420:/workdir# dpkg -l | grep clang
ii  clang                                 1:10.0-50~exp1                    amd64        C, C++ and Objective-C compiler (LLVM based)
ii  clang-10                              1:10.0.0-4ubuntu1                 amd64        C, C++ and Objective-C compiler
ii  clang-format                          1:10.0-50~exp1                    amd64        Tool to format C/C++/Obj-C code
ii  clang-format-10                       1:10.0.0-4ubuntu1                 amd64        Tool to format C/C++/Obj-C code
ii  libclang-10-dev                       1:10.0.0-4ubuntu1                 amd64        Clang library - Development package
ii  libclang-common-10-dev                1:10.0.0-4ubuntu1                 amd64        Clang library - Common development package
ii  libclang-cpp10                        1:10.0.0-4ubuntu1                 amd64        C++ interface to the Clang library
ii  libclang-dev                          1:10.0-50~exp1                    amd64        clang library - Development package
ii  libclang1-10                          1:10.0.0-4ubuntu1                 amd64        C interface to the Clang library
ii  libopencl-clang10                     10.0.0-2                          amd64        thin wrapper for clang
ii  librust-clang-sys+clang-7-0-dev:amd64 0.28.1-6                          amd64        Rust bindings for libclang - feature "clang_7_0"
ii  librust-clang-sys-dev:amd64           0.28.1-6                          amd64        Rust bindings for libclang - Rust source code

Is stanorg/ci:gpu-cpp17 still the right image?

@serban-nicusor-toptal
Copy link
Contributor Author

serban-nicusor-toptal commented Apr 4, 2022

I'm not entirely sure what is going on, I can see the clang-7 binary just fine:

$ docker pull stanorg/ci:gpu-cpp17 && docker run -it stanorg/ci:gpu-cpp17 bash -c "ls -lhart /usr/bin | grep clang && which clang-7"
lrwxrwxrwx 1 root root      19 Mar 20  2020 git-clang-format -> git-clang-format-10
lrwxrwxrwx 1 root root      20 Mar 20  2020 clang-format-diff -> clang-format-diff-10
lrwxrwxrwx 1 root root      15 Mar 20  2020 clang-format -> clang-format-10
lrwxrwxrwx 1 root root      26 Mar 20  2020 clang++ -> ../lib/llvm-10/bin/clang++
lrwxrwxrwx 1 root root      24 Mar 20  2020 clang -> ../lib/llvm-10/bin/clang
lrwxrwxrwx 1 root root      27 Mar 23  2020 clang-cpp-7 -> ../lib/llvm-7/bin/clang-cpp
lrwxrwxrwx 1 root root      23 Mar 23  2020 clang-7 -> ../lib/llvm-7/bin/clang
lrwxrwxrwx 1 root root      25 Mar 23  2020 clang++-7 -> ../lib/llvm-7/bin/clang++
lrwxrwxrwx 1 root root      35 Apr 20  2020 git-clang-format-10 -> ../lib/llvm-10/bin/git-clang-format
-rwxr-xr-x 1 root root    4.5K Apr 20  2020 clang-format-diff-10
lrwxrwxrwx 1 root root      31 Apr 20  2020 clang-format-10 -> ../lib/llvm-10/bin/clang-format
lrwxrwxrwx 1 root root      28 Apr 20  2020 clang-cpp-10 -> ../lib/llvm-10/bin/clang-cpp
lrwxrwxrwx 1 root root      24 Apr 20  2020 clang-10 -> ../lib/llvm-10/bin/clang
lrwxrwxrwx 1 root root      26 Apr 20  2020 clang++-10 -> ../lib/llvm-10/bin/clang++
/usr/bin/clang-7

Maybe a permission issue or an old image? I can also see the ENV CLANG_VERSION="7" set in the layers.

Let me know if the above helped with anything, else I will try to run it on a different machine to debug.

Edit: Oh! Jenkins sometimes doesn't really pick up the "latest" change from Docker Hub, therefore when I debug just like you are now with different images/tags I add to the pipeline something like:

        stage('Pull image VM1') {
            agent { label 'triqs' }
            steps {
                sh "docker pull "
            }
        }

        stage('Pull image VM2') {
            agent { label 'docker' }
            steps {
                sh "docker pull "
            }
        }

OR pass the --pull always argument:

        stage('Testing stage ...') {
            agent {
                docker {
                    image 'stanorg/ci:gpu'
                    label 'linux'
                    args '--pull always'
                }
            }
            steps {
                ...
            }
        }

@andrjohns
Copy link
Contributor

Edit: Oh! Jenkins sometimes doesn't really pick up the "latest" change from Docker Hub, therefore when I debug just like you are now with different images/tags I add to the pipeline something like:

Ah perfect, I thought that might be the case but I wasn't sure of the right argument to fix it. Thanks, I'll give that a try now!

@andrjohns
Copy link
Contributor

I've just tried the args '--pull always' specification over in the c++17 pr and it's failing without any error message, would you mind having a look to see what I've done wrong when you've got a minute? Thanks!

@serban-nicusor-toptal
Copy link
Contributor Author

Hey @andrjohns it should be fine now.
You are free to remove the pulling part from the Jenkinsfile (didn't remove it myself to not restart the pipeline):

        stage('Pull image VM1') {
            agent { label 'docker' }
            steps {
                sh "docker pull stanorg/ci:gpu-cpp17"
            }
        }

        stage('Pull image VM2') {
            agent { label 'v100' }
            steps {
                sh "docker pull stanorg/ci:gpu-cpp17"
            }
        }

as I've moved that to a separate job here where you can just paste your docker image and it will be updated on the build instances, to avoid blockers like this and make it much easier.

@andrjohns
Copy link
Contributor

Brilliant, thanks!

@andrjohns
Copy link
Contributor

@serban-nicusor-toptal Now that the c++17 PR is passing CI, can we merge this PR? Then I can remove all of the CI changes from that PR as well.

Thanks!

@serban-nicusor-toptal serban-nicusor-toptal merged commit ec30607 into master Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants