NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xsrc/40502: build of xman fails when MKPIE=yes is specified

>Number:         40502
>Category:       xsrc
>Synopsis:       build of xman fails when MKPIE=yes is specified
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 28 10:50:00 +0000 2009
>Originator:     George Abdelmalik
>Release:        5.0_RC1
NetBSD 4.99.73 NetBSD 4.99.73 (BART) #0: Thu Oct 23 22:40:26 
EST 2008

When running a with MKPIE=yes in mk.conf, the build of xman
fails as follows:

#   compile  xman/handler.o
/vstore/netbsd-5/src/../tools/bin/x86_64--netbsd-gcc -O2 -fPIC -DPIC 
-fno-strict-aliasing  -fstack-protector -Wstack-protector --param 
ssp-buffer-size=1  -Werror   -DOSMAJORVERSION=1 -DOSMINORVERSION=6 
-I/vstore/netbsd-5/src/../dest/usr/X11R7/include -D__AMD64__ -nostdinc -isystem 
/vstore/netbsd-5/src/../dest/usr/include   -D_FORTIFY_SOURCE=2 -c    
In file included from 
/vstore/netbsd-5/src/../xsrc/external/mit/xman/dist/vendor.h:190:1: error: 
"PIC" redefined
<command line>:1:1: error: this is the location of the previous definition

*** Failed target:  handler.o
*** Failed command: /vstore/netbsd-5/src/../tools/bin/x86_64--netbsd-gcc -O2 
-fPIC -DPIC -fno-strict-aliasing -fstack-protector -Wstack-protector --param 
-DFUNCPROTO=15 -DNARROWPROTO -I/vstore/netbsd-5/src/../dest/usr/X11R7/include 
-D__AMD64__ -nostdinc -isystem /vstore/netbsd-5/src/../dest/usr/include 
*** Error code 1

Problem is that xsrc/external/mit/xman/dist/vendor.h seems to define PIC for 
some other purpose which conflicts with that already defined in variable 
PIE_CFLAGS (share/mk/ when MKPIE is used.

Run a defining MKPIE=yes
My fix was to not give xman -DPIC by patching the Makefile file as follows.

Index: external/mit/xorg/bin/xman/Makefile
RCS file: /cvsroot/src/external/mit/xorg/bin/xman/Makefile,v
retrieving revision
diff -u -r1.1.1.1 Makefile
--- external/mit/xorg/bin/xman/Makefile 29 Jul 2008 05:01:22 -0000
+++ external/mit/xorg/bin/xman/Makefile 28 Jan 2009 10:43:52 -0000
@@ -23,5 +23,11 @@
+# xsrc/external/mit/xman/dist/vendor.h line 190 seems to define PIC
+# for another purpose so define PIE_CFLAGS here without -DPIC to
+# avoid its definition in share/mk/
 .include <>
 .include <>

Home | Main Index | Thread Index | Old Index