Date: Sat, 17 Dec 2011 04:13:02 +0700 From: Jan Beich <jbeich@tormail.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/163346: [patch] audio/spiralsynthmodular: unbreak build with clang/gcc46 Message-ID: <1RbfO5-000Fe5-7C@internal.tormail.net> Resent-Message-ID: <201112162140.pBGLe9dQ088316@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 163346 >Category: ports >Synopsis: [patch] audio/spiralsynthmodular: unbreak build with clang/gcc46 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 16 21:40:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Jan Beich >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: >Description: - do not substitute CXX recursively - include missing headers for g++46 >How-To-Repeat: http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp-clang.20111215000124.pointyhat-west/spiralsynthmodular-0.2.2a_6.log $ printf 'CC=gcc46\nCXX=g++46\nCPP=cpp46\n' >Makefile.local $ __MAKE_CONF= make [...] ===> Building for spiralsynthmodular-0.2.2a_6 g++4646 -c -O2 -pipe -fno-strict-aliasing -DNO_DEBUG -Wno-unused -fPIC -fPIC -I/usr/local/include -o main.o main.cpp g++4646: No such file or directory *** [main.o] Error code 1 $ __MAKE_CONF= make [...] g++46 -c -O2 -pipe -fno-strict-aliasing -DNO_DEBUG -Wno-unused -fPIC -fPIC -I/usr/local/include -o SpiralSound/SpiralInfo.o SpiralSound/SpiralInfo.C In file included from SpiralSound/SpiralInfo.h:26:0, from SpiralSound/SpiralInfo.C:24: SpiralSound/Sample.h: In member function 'Sample& Sample::operator=(const Sample&)': SpiralSound/Sample.h:106:51: error: 'memcpy' was not declared in this scope *** [SpiralSound/SpiralInfo.o] Error code 1 [...] g++46 -c -O2 -pipe -fno-strict-aliasing -DNO_DEBUG -Wno-unused -fPIC -fPIC -I/usr/local/include -o SpiralSound/ChannelHandler.o SpiralSound/ChannelHandler.C SpiralSound/ChannelHandler.C: In destructor 'ChannelHandler::~ChannelHandler()': SpiralSound/ChannelHandler.C:43:27: error: 'free' was not declared in this scope SpiralSound/ChannelHandler.C: In member function 'void ChannelHandler::UpdateDataNow()': SpiralSound/ChannelHandler.C:82:55: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C:90:55: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C:108:78: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C:117:66: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C:132:45: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C: In member function 'void ChannelHandler::RegisterData(const string&, ChannelHandler::Type, void*, int)': SpiralSound/ChannelHandler.C:177:35: error: 'malloc' was not declared in this scope SpiralSound/ChannelHandler.C:182:44: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C: In member function 'void ChannelHandler::GetData(const string&, void*)': SpiralSound/ChannelHandler.C:208:56: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C: In member function 'void ChannelHandler::SetData(const string&, void*)': SpiralSound/ChannelHandler.C:231:53: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C: In member function 'void ChannelHandler::FlushChannels()': SpiralSound/ChannelHandler.C:254:61: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C: In member function 'void ChannelHandler::BulkTransfer(const string&, void*, int)': SpiralSound/ChannelHandler.C:323:44: error: 'malloc' was not declared in this scope SpiralSound/ChannelHandler.C:325:52: error: 'memcpy' was not declared in this scope SpiralSound/ChannelHandler.C:326:16: error: 'free' was not declared in this scope *** [SpiralSound/ChannelHandler.o] Error code 1 [...] g++46 -c -O2 -pipe -fno-strict-aliasing -DNO_DEBUG -Wno-unused -fPIC -fPIC -I/usr/local/include -I../../../ -I/usr/local/include -o LADSPAInfo.o LADSPAInfo.C LADSPAInfo.C: In constructor 'LADSPAInfo::LADSPAInfo(bool, const char*)': LADSPAInfo.C:51:22: error: 'strlen' was not declared in this scope LADSPAInfo.C:52:34: error: 'strdup' was not declared in this scope LADSPAInfo.C: In member function 'void LADSPAInfo::ScanPathList(const char*, void (LADSPAInfo::*)(std::string, std::string))': LADSPAInfo.C:492:37: error: 'strncpy' was not declared in this scope *** [LADSPAInfo.o] Error code 1 >Fix: --- gcc46.diff begins here --- Index: audio/spiralsynthmodular/Makefile =================================================================== RCS file: /a/.csup/ports/audio/spiralsynthmodular/Makefile,v retrieving revision 1.23 diff -u -p -r1.23 Makefile --- audio/spiralsynthmodular/Makefile 15 Nov 2011 14:53:26 -0000 1.23 +++ audio/spiralsynthmodular/Makefile 16 Dec 2011 21:03:46 -0000 @@ -79,9 +79,9 @@ post-patch: @${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -E -e \ 's|-ldl||; \ s|-lrt||; \ - s|^CC[[:space:]]*=.+$$|CC=${CC}|; \ - s|^CXX[[:space:]]*=.+$$|CXX=${CXX}|; \ - s|g\+\+|${CXX}|; \ + s|g\+\+|$$(CXX)|; \ + /^CC[[:space:]]*=.+$$/d; \ + /^CXX[[:space:]]*=.+$$/d; \ s,@FLTK_(C|CXX)FLAGS@,-I${LOCALBASE}/include,; \ s|-lpthread|${PTHREAD_LIBS}|g' Index: audio/spiralsynthmodular/files/patch-gcc46 =================================================================== RCS file: audio/spiralsynthmodular/files/patch-gcc46 diff -N audio/spiralsynthmodular/files/patch-gcc46 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ audio/spiralsynthmodular/files/patch-gcc46 16 Dec 2011 21:09:12 -0000 @@ -0,0 +1,32 @@ +--- SpiralSound/ChannelHandler.C~ ++++ SpiralSound/ChannelHandler.C +@@ -19,6 +19,9 @@ + #include "ChannelHandler.h" + #include <unistd.h> + ++#include <cstdlib> ++#include <cstring> ++ + using namespace std; + + //#define CHANNEL_DEBUG +--- SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.C~ ++++ SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.C +@@ -30,6 +30,7 @@ + #include <stdio.h> + + #include <cstdlib> ++#include <cstring> + #include <sys/types.h> + #include <sys/stat.h> + #include <dirent.h> +--- SpiralSound/Sample.h~ ++++ SpiralSound/Sample.h +@@ -23,6 +23,7 @@ + + #include <assert.h> + #include <limits.h> ++#include <cstring> + #include <iostream> + + //#define DEBUG --- gcc46.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1RbfO5-000Fe5-7C>