Ticket #7194 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Code no longer compiles with clang and libstdc++ < 4.4

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 2.6
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Owen Arnold

Description (last modified by Martyn Gigg) (diff)

There are several places using std::unique_ptr, which is not available on the current version of the standard library on clang. We have typedefs around them but they only check for the intel compiler. The check should be whether we are using libstdc++ lower than 4.4.0: See http://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html

Change History

comment:1 Changed 7 years ago by Martyn Gigg

The following files seem to contain the bad typedefs:

  • LoadMD
  • SaveMD
  • MDBoxFlatTree

comment:2 Changed 7 years ago by Martyn Gigg

  • Description modified (diff)

comment:3 Changed 7 years ago by Martyn Gigg

Move compiler check from INTEL to GLIBCXX & version.

This should allow clang to still compile the code using an older version of the stdc++ library that does not have unique_ptr. Refs #7194

Changeset: 5a494f728f3781e9e8cc9e08bdba9b8582497d30

comment:4 Changed 7 years ago by Martyn Gigg

Move compiler check from INTEL to GLIBCXX & version.

This should allow clang to still compile the code using an older version of the stdc++ library that does not have unique_ptr. Refs #7194

Changeset: 8da237a38ea54fe68865a5384e0a521759722ca8

comment:5 Changed 7 years ago by Martyn Gigg

  • Owner set to Martyn Gigg
  • Status changed from new to accepted

comment:6 Changed 7 years ago by Martyn Gigg

Merge branch 'bugfix/7194_clang_errors' into develop

comment:7 Changed 7 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

Branch: bugfix/7194_clang_errors

Tester: The code should still be compiling on develop. Feel free to check that it compiles without using the intel compiler on the Mac too.

comment:8 Changed 7 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:9 Changed 7 years ago by Owen Arnold

  • Status changed from verifying to closed

I've compiled this with the native c++ compiler on Mac OSX 10.8. I've used the CMake project defaults for everything.

Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.1
Thread model: posix

comment:10 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:11 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8040

Note: See TracTickets for help on using tickets.