Opened 11 years ago

Closed 11 years ago

#11574 closed Bug Report - General (Fixed)

OSX build fails - mythcommandlineparser.cpp

Reported by: Craig Treleaven <ctreleaven@…> Owned by: JYA
Priority: minor Milestone: unknown
Component: Ports - OSX Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Attempted to build the head of the devel/logging branch on OS X and it fails on some conditional code:

mythcommandlineparser.cpp: In member function ‘int MythCommandLineParser::Daemonize()’:
mythcommandlineparser.cpp:2765: error: ‘ENO_STR’ was not declared in this scope

Missing include?

Happy to supply more info if needed.

Change History (5)

comment:1 Changed 11 years ago by Karl Egly

Component: MythTV - GeneralPorts - OSX
Owner: set to JYA

this is OSX specific code, added in [47561dcf9]

comment:2 Changed 11 years ago by JYA

Resolution: Works for me
Status: newclosed

compile every day without issue

comment:3 Changed 11 years ago by Craig Treleaven <ctreleaven@…>

Specifically, you've built the devel/logging branch?

Daniel's commit <https://github.com/MythTV/mythtv/commit/643fef44bdc6fece4c3e5fc90d16313bc20d458c> deleted the definition of ENO_STR and changed ENO to be a "a QString containg a description of the * thread local errno variable."

He changed line 2771 as follows:

  • cerr << "Could not open pid file: " << ENO_STR << endl;

+ cerr << "Could not open pid file: " << qPrintable(ENO) << endl;

The line at 2765 (in the CONFIG_DARWIN block) needs a corresponding change. See the devel/logging version of the file at: https://github.com/MythTV/mythtv/blob/devel/logging/mythtv/libs/libmythbase/mythcommandlineparser.cpp

comment:4 Changed 11 years ago by danielk

Resolution: Works for me
Status: closednew

There is no call setting the errno in the CONFIG_DARWIN path for daemonizing, so there should be no ENO_STR or ENO macro usage there. Also 'unavailable' has typo, and I'm wouldn't say daemonizing is unavailable in OSX it is simply not implemented (for some reasonable reasons).

Note: If this were just a case of replacing ENO_STR with qPrintable(ENO), then it would really be my responsibility since devel/logging is not merged to master yet. But since the ENO_STR macro looks like it shouldn't be there at all I'm leaving in jya's hands. (jya, just fix it in master and I'll merge it to devel/logging.)

comment:5 Changed 11 years ago by JYA

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.