Skip to content
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

Fix broken compilation on Ubuntu 18.04 #104

Closed
wants to merge 1 commit into from
Closed

Fix broken compilation on Ubuntu 18.04 #104

wants to merge 1 commit into from

Conversation

mfasDa
Copy link
Contributor

@mfasDa mfasDa commented Jul 16, 2021

  • Add ignore_unused lambda ignoring return value
    of nice calls raising a warning for unused return value
    treated as error due to Werror
  • Add compiler flag ldl if present

- Add ignore_unused lambda ignoring return value
  of nice calls raising a warning for unused return value
  treated as error due to Werror
- Add compiler flag ldl if present
@mfasDa
Copy link
Contributor Author

mfasDa commented Jul 16, 2021

Fixing #102

@mfasDa
Copy link
Contributor Author

mfasDa commented Jul 29, 2021

@ironMann Could you please have a look at this pull request!

@ironMann
Copy link
Collaborator

@mfasDa sorry, can you check if dev or v1.0.1 works for you? I bundled your fixes with #106

@mfasDa
Copy link
Contributor Author

mfasDa commented Jul 29, 2021

Seems to be already merged, closing

@mfasDa mfasDa closed this Jul 29, 2021
@mfasDa
Copy link
Contributor Author

mfasDa commented Jul 29, 2021

@ironMann Just saw, thanks! Let me quickly check whether it builds now on Ubuntu

@mfasDa
Copy link
Contributor Author

mfasDa commented Jul 29, 2021

@ironMann Still getting an error (due to Werror) with the nice calls

2021-07-29@15:21:32:DEBUG:DataDistribution:DataDistribution:aliceo2: /software/markus/alice/sw/SOURCES/DataDistribution/aliceo2/0/src/common/base/DataDistLogger.h: In lambda function:
2021-07-29@15:21:32:DEBUG:DataDistribution:DataDistribution:aliceo2: /software/markus/alice/sw/SOURCES/DataDistribution/aliceo2/0/src/common/base/DataDistLogger.h:363:18: error: ignoring return value of 'int nice(int)' declared with attribute 'warn_unused_result' [-Werror=unused-result]
2021-07-29@15:21:32:DEBUG:DataDistribution:DataDistribution:aliceo2:   363 |       (void) nice(+1);
2021-07-29@15:21:32:DEBUG:DataDistribution:DataDistribution:aliceo2:       |              ~~~~^~~~
2021-07-29@15:21:32:DEBUG:DataDistribution:DataDistribution:aliceo2: /software/markus/alice/sw/SOURCES/DataDistribution/aliceo2/0/src/common/base/DataDistLogger.h: In lambda function:
2021-07-29@15:21:32:DEBUG:DataDistribution:DataDistribution:aliceo2: /software/markus/alice/sw/SOURCES/DataDistribution/aliceo2/0/src/common/base/DataDistLogger.h:377:18: error: ignoring return value of 'int nice(int)' declared with attribute 'warn_unused_result' [-Werror=unused-result]
2021-07-29@15:21:32:DEBUG:DataDistribution:DataDistribution:aliceo2:   377 |       (void) nice(+10);
2021-07-29@15:21:32:DEBUG:DataDistribution:DataDistribution:aliceo2:       |              ~~~~^~~~~

I think the trick with the lambda function with unnamed parameters is the only workaround safely ignoring the return value on all platforms.

One more info: Compiler is this (relevant for Werror treatment):

gcc (Ubuntu 10.3.0-1ubuntu1~18.04~1) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@mfasDa mfasDa reopened this Jul 29, 2021
@mfasDa
Copy link
Contributor Author

mfasDa commented Aug 4, 2021

Superseeded by #107

@mfasDa mfasDa closed this Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants