ports/127223: [patch] audio/last.fm - unbreak build on amd64

Andrius Morkūnas hinokind at gmail.com
Mon Sep 8 22:00:09 UTC 2008


>Number:         127223
>Category:       ports
>Synopsis:       [patch] audio/last.fm - unbreak build on amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 08 22:00:09 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Andrius Morkūnas
>Release:        FreeBSD 7.1-PRERELEASE amd64
>Organization:
>Environment:
FreeBSD bsd 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Thu Sep  4 00:42:41 EEST 2008     hinokind at bsd:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Recent audio/last.fm update to version 1.3.2.14 has made the port unbuildable on amd64.

build fails while compiling mp3transcode.cpp:
mp3transcode.cpp:284: error: no matching function for call to 'qMin(int&, ssize_t)'

For some (invalid) reason someone decided to cast int to ssize_t. Because on amd64 (and probably some other platforms) ssize_t is not the same as int, compiler lets you enjoy failed builds.
>How-To-Repeat:
Try building audio/last.fm on amd64.
>Fix:
In the same source file function qMin(int, int) is called four times so its safe to assume one more qMin(int, int) instead of qMin(int, ssize_t(int)) wont do anything bad. Other than that I found no problems with the source code.

I'm not sure about the USE_GCC=4.2+ in makefile but it was there before, so I put it back.

Patch attached with submission follows:

diff -ruN last.fm/Makefile last.fm.fixed/Makefile
--- last.fm/Makefile	2008-09-07 18:25:11.000000000 +0300
+++ last.fm.fixed/Makefile	2008-09-08 12:51:00.000000000 +0300
@@ -28,7 +28,7 @@
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == "amd64"
-BROKEN=		Does not install
+USE_GCC=4.2+
 .endif
 
 post-patch:
diff -ruN last.fm/files/patch-src_mp3transcode_mp3transcode.cpp last.fm.fixed/files/patch-src_mp3transcode_mp3transcode.cpp
--- last.fm/files/patch-src_mp3transcode_mp3transcode.cpp	1970-01-01 03:00:00.000000000 +0300
+++ last.fm.fixed/files/patch-src_mp3transcode_mp3transcode.cpp	2008-09-08 01:48:48.000000000 +0300
@@ -0,0 +1,11 @@
+--- src/mp3transcode/mp3transcode.cpp.orig	2007-09-27 17:37:07.000000000 +0300
++++ src/mp3transcode/mp3transcode.cpp	2008-09-08 01:43:36.000000000 +0300
+@@ -281,7 +281,7 @@
+ {
+     int length;
+     int cnt;
+-    length = qMin( numBytes, ssize_t( getDecodedBufferFilled() ) );
++    length = qMin( numBytes, getDecodedBufferFilled() );
+ 
+     while (length > 0)
+     {


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list