ports/184298: [patch] devel/edb: fix build with Clang

Alberto Villa avilla at FreeBSD.org
Tue Nov 26 03:30:01 UTC 2013


>Number:         184298
>Category:       ports
>Synopsis:       [patch] devel/edb: fix build with Clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 26 03:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Alberto Villa
>Release:        FreeBSD 11.0-CURRENT amd64 (jailed)
>Organization:
>Environment:
FreeBSD indiana.smith 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #0: Thu Oct 10 11:04:43 CEST 2013     root at indiana.smith:/usr/obj/usr/src/sys/HPDV6  amd64
>Description:
The port fails to build and to link.

Build log:

c++ -c -O2 -pipe -march=native -fno-strict-aliasing -O2 -pthread -D_THREAD_SAFE -Wall -W -DDEFAULT_PLUGIN_PATH=/usr/local/libexec/edb -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-clang -I. -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4 -Iwidgets -I../include -Iqhexview -Iqjson -Ios/unix -I../include/os/unix -Iedisassm -Ios/unix/freebsd -I../include/os/unix/freebsd -Iarch/x86_64 -I../include/arch/x86_64 -I.moc/release-shared -I.uic -I/usr/local/include/qt4 -I/usr/local/include -o .obj/release-shared/Instruction.o edisassm/Instruction.cpp
In file included from edisassm/Instruction.cpp:20:
edisassm/Instruction32.h:293:2: error: reference to non-static member function must be called; did you mean to call it with no arguments?
        UNUSED(size);
        ^~~~~~~~~~~~
                    ()
edisassm/edisassm_util.h:27:25: note: expanded from macro 'UNUSED'
#define UNUSED(x) (void)(x)
                        ^~~
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/edb/work/debugger/src

===

Link log:

.obj/release-shared/DebugEvent.o: In function `DebugEvent::DebugEvent(int, int, int)':
os/unix/freebsd/DebugEvent.cpp:(.text+0xbc): undefined reference to `kvm_openfiles'
os/unix/freebsd/DebugEvent.cpp:(.text+0xdc): undefined reference to `kvm_getprocs'
os/unix/freebsd/DebugEvent.cpp:(.text+0xf4): undefined reference to `kvm_read'
os/unix/freebsd/DebugEvent.cpp:(.text+0x10f): undefined reference to `kvm_read'
os/unix/freebsd/DebugEvent.cpp:(.text+0x12d): undefined reference to `kvm_close'
.obj/release-shared/DialogAttach.o: In function `DialogAttach::find_processes()':
os/unix/freebsd/DialogAttach.cpp:(.text+0x79): undefined reference to `kvm_openfiles'
os/unix/freebsd/DialogAttach.cpp:(.text+0x98): undefined reference to `kvm_getprocs'
os/unix/freebsd/DialogAttach.cpp:(.text+0x1ca): undefined reference to `kvm_close'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/edb/work/debugger/src
>How-To-Repeat:
Build the port on 11.0-CURRENT
>Fix:


Patch attached with submission follows:

Index: files/patch-src__edisassm__Instruction32.h
===================================================================
--- files/patch-src__edisassm__Instruction32.h	(revision 0)
+++ files/patch-src__edisassm__Instruction32.h	(working copy)
@@ -0,0 +1,10 @@
+--- ./src/edisassm/Instruction32.h.orig	2011-12-20 22:04:57.000000000 +0100
++++ ./src/edisassm/Instruction32.h	2013-11-20 18:01:17.389439581 +0100
+@@ -290,7 +290,6 @@
+ template <int16_t IMM>
+ void Instruction<M>::decode_const_Iw(const uint8_t *buf) {
+ 	UNUSED(buf);
+-	UNUSED(size);
+ 
+ 	operand_t &operand = next_operand();
+ 
Index: files/patch-src__src.pro
===================================================================
--- files/patch-src__src.pro	(revision 334910)
+++ files/patch-src__src.pro	(working copy)
@@ -1,5 +1,5 @@
---- ./src/src.pro.orig	2011-12-12 21:27:25.000000000 +0000
-+++ ./src/src.pro	2012-09-13 21:26:00.215566381 +0000
+--- ./src/src.pro.orig	2011-12-12 22:27:25.000000000 +0100
++++ ./src/src.pro	2013-11-20 18:01:37.379434373 +0100
 @@ -5,7 +5,7 @@
  INCLUDEPATH += ./widgets ../include
  RESOURCES   = debugger.qrc
@@ -9,3 +9,20 @@
  INSTALLS    += target 
  QT          += xml
  
+@@ -214,6 +214,7 @@
+ 	}
+ 
+ 	freebsd-* {
++		LIBS += -lkvm
+ 		DEPENDPATH  += os/unix/freebsd ../include/os/unix/freebsd
+ 		INCLUDEPATH += os/unix/freebsd ../include/os/unix/freebsd
+ 	}
+@@ -241,7 +242,7 @@
+ 
+ 	linux-g++*:		QMAKE_LFLAGS += -rdynamic
+ 	openbsd-g++*:	QMAKE_LFLAGS += -lkvm -Wl,--export-dynamic
+-	freebsd-g++*:	QMAKE_LFLAGS += -lkvm -Wl,--export-dynamic
++	freebsd-g++*:	QMAKE_LFLAGS += -Wl,--export-dynamic
+ 	macx-g++*:		QMAKE_LFLAGS += -rdynamic
+ 
+ 


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


More information about the freebsd-ports-bugs mailing list