-
Notifications
You must be signed in to change notification settings - Fork 5
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
Change cmake config to use gcc #76
Conversation
build/CMakeLists.txt
Outdated
@@ -6,8 +6,8 @@ set(PROJECT_NAME hookman) | |||
set(ARTIFACTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/artifacts) | |||
|
|||
if(NOT WIN32) | |||
set(CMAKE_C_COMPILER clang) | |||
set(CMAKE_CXX_COMPILER clang++) | |||
set(CMAKE_C_COMPILER cc) |
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.
What happens if these 4 lines are removed, and we leave the defaults? (If the result is the same, it's better to remove the lines)
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 can try it. You mean, remove the whole if
?
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
hookman/hookman_generator.py
Outdated
@@ -589,13 +589,13 @@ def _plugin_cmake_file_content(self, plugin_id): | |||
set(ARTIFACTS_DIR ${{CMAKE_CURRENT_SOURCE_DIR}}/artifacts) | |||
|
|||
if(NOT WIN32) | |||
set(CMAKE_C_COMPILER clang) | |||
set(CMAKE_CXX_COMPILER clang++) | |||
set(CMAKE_C_COMPILER cc) |
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.
Could these two lines be removed?
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 will try.
Is the fail also on master? I'll ask @williamjamir to take a look on this, then |
First of all, thanks for to take a look on this issue =) To solve the issue, you need to re-run the test (locally) with the |
Currently, only appveyor on python 3.7 is failing. I'm hoping to fix this issue by migrating the CI to |
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.
Please take a look at the comments
Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
- Coverage 99.57% 98.52% -1.06%
==========================================
Files 7 7
Lines 474 474
==========================================
- Hits 472 467 -5
- Misses 2 7 +5 |
Thanks, @williamjamir! Now all tests are passing!! |
environment.devenv.yml
Outdated
- compilers | ||
- gxx_impl_linux-64 | ||
- gcc_impl_linux-64 | ||
- gxx_linux-64 | ||
- gcc_linux-64 |
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.
@tadeu @arthursoprana I need some help here, please. The thing is: conda env breaks if we use compilers
only. Then I took a look at eden
and included here a similar stack for C/Cpp. However, in Travis, the compilers are gathered from the system instead of the env. Please take a look at the snippet below:
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
Is this OK? What do you recommend?
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.
No, it should use the compiler from the environment. Probably the line set(CMAKE_CXX_COMPILER c++)
(etc.) is messing up, it's trying to find c++
instead of what conda
defines in the CXX
env var (and the CC
env var).
The GCC version should be 7.3.0 (this 5.4.0 is from some compiler installed in the CI system)
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.
Ok, I will try to seek a way to fix this problem
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.
@tadeu fixed. The thing is: the CI test is performed within an env created by tox
. However, conda_deps
inside tox.ini
doesn't include C/C++ compilers according to conda
. So, inside tox
env, there is no compiler, therefore the compilers will be gathered from system. I had to change tox.ini
to include a minimal set of compilers for C and C++. I'm aware about compilers
from conda
, they are intend to be used for builds, but I think that we are OK using such package for tests with tox
here.
tox.ini
Outdated
conda-forge::gcc_linux-64==7.3.0 | ||
conda-forge::gcc_impl_linux-64==7.3.0 | ||
conda-forge::gxx_linux-64==7.3.0 | ||
conda-forge::gxx_impl_linux-64==7.3.0 | ||
libgcc-ng==7.3.0 | ||
libstdcxx-ng==7.3.0 | ||
binutils_linux-64==2.31.1 | ||
binutils_impl_linux-64==2.31.1 |
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, thanks a lot for the help! Don't you think that would be interesting if we use >=
to keep track of updates in the compilers?
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, let's see first if this works first, its just a guess :)
If it works, we change to >=
Meh, it didn't work, it's probably because of Maybe we should change to use |
That can be checked by adding a
I'm fine with it. 👍 |
Nice, then. Maybe we can use the "compiler set for build" ( What do you think, @tadeu @nicoddemus @arthursoprana @williamjamir? Or it would be better to forget it and just set it in Travis (just as @tadeu said)? |
Builds OK, except for appveyor, but this is expected (and we hope that it will be fixed when we move to GH Actions). Please note that the compilers are properly used from tox env with the current |
A kind ping here, since @tadeu approved recently this PR and I don't know what to do at the moment. Cheers! |
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 guess if this is passing you may merge it ;)
But appveyor is failing...
The appVeyor is broken with the following message: Solving environment: ...working... failed
PackagesNotFoundError: The following packages are not available from current channels:
- conda-forge::gcc_impl_linux-64==7.3.0
- conda-forge::gxx_impl_linux-64==7.3.0
- conda-forge::gxx_linux-64==7.3.0
- conda-forge::gcc_linux-64==7.3.0
Current channels: |
As soon as I have some time, I'll come back here. Perhaps the channel name |
- conda-forge::gcc_linux-64==7.3.0 | ||
- conda-forge::gcc_impl_linux-64==7.3.0 | ||
- conda-forge::gxx_linux-64==7.3.0 | ||
- conda-forge::gxx_impl_linux-64==7.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.
These packages cannot be found at the moment. Further investigation is required.
Dumb question... it's a publicly available ESSS package. So I should check compiler-related package versions. |
Is this still relevant or can we close this? |
I think this is a really old PR, and don't even know if this is still worthy. IMHO, we can decline it, @nicoddemus. If we need something as we have in this PR, it is easy to redo. |
Can you delete it then please @volpatto ? Ask Bender:
|
Actually I just realized you probably only created this branch in this repository right? Then just close it here please. 👍 |
This PR changes the C and C++ compilers to use gcc family instead clang as required in #70.
Remarks:
I changed the code generation in
hookman/hookman_generator.py
, please see lines 592-598 there.Instead installing
clang-dev
fromconda-forge
, nowcompilers
is required (as we need both C and C++ compilers).One of the tests is failing. The error is related to
pytest-datadir
and file regression. I have no previous experiences with this plugin and I have been facing some struggle with it. I need some help in this regard.Thanks in advance.