Opened 7 weeks ago

Last modified 4 weeks ago

#55160 assigned defect

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 weeks ago.
spectrogram.cpp.diff (2.1 KB) - added by jmroot (Joshua Root) 4 weeks ago.
possible fix

Download all attachments as: .zip

Change History (5)

Changed 7 weeks ago by Polyergic (Shad Sterling)

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

  • Cc mk@… removed
  • Owner set to mkae
  • Status changed from new to assigned

Changed 4 weeks ago by jmroot (Joshua Root)

possible fix

comment:2 Changed 4 weeks ago by jmroot (Joshua Root)

Attached patch should theoretically work; please test.

comment:3 Changed 4 weeks 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.

Note: See TracTickets for help on using tickets.