#65300 closed defect (fixed)

ddrescue: @1.26.0: compilation fails for 10.7 through 10.11: error: no member named 'exit' in namespace 'std'

Reported by: mascguy (Christopher Nielsen) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: tehcog (tehcog)
Port: ddrescue

Description (last modified by mascguy (Christopher Nielsen))

It looks like we either need to declare use of a newer C++ standard, or blacklist older Clang versions. (The latter solves the issue, based on local testing.)

loggers.cc:61:12: error: no member named 'exit' in namespace 'std'
      std::exit( 1 ); }
      ~~~~~^
loggers.cc:65:12: error: no member named 'exit' in namespace 'std'
      std::exit( 1 ); }
      ~~~~~^
2 errors generated.

https://ports.macports.org/port/ddrescue/details/

Change History (7)

comment:1 Changed 23 months ago by mascguy (Christopher Nielsen)

Description: modified (diff)

comment:2 Changed 23 months ago by mascguy (Christopher Nielsen)

Description: modified (diff)

comment:3 Changed 23 months ago by mascguy (Christopher Nielsen)

comment:4 Changed 23 months ago by jmroot (Joshua Root)

This is a bug in the code, it uses std::exit without including <cstdlib>.

comment:5 Changed 23 months ago by tehcog (tehcog)

Cc: tehcog added

comment:6 Changed 23 months ago by Christopher Nielsen <mascguy@…>

In 89bb5b4e4117746c89d96ea3238886ec39f19ea3/macports-ports (master):

ddrescue: fix compilation error: std::exit

  • Add include for cstdlib, to fix compilation with older compilers

See: #65300

comment:7 Changed 23 months ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

seems to build on all systems according to ports.macports.org

Note: See TracTickets for help on using tickets.