Git Product home page Git Product logo

docker-clang's People

Contributors

bensuperpc avatar catleeball avatar dependabot[bot] avatar henryiii avatar johnnymo87 avatar samtebbs33 avatar silkeh avatar skylion007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-clang's Issues

clang 3.4 broken

The following recipe:

docker run --rm -it silkeh/clang:3.4
mkdir cmake_test
cd cmake_test
printf "cmake_minimum_required(VERSION 3.1)\n project(MyProject LANGUAGES CXX)" > CMakeLists.txt
cmake .

broke recently (probably about a month ago):

-- The CXX compiler identification is Clang 3.4.2
-- Check for working CXX compiler: /usr/local/bin/clang++
-- Check for working CXX compiler: /usr/local/bin/clang++ -- broken
CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "/usr/local/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /cmake_test/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/make" "cmTC_f4363/fast"
    /usr/bin/make -f CMakeFiles/cmTC_f4363.dir/build.make CMakeFiles/cmTC_f4363.dir/build
    make[1]: Entering directory '/cmake_test/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_f4363.dir/testCXXCompiler.cxx.o
    /usr/local/bin/clang++     -o CMakeFiles/cmTC_f4363.dir/testCXXCompiler.cxx.o -c /cmake_test/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    Linking CXX executable cmTC_f4363
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f4363.dir/link.txt --verbose=1
    /usr/local/bin/clang++       -rdynamic CMakeFiles/cmTC_f4363.dir/testCXXCompiler.cxx.o  -o cmTC_f4363
    /usr/bin/ld: cannot find crtbegin.o: No such file or directory
    /usr/bin/ld: cannot find -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [CMakeFiles/cmTC_f4363.dir/build.make:87: cmTC_f4363] Error 1
    make[1]: Leaving directory '/cmake_test/CMakeFiles/CMakeTmp'
    make: *** [Makefile:121: cmTC_f4363/fast] Error 2




  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "/cmake_test/CMakeFiles/CMakeOutput.log".
See also "/cmake_test/CMakeFiles/CMakeError.log".

(MWE, an actual example is CLI11's CI system). Also fails with 3.5, works with (larger?) 8. image.

Edit: Could it be that clang 3.x is not supported by libstdc++ 8? 16ae1f4

Edit: Shorter version for easier version checking:

docker run --rm silkeh/clang:3.4 /bin/bash -c 'mkdir cmake_test; cd cmake_test; printf "cmake_minimum_required(VERSION 3.1)\n project(MyProject LANGUAGES CXX)" > CMakeLists.txt; cmake .'

unable to compile c++ program with image tag 6

I was trying to compile a c++ program but compiler cannot find standard libraries

test.cc

#include <iostream>

int main() {
    std::cout << "Hello world" << std:endl;
}

output

test.cc:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 error generated.

Add support for LLVM 10

I tried quickly adding support for LLVM 10, but they changed the download URL again so I couldn't get it to work in the existing script... Perhaps it's better to simply hardcode the URLs?

ARM images ?

Hello,

Just discovered your image and it looks great !
I plan to use it as a base for some of mine and would like to use them on AppleSilicon macs, I saw in config.yaml that ARM is listed, but the docker hub images don't support it ?
image
Is it a bug, is it normal ?

clang 11 image on Docker Hub

I am not sure if this is an error, but the clang 11 image is missing from Docker Hub and latest is clang 10.

Thanks for the great project!

Compiling with LTO Fails

Compiling a program fails when enabling link-time optimisations (LTO). The problem can be reproduced by running the following command in the Docker image:

$ echo "int main(){}" >> main.cpp; clang++ main.cpp -flto=thin
/usr/bin/ld: /usr/local/bin/../lib/LLVMgold.so: error loading plugin: /usr/local/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory

I unfortunately have no idea what should be done to fix this issue.

Clang 12 not available on docker hub

First of all, thank you for maintaining these images, they are really helpful!

I was excited to see #12 had been merged with some nice updates. It looks like you've published them to docker-hub, however there doesn't seem to be a tag for clang 12.

If you are able to push that, it would be most appreciated!

Thanks again :)

Where is Clang 15?

There is only an image for Clang 14. The dev image is already at Clang 16 (16.0.0-++20220929071807+682c7c77f59a-1exp120220929071906.404), but there is no image for Clang 15.

fail to link c++17 filesystem with clang

The linker error:

/usr/bin/ld: CMakeFiles/environment.dir/environment.cpp.o: in function (anonymous namespace)::environment_t_constructor_Test::TestBody()':
environment.cpp:(.text+0xc6): undefined reference to std::filesystem::__cxx11::path::_M_split_cmpts()'

The code compiled on a local clang and a docker gcc.

Missing libc++

The image is missing libc++.

Although it comes with libstdc++, which is a requirement of clang, I would expect a clang/llvm image to also include libc++.

You can simply install it with (as per https://apt.llvm.org/):

apt-get install libc++-{version}-dev libc++abi-{version}-dev

I think clang will still pick libstdc++ by default, unless otherwise specified (i.e. -stdlib=libc++), so I see no real argument against it. What do you think?

Add clang 14

  • Clang 14 has been out since March, would be nice to have a Docker image for it as well.

Separate build jobs for each architecture

Wanted to continue the discussion from #28 (comment) in a dedicated issue.

So I've looked into how these new multi-arch images work.

The last time I did some work on this it seemed like the image needed to be pushed for all architectures at the same time.

This seems to be the recommended and easiest way to handle multi-arch images.

However, I found a way to build these images independently and stitch them together afterwards (see "The hard way with docker manifest" https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/). This would require us to upload each image for each architecture with its own tag to the registry, then creating a new "tag" or manifest which combines them. Afterwards the initial tags can be deleted, because their layers are referenced by the new manifest.

Interestingly, the docker manifest create command is marked experimental and not recommended for production. On the other hand, there's docker buildx imagetools create, which might work the same way.

This is the best I can come up with, yet. I don't like the fact, that we're required to push the "intermediate" images first, and I'm not sure if that's an acceptable solution. Furthermore it would increase the complexity of the task. What do you think?

I also couldn't find 1) how to improve the readability of the logs (only through --output=plain) nor 2) allow individual architectures to fail, while keeping the successfully build, as alternative solutions.

couple of questions

I have a couple of questions:

The container images are tagged with the major version of clang -- do you rebuild the image when there are patch (or minor) releases of clang?

Also, for example the image tagged with 17, that would be same as 17-bookworm (latest stable), right? Wonder by the digest is different.. https://hub.docker.com/r/silkeh/clang/tags?page=1&name=17

Thanks for this great work!

let dpkg know that we have a c-compiler?

I like your work!

I came across a slight infelicity this morning. When you want to apt install extra packages, some might depend on a C compiler being around. libtool is one of them.

Under debian, libtool is marked as depending on the virtual package c-compiler, which can be provided by a variety of compilers. Presently, on bullseye this pulls gcc-10 by default.

The sad thing is that your images do have a compiler, of course, and this pull of gcc seems largely unneeded. Would you welcome a modification that creates a phony intermediate package that provides the c-compiler dependency (along with the required symlinks and alternatives set up) ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.