Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#1463 closed defect (fixed)

vnc compilation problems with abs() in Mac OS X 10.3

Reported by: martin@… Owned by: rshaw@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

Compilation of Xvnc from vnc-3.3.7-unixsrc with the dports patch applied bails as follows on Mac OX X 10.3:

vnc-3.3.7-unixsrc/Xvnc $ make World

Building Release 6.3 of the X Window System. ...build output deleted... c++ -c -O2 -Wall -I. -I../../../../exports/include/X11 - I../../../../include/fonts -I../../../../exports/include/X11 -I../../cfb - I../../mfb -I../../mi -I../../include -I../../os -I../../../../.. - I../../../.. -I../../../../exports/include -Dpowerpc - DDARWIN -DNO_ALLOCA -DX_LOCALE -DSHAPE

-DSTATIC_COLOR -DAVOID_GLYPHBLT -

DPIXPRIV -DNDEBUG -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR zrle.cc In file included from /usr/include/gcc/darwin/3.3/assert.h:14,

from ../../../../../rfb/zrleEncode.h:35, from zrle.cc:45:

/usr/include/stdlib.h:126: error: parse error before `int' make[5]: * [zrle.o] Error 1 make[5]: Target `all' not remade because of errors. make[5]: Target `all' not remade because of errors. make[4]: * [hw/vnc] Error 2 make[4]: * No rule to make target hw/vnc/libvnc.a', needed by Xvnc'. make[4]: Target `all' not remade because of errors. make[3]: * [all] Error 2 make[2]: * [all] Error 2 make[1]: * [World] Error 2 make: * [World] Error 2

The problem is that Xvnc defines abs() as a macro but /usr/include/stdlib.h:126 contains a prototype definition for it. Here is an extra patch chunk for dports/x11/vnc/files/patch-vnc.darwin to fix this

* vnc-3.3.7-unixsrc/Xvnc/programs/Xserver/include/misc.h.orig Sat May 11 11:57:06 2002 --- vnc-3.3.7-unixsrc/Xvnc/programs/Xserver/include/misc.h Wed Jan 28 14:48:03 2004 * * 158,164

#define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b))

! #if !defined(AMOEBA) && !defined(EMX)

#ifndef abs #define abs(a) ((a) > 0 ? (a) : -(a)) #endif

--- 158,164 ----

#define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b))

! #if !defined(AMOEBA) && !defined(EMX) && !defined(DARWIN)

#ifndef abs #define abs(a) ((a) > 0 ? (a) : -(a)) #endif

Change History (6)

comment:1 Changed 21 years ago by toby@…

severity: blockernormal

comment:2 Changed 21 years ago by rshaw@…

Owner: changed from ranger@… to rshaw@…

comment:3 Changed 21 years ago by rshaw@…

Status: newassigned

comment:4 Changed 21 years ago by rshaw@…

Taking over the VNC port, agreed by ranger (Ben). -rshaw

comment:5 Changed 21 years ago by rshaw@…

Updated patch files and Portfile committed. Now properly builds. -rshaw

comment:6 Changed 21 years ago by rshaw@…

Resolution: fixed
Status: assignedclosed

Updated patch files and Portfile committed. Now properly builds. -rshaw

Note: See TracTickets for help on using tickets.