Comments (5)
I propose something like the following:
Create a gcc
and g++
file containing the following content:
#!/usr/bin/env bash
>&2 echo "WARNING: g++ called on a clang docker image"
# Simple gcc detection
echo "1">"$HOME/GCC_DETECTED"
# Or exit
# exit 1 #uncomment if desired
/usr/bin/gcc $@
chmod a+x
both files and prepend the directory containing both files to the PATH
environment variable.
Launch of gcc
can be detected if $HOME/GCC_DETECTED
exists (or if the warning is printed to the stderr).
This is not a perfect solution since scripts using /usr/bin/gcc
will not be detected.
But I think those can be ignored.
Detecting calling gcc and failing the build, needs cooperation of either the build scripts or conan/conan-package-tools.
from conan-docker-tools.
no, it's not possible. The clang package (apt) requires g++-multilib that requires gcc. Some libraries and headers are shared between both packages. We can't remove only gcc because some important components will be removed together.
Maybe we could remove gcc manually, like rm /usr/bin/gcc
and all related stuff, but it could result in broken packages. Probably this will break SystemPackageTool when installing on system_requirements
from conan-docker-tools.
Thanks for investigating.
What might be useful is replacing gcc and g++ with a wrapper script that sets some variable or writes to some file when executed.
That way, conan can detect whether gcc was executed.
from conan-docker-tools.
What kind of wrapper? which variables? I have no idea how to implement this. Also, I don't know which side effects it could result when uninstalling or upgrading a package.
from conan-docker-tools.
Modern clang image will no longer use GCC together. The libstdc++ will be imported from a GCC docker image, but the compiler will be only clang.
from conan-docker-tools.
Related Issues (20)
- Have conan modern HOT 3
- Publish docker images on Artifactory HOT 5
- libstdc++ is different between images for gcc compilers HOT 7
- Proposal to Update GCC Minor Versions
- Avoid re-buiding all images once are merged to master HOT 2
- Unable to build images using docker-compose v2.17+
- Update OpenJDK version to be able to run on Jenkins
- Avoid building images based 18.04 on CI for now HOT 1
- How to use conan 2.0 in bitbucket-pipelines.yml HOT 2
- Build raw Docker image with Conan client only HOT 1
- gcc11 conan 2.0 image HOT 4
- Drop support for Docker images no longer used in CCI
- Add support for LLVM Fortran
- Issues building Conan 2 GCC images with Docker Compose HOT 2
- Build only those images consumed by CCI HOT 3
- Improve current CI when generating Docker images HOT 1
- Where are conan2 actual docker images? HOT 4
- TLS 1.3 connections for source downloads are unsupported HOT 1
- Add support for version list that should be consumed by both legacy and modern
- Execute parallel Docker push when publishing images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan-docker-tools.