-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
- add GCC 10.1.0 #1694
- add GCC 10.1.0 #1694
Conversation
Signed-off-by: SSE4 <tomskside@gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This is a interesting package, but what's the propose, general usage or integrate with CCI? |
@uilianries several goals:
|
Cross-compiling a cross-compiler? Now my brain hurts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great recipe @SSE4 !!
Doesn't this recipe require (a minimum version of) binutils?
binutils contains ar
, ld
, ld.gold
and as
.
These are programs that are essential for assembling and linking.
cc = os.path.join(bindir, "gcc-%s" % self.version) | ||
self.output.info("Creating CC env var with : " + cc) | ||
self.env_info.CC = cc | ||
|
||
cxx = os.path.join(bindir, "g++-%s" % self.version) | ||
self.output.info("Creating CXX env var with : " + cxx) | ||
self.env_info.CXX = cxx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to set CC
and CXX
here?
Isn't that the role of the profile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that they are needed here, if you are using this recipe as a build_requires
then you expect it to populate the environment so it is actually used...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes in this case, as you require this specific package, you have to use this compiler. Using a CC and CXX from profile, pointing to another compiler, creates an impredecible behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to set CC within the profile relative to the build requires?
something like:
[build_requires]
gcc/10.1.0@
[env]
CC=os.path.join(self.deps_cpp_info["gcc"].root_path, "bin", "gcc")
CXX=os.path.join(self.deps_cpp_info["gcc"].root_path, "bin", "g++")
I doubt it's possible right now, so I worry there is no way to achieve the same result without env_info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, but it's a relevant feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SSE4
I think this is now possible with using conan 1.38.0, jusing python code in profiles.
@uilianries
What does it mean now, should users of this package put it in a profile or as a build_require step in a conan recipe?
\o/ ...but we are not going to use it for CCI, we don't want this recipe to be a but yes, I would love to try the cross-building feature with this recipe, this will be really helpful |
@SSE4 Did you check the package size? I guess it will require ~1GB. |
recipes/gcc/all/conanfile.py
Outdated
topics = ("gcc", "gnu", "compiler", "c", "c++") | ||
homepage = "https://gcc.gnu.org/" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
license = " GPL-3.0-only" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen this a lot: spaces in front of the license ID. How is this happening? Is this a copy&paste thing from the SPDX list which contains somehow spaces or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is mostly human error, I've just copy-pasted from the SPDX web-site
recipes/gcc/all/conanfile.py
Outdated
|
||
def package(self): | ||
autotools = self._configure_autotools() | ||
autotools.install(args=self._make_args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would run install-strip
instead: https://github.com/docker-library/gcc/blob/master/Dockerfile.template#L125
As you can see, the official GCC docker image uses it. The idea is strip the binaries, so the package size will be much smaller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, let's add this as well
This comment has been minimized.
This comment has been minimized.
Not so big. According to Artifactory (the |
@madebr binutils will be for sure needed for the cross-building use-case. for the regular build, you already have right binutils, so for the first step, it's not a strong requirement. |
@jgsogo yes, definitely, it's not going to be used as a |
Indeed, native binutils will be available when you build the gcc package yourself, but it won't be if you downloaded the package from bintray on a fresh linux installation. |
@madebr I guess you're right, if install on very empty linux, e.g. embedded system, it will probably fail to run due to the missing glibc and bintuils. I'll create binutils recipe as well, probably once this one is merged, as it's the next step for the cross-building. right now, it's a bit out of scope of the initial recipe version, since we can assume for the majority of non-cross-compiled cases that binutils are already there. |
This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions. |
This comment has been minimized.
This comment has been minimized.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
homepage = "https://gcc.gnu.org" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
license = "GPL-3.0-only" | ||
settings = "os", "compiler", "arch", "build_type" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just:
settings = "os", "arch"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We follow this recommendation: https://github.com/conan-io/conan-center-index/blob/master/docs/packaging_policy.md#settings, sometimes it is useful to know self.settings.compiler
inside the recipe, so better to keep the setting and remove it from packageID.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Some of the latest comments were that it would be good to have a How can we move this forward? |
I think it just need binutils update. 🤔 |
I still don't think this recipe is correct.
If we truly want to create a gcc recipe that can be used as a build requirement without needing any file on the build system, See the |
This comment has been minimized.
This comment has been minimized.
All green in build 6 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO we can move this recipe forward, it can be a starting point to improve it. We know there are some really hard recipes that are not perfect, and they might suffer breaking (really breaking) changes in the future (recipe revisions to the rescue!). But I think it is better to start having something and work on top of it.
More people will start to contribute to the effort if they see there is something already available.
I'm a Linux user (BTW I use Arch), if it builds on Linux, it's work for me and we can improve later, as Javier said |
Specify library name and version: gcc/10.1.0
conan-center hook activated.