-
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
[gcc] Migrate recipe to conan v2, add gfortran to compilation #13896
[gcc] Migrate recipe to conan v2, add gfortran to compilation #13896
Conversation
46e693d
to
cdad4e7
Compare
This comment has been minimized.
This comment has been minimized.
2218a5b
to
4cc233b
Compare
This comment has been minimized.
This comment has been minimized.
4cc233b
to
1670b5b
Compare
This comment has been minimized.
This comment has been minimized.
This relies on Conan 1.53.0 - any indications when this might be installed on the CI @prince-chrismc ? |
#13753 needs to go in but it's a national holiday in spain tomorrow so hopefully Wednesdays 🤞 |
recipes/gcc/all/conanfile.py
Outdated
# Ensure binutils and flex are on the path | ||
buildenv = VirtualBuildEnv(self) |
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 automatic in 2.0 fyi and there a conf for 1.x to match the 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.
Yep, appreciated. I think my preference would be to force it here rather than relying on the conf value, and remove it when conan 2.0 rolls around. Is that acceptable?
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.
Super minor nits but I really like this! amazing work!
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
* Migrate gcc recipe to conan v2 * Add fortran as an enabled language to ensure that gfortran is built * Add binutils as a build_requires to remove dependency on system binaries * Refactor package test to ensure that the package compilers are under test and not the system compilers * Add fortran test binary * Export environment variables in the buildenv for gcc, g++, gfortran, ar, nm, ranlib
* Include call to action to submit PR for unimplemented changes * Remove appendage to buildenv PATH as this is redundant - already performed by modern generators Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
* Add version 11.3.0 * Revert conan test_package name from GccTestConan to TestPackageConan to reduce noise in the diff. This is a no-op as the test package class name is relatively meaningless - it doesn't need to be descriptive.
027fda3
to
16e70dc
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Missing conanfile looks sus |
This comment has been minimized.
This comment has been minimized.
Ohh the error message is way confusing! |
Yeah. Given this comment: #14943 (comment), I might just revert the features that require conan 1.55.0 and we can make improvements to the recipe when the c3i version catches up. |
* Revert transition to autotools.install(target="install-strip") because c3i doesn't support conan 1.55.0. * Add `--prefix` and `--libexecdir` configure arguments to support legacy `autotools.make(target="install-strip")` function call.
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 1c22955gcc/12.2.0
gcc/10.2.0
gcc/11.3.0
|
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 PR does a lot of heaving lifting and I think it's close enough to get a green check.
I did not see any blockers
d59afa6
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit d59afa6gcc/11.3.0
gcc/10.2.0
gcc/12.2.0
|
This comment has been minimized.
This comment has been minimized.
…age compatibility is not a consideration
Conan v1 pipelineAll green in build 28 (
Conan v2 pipeline (informative, not required for merge)Failure in build 28 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
Hooks produced the following warnings for commit 924e331gcc/12.2.0
gcc/10.2.0
gcc/11.3.0
|
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.
Considering what we have done in Conan Docker Tools, this recipe looks pretty close, or even better. Assuming that Linux is working now and it's well documented that both Mac and Windows need to be added, I'm totally fine as first step. Thank you for updating it.
…mpilation * [gcc] Migrate to conan v2, add fortran * Migrate gcc recipe to conan v2 * Add fortran as an enabled language to ensure that gfortran is built * Add binutils as a build_requires to remove dependency on system binaries * Refactor package test to ensure that the package compilers are under test and not the system compilers * Add fortran test binary * Export environment variables in the buildenv for gcc, g++, gfortran, ar, nm, ranlib * Apply suggestions from code review * Include call to action to submit PR for unimplemented changes * Remove appendage to buildenv PATH as this is redundant - already performed by modern generators Co-authored-by: Chris Mc <prince.chrismc@gmail.com> * [gcc] Add version 11.3.0 * Add version 11.3.0 * Revert conan test_package name from GccTestConan to TestPackageConan to reduce noise in the diff. This is a no-op as the test package class name is relatively meaningless - it doesn't need to be descriptive. * [gcc] Fix compiler cannot create executables * Fix 'compiler cannot create executables' error by removing AutotoolsDeps script generation, which was erroneously inserting $LIBS into the compilation command of the test executable without also injecting $LDFLAGS, which caused a failure to compile. * Add libexecdir override * Use the zlib dependency * [gcc] Add legacy environment variables for v1 compatibility * Add legacy env_info environment variable definitions for conan v1 compatibility * [gcc] Fix Macos compatibility * Fix Macos compatibility by moving make arguments into the single call to `append()` * Remove binutils as a build requirement for Macos as the conan binutils package is broken for Macos * [gcc] Remove Macos as a valid build * Remove Macos as a valid build since c3i CI still produces errors that can't be replicated locally * Change criteria for inclusion of binutils to be if the os is Linux rather than not Macos, since Windows will require the utilities provided by msys/mingw64, and the package is broken for Macos, so it makes sense to constrain the usage of this to Linux environments. * Prevent users from attempting to build the package with msvc. The build instructions for GCC state that the MinGW toolchain is a requirement, with a GNU compiler when building on windows: https://gcc.gnu.org/wiki/WindowsBuilding * Modify layout to use src instead of source for source folder Co-authored-by: Chris Mc <prince.chrismc@gmail.com> * [gcc] Modify for more idiomatic recipe * Bump zlib dependency to 1.2.13 * Use is_msvc() istead of comparing compiler strings * Use FIXME for notes to make them findable easily * Remove guard for v1 specific logic * [gcc] Use new dependencies interface rather than deps_cpp_info Adds conan 2.0 compatibility by using the dependencies interface rather than deps_cpp_info Co-authored-by: Uilian Ries <uilianries@gmail.com> * [gcc] Modernise AutoTools usage * Remove manual prefix specification in favour of the default `/` and creation of a portable package using DESTDIR * Use the `Autotools.install()` method instead of `Autotools.make()` with a target override to `install-strip` for more semantic consistency * Remove libexecdir override to be compatible with DESTDIR for package portability * [gcc] Bump required conan version * Removed unused imports * Bump required conan version to 1.55.0 to make use of new target argument for Autotools.install() * [gcc] Remove reference to self.info.settings in build_requirements * Replace with self.settings instead. * [gcc] Revert "Modernise AutoTools usage" * Revert transition to autotools.install(target="install-strip") because c3i doesn't support conan 1.55.0. * Add `--prefix` and `--libexecdir` configure arguments to support legacy `autotools.make(target="install-strip")` function call. * [gcc] Move from `self.info.settings` to `self.settings` in validate method * [gcc] Remove self.info.settings in favour of self.settings where package compatibility is not a consideration Co-authored-by: Chris Mc <prince.chrismc@gmail.com> Co-authored-by: Uilian Ries <uilianries@gmail.com>
…-index * 'develop' of octocat.dlogics.com:datalogics/conan-center-index: (259 commits) Allow empty keys in dlproject.yaml for merging tasks (conan-io#15093) [libjpeg] Update sha256 for 9e (conan-io#15123) faac: add Visual Studio support + drop 1.28 (conan-io#14103) gmp: conan v2 support (conan-io#14982) rapidyaml: add version 0.5.0 (conan-io#15122) m4: use positional arguments when calling self.run() (conan-io#15091) catch2.x.x: Fix test_package for v2 (conan-io#12938) capnproto: conan v2 support (conan-io#15097) http_parser: modernize (conan-io#15096) perlinnoise: add recipe (conan-io#15088) Make openexr v2 compatible (conan-io#15056) qt5: Apple OSs don't require CROSS_COMPILE option (conan-io#14974) libxshmfence: generate gcc11 binaries (conan-io#14903) arrow: remove patch for CMake (conan-io#14874) faac: conan v2 support (conan-io#13896) [gcc] Migrate recipe to conan v2, add gfortran to compilation Revert "(conan-io#14221) [config] Use larger resources to build cppfront packages" (conan-io#14953) (conan-io#15086) openh264: fix tools legacy (conan-io#15085) Make xkeyboard-config v2 compatible (conan-io#15089) Raise required_conan_version for xorg/system ...
gfortran
recipe is broken: [package] gfortran/10.2: Missing files causing execution error #4696gcc
,g++
,gfortran
,ar
,nm
,ranlib
Specify library name and version: gcc/12.2.0
This is also a good place to share with all of us why you are submitting this PR (specially if it is a new addition to ConanCenter): is it a dependency of other libraries you want to package? Are you the author of the library? Thanks!
This PR builds on top of #13882, which adds gcc 12.2.0 as a dependency. I submitted two PRs for this because I wanted a stable working copy to work from as a baseline (I couldn't build 10.2.0 on Arch Linux due to a GLIBC breaking change and a lingering incompatibility)
If you'd like me to pull #13882 down in favour of just this PR, happy to do so.
Also, I note that there's an existing PR for a gcc conan v2 migration in #12165. I'd largely completed this when I realised that was available, but I'd noted that my implementation may be more mature than what exists in that PR so I thought I'd put this up for maintainers decide which to use.
This differs from that implementation in the following ways:
make install-strip
to install the package in all build typesThis hasn't been tested on Macos or Windows.