Bug 173906 - [patch] audio/last.fm: fix build with clang
Summary: [patch] audio/last.fm: fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Tilman Keskinoz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-25 12:50 UTC by Rainer Hurling
Modified: 2012-12-02 12:47 UTC (History)
0 users

See Also:


Attachments
file.diff (457 bytes, patch)
2012-11-25 12:50 UTC, Rainer Hurling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Hurling freebsd_committer 2012-11-25 12:50:00 UTC
Trying to build audio/last.fm with clang (systems compiler) ends up with this error:

cd src/libFingerprint/fplib/pro_qmake/ && /usr/local/bin/qmake-qt4 /usr/ports/audio/last.fm/work/last.fm-1.4.2.58240/src/libFingerprint/fplib/pro_qmake/fplib.pro -config release -o Makefile.fplib
WARNING: /usr/ports/audio/last.fm/work/last.fm-1.4.2.58240/src/libUnicorn/unicorn.pro.inc:9: Variable LIBPATH is deprecated; use QMAKE_LIBDIR instead.
cd src/libFingerprint/fplib/pro_qmake/ && /usr/bin/make -f Makefile.fplib all
clang++ -c -pipe -O2 -w -fPIC -DNBREAKPAD -DNDEBUG -I/usr/local/share/qt4/mkspecs/freebsd-clang -I. -I../../../../src -I../../../../build -I../../../libMoose -I../../../libUnicorn -I../include -I../src -I../../libs/fftw/src/api -I../../../../res/libsamplerate -I/usr/local/include/qt4 -I/usr/local/include -o ../../../../build/fplib/release/FingerprintExtractor.o ../src/FingerprintExtractor.cpp
In file included from ../src/FingerprintExtractor.cpp:40:
./src/FloatingAverage.h:81:28: error: reference to non-static member function must be called; did you mean to call it with
      no arguments?
      for ( int i = 0; i < size; ++i )
                           ^~~~
                               ()
1 error generated.
*** [../../../../build/fplib/release/FingerprintExtractor.o] Error code 1
Stop in /usr/ports/audio/last.fm/work/last.fm-1.4.2.58240/src/libFingerprint/fplib/pro_qmake.
*** [sub-src-libFingerprint-fplib-pro_qmake-fplib-pro-all-ordered] Error code 1
Stop in /usr/ports/audio/last.fm/work/last.fm-1.4.2.58240.
*** [do-build] Error code 1

Fix: It seems the problem is, that 'size' is not declared. I am not sure, if my patch from below is the correct solution, but it works. Please, have a look if declaring

const int size = m_values.size();

is the right way for that, thanks.

Patch attached with submission follows:
How-To-Repeat: Build audio/last.fm with clang.
Comment 1 Edwin Groothuis freebsd_committer 2012-11-25 12:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->arved

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Tilman Keskinoz freebsd_committer 2012-12-02 12:47:39 UTC
State Changed
From-To: open->closed

committed, thanks