Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#42707 closed defect (fixed)

mythtv-core.25: build fails on Mavericks due to missing function abs()

Reported by: dbevans (David B. Evans) Owned by: ctreleaven (Craig Treleaven)
Priority: Normal Milestone:
Component: ports Version:
Keywords: mavericks haspatch Cc:
Port: mythtv-core.25

Description

Build fails as follows:

/usr/bin/clang++ -c -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -fomit-frame-pointer -fPIC -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -O3 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.9 -fPIC -DMMX -DUSING_APPLEREMOTE -D_GNU_SOURCE -DUSE_LIRC -DUSE_OPENGL_PAINTER -DUSING_QTWEBKIT -DMUI_API -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtOpenGL.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtSql.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include -I/opt/local -I/opt/local/include/libxml2 -I../libmythbase -I../.. -I.. -I../../external/FFmpeg -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtSql.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtOpenGL.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -F/opt/local/Library/Frameworks -F/opt/local/lib -o mythgesture.o mythgesture.cpp
In file included from mythuihelper.cpp:30:
In file included from ./mythprogressdialog.h:6:
In file included from ./mythscreentype.h:5:
In file included from ./mythuitext.h:5:
In file included from /opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers/QTextLayout:1:
In file included from /opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers/qtextlayout.h:50:
In file included from /opt/local/include/QtGui/qevent.h:52:
/opt/local/include/QtGui/qmime.h:119:10: warning: private field 'type' is not used [-Wunused-private-field]
    char type;
         ^
mythgesture.cpp:287:9: error: use of undeclared identifier 'abs'; did you mean 'fabs'?
    if (abs(delx) > abs(dely))
        ^~~
        fabs
/usr/include/math.h:431:15: note: 'fabs' declared here
extern double fabs(double);
              ^
mythgesture.cpp:287:21: error: use of undeclared identifier 'abs'; did you mean 'fabs'?
    if (abs(delx) > abs(dely))
                    ^~~
                    fabs
/usr/include/math.h:431:15: note: 'fabs' declared here
extern double fabs(double);
              ^
2 errors generated.
make[2]: *** [mythgesture.o] Error 1

Attachments (2)

main.log (801.7 KB) - added by dbevans (David B. Evans) 11 years ago.
Build log showing failure
patch-mythtv-core.25_2014Mar03_01.diff (3.6 KB) - added by ctreleaven (Craig Treleaven) 11 years ago.
Fixes build on Mavericks/XCode 5

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by dbevans (David B. Evans)

Attachment: main.log added

Build log showing failure

comment:1 Changed 11 years ago by dbevans (David B. Evans)

Keywords: mavericks added

comment:2 Changed 11 years ago by ctreleaven (Craig Treleaven)

Hey, I recognize that! That's a Clang issue--I just found the proper patch for with mythtv-core.27. I suspect mythtv-core.26 will wander off into the weeds at the same spot.

I'll test the patch on .25 today--would you be able to commit it for me?

comment:3 in reply to:  2 Changed 11 years ago by dbevans (David B. Evans)

Replying to ctreleaven@…:

Hey, I recognize that! That's a Clang issue--I just found the proper patch for with mythtv-core.27. I suspect mythtv-core.26 will wander off into the weeds at the same spot.

Appears to be Mavericks specific as build was successful on ML, Lion, SL buildbots. mythtv-core.26 builds successfully on all build bots so no problem there.

I'll test the patch on .25 today--would you be able to commit it for me?

Sure, no problem.

comment:4 Changed 11 years ago by ctreleaven (Craig Treleaven)

Update for mythtv-core.25 to follow. The new source code patch is adapted from a commit that went into 0.27 recently. (If I was really curious, I'd go find out why 0.26 _isn't_ affected. But I'm not that curious!) Also fix livecheck while there.

Changed 11 years ago by ctreleaven (Craig Treleaven)

Fixes build on Mavericks/XCode 5

comment:5 Changed 11 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

Committed in r117565. Build successful on all build bots.

comment:6 Changed 11 years ago by dbevans (David B. Evans)

Keywords: haspatch added
Note: See TracTickets for help on using tickets.