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

DataFormats/Common : Changes needed to compile with macOS clang and libc++ #17348

Merged
merged 3 commits into from Feb 8, 2017
Merged

DataFormats/Common : Changes needed to compile with macOS clang and libc++ #17348

merged 3 commits into from Feb 8, 2017

Conversation

gartung
Copy link
Member

@gartung gartung commented Jan 31, 2017

No description provided.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @gartung (Patrick Gartung) for CMSSW_9_0_X.

It involves the following packages:

DataFormats/Common

@cmsbuild, @smuzaffar, @Dr15Jones, @davidlange6 can you please review it and eventually sign? Thanks.
@makortel, @wddgit, @wmtan this is something you requested to watch as well.
@davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@gartung gartung changed the title Changes needed to compile with macOS clang and libc++ DataFormats/Common : Changes needed to compile with macOS clang and libc++ Jan 31, 2017
@@ -78,6 +77,9 @@ namespace edm {
/// to use only comparators provided with CMSSW release.
template<typename CMP>
range get(ID id, CMP comparator) const {
#ifndef _LIBCPP_VERSION
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we try removing this all together to see if it was needed at all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it gets used in the main cpp file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please try rebuilding without this using.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@gartung
Copy link
Member Author

gartung commented Feb 7, 2017

Probably needs to be merged at the same time as
#17351

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

Pull request #17348 was updated. @cmsbuild, @smuzaffar, @Dr15Jones, @davidlange6 can you please check and sign again.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/17674/console Started: 2017/02/07 19:40

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

-1

Tested at: 498136e

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-17348/17674/summary.html

I found follow errors while testing this PR

Failed tests: Build ClangBuild

  • Build:

I found an error when building:

>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testOneToManyAssociation.cc 
>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testAssociationVector.cc 
In file included from /cvmfs/cms-ib.cern.ch/nweek-02458/slc6_amd64_gcc530/external/gcc/5.3.0/include/c++/5.3.0/cassert:43:0,
                 from /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testBoostRange.cpp:9:
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testBoostRange.cpp: In function 'void test_sort(R)':
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testBoostRange.cpp:99:13: error: 'is_sorted' is not a member of '__gnu_cxx'
     assert(!__gnu_cxx::is_sorted(r.begin(), r.end(), DummySorter()));
             ^
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testBoostRange.cpp:99:13: note: suggested alternative:
In file included from /cvmfs/cms-ib.cern.ch/nweek-02458/slc6_amd64_gcc530/external/gcc/5.3.0/include/c++/5.3.0/algorithm:62:0,
                 from /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/interface/OrphanHandleBase.h:25,

  • Clang:

I found a compilation error while trying to compile with clang:
I used this command:
scram b vclean && scram build -k -j 16 USER_CXXFLAGS='-fsyntax-only' COMPILER='llvm compile'

Selected class -> edm::Wrapper for ROOT: edm::Wrapper> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testRangeMap.cc 
>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testSortedCollection.cc 
>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testIDVectorMap.cc 
>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/ref_t.cppunit.cc 
>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/DetSetRefVector_t.cppunit.cc 
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_0_X_2017-02-06-2300/src/DataFormats/Common/test/testBoostRange.cpp:99:13: error: no member named 'is_sorted' in namespace '__gnu_cxx'; did you mean 'std::is_sorted'?
    assert(!__gnu_cxx::is_sorted(r.begin(), r.end(), DummySorter()));
            ^~~~~~~~~~~~~~~~~~~~
            std::is_sorted
/usr/include/assert.h:89:5: note: expanded from macro 'assert'
  ((expr)                                                               \


@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

Comparison not run due to Build errors (RelVals and Igprof tests were also skipped)

@Dr15Jones
Copy link
Contributor

Try replacing __gnu_cxx::is_sorted with std::is_sorted.
http://en.cppreference.com/w/cpp/algorithm/is_sorted

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

Pull request #17348 was updated. @cmsbuild, @smuzaffar, @Dr15Jones, @davidlange6 can you please check and sign again.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/17676/console Started: 2017/02/07 21:12

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

Comparison job queued.

@Dr15Jones
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

This pull request is fully signed and it will be integrated in one of the next CMSSW_9_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 7, 2017

@davidlange6
Copy link
Contributor

+1
(better to avoid unneeded whitespace changes in header files in the future...)

@cmsbuild cmsbuild merged commit f3c06e8 into cms-sw:CMSSW_9_0_X Feb 8, 2017
@gartung
Copy link
Member Author

gartung commented Feb 8, 2017

@davidlange6 whitespace was a remnant of a merge. Pardon my spaces...

@gartung gartung deleted the DataFormats-Common-macos-clang-fixes branch March 13, 2017 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants