Opened 7 years ago

Closed 7 years ago

#55160 closed defect (fixed)

kdenlive fails to build on High Sierra: spectrogram.cpp:244: 81: error: call to 'abs' is ambiguous

Reported by: Polyergic (Shad Sterling) Owned by: mkae (Marko Käning)
Priority: Normal Milestone:
Component: ports Version:
Keywords: highsierra Cc:
Port: kdenlive

Description

Reinstalling all ports after upgrading to High Sierra, a few are failing to build, including kdenlive:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_kdenlive/kdenlive/work/kdenlive-0.9.10/src/scopes/audioscopes/spectrogram.cpp:244:
81: error: call to 'abs' is ambiguous
:info:build                 hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x-(leftDist + mouseX + 20)) < (int) minDistX + 16
:info:build                                                                                 ^~~
:info:build /usr/include/stdlib.h:137:6: note: candidate function
:info:build int      abs(int) __pure2;
:info:build          ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:115:44: note: candidate function
:info:build inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
:info:build                                            ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:117:44: note: candidate function
:info:build inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
:info:build                                            ^

(there are many more candidate functions noted)

Attachments (2)

main.log (1.7 MB) - added by Polyergic (Shad Sterling) 7 years ago.
spectrogram.cpp.diff (2.1 KB) - added by jmroot (Joshua Root) 7 years ago.
possible fix

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Polyergic (Shad Sterling)

Attachment: main.log added

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: mk@… removed
Owner: set to mkae
Status: newassigned

Changed 7 years ago by jmroot (Joshua Root)

Attachment: spectrogram.cpp.diff added

possible fix

comment:2 Changed 7 years ago by jmroot (Joshua Root)

Attached patch should theoretically work; please test.

comment:3 Changed 7 years ago by Polyergic (Shad Sterling)

Took a few tries to apply the patch properly; eventually did this:

sudo cp ~/Downloads/spectrogram.cpp.diff /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/multimedia/kdenlive/files/
sudo chmod a+r /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/multimedia/kdenlive/files/spectrogram.cpp.diff
sudo nano /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/multimedia/kdenlive/Portfile
## insert line 43:    patchfiles-append spectrogram.cpp.diff
sudo port clean kdenlive
sudo port install kdenlive +docs

And now the build succeeds.

comment:4 Changed 7 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In 1172b7995fed46fdaa3b3b505a8ae921b6f6bdac/macports-ports:

kdenlive: fix ambiguous function calls

Maintainer timeout.
Closes: #55160

Note: See TracTickets for help on using tickets.