NetBSD-Bugs archive

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

bin/40494: nvi build fails when USE_FORT=yes is specified



>Number:         40494
>Category:       bin
>Synopsis:       nvi build fails when USE_FORT=yes is specified
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 27 09:35:00 +0000 2009
>Originator:     George Abdelmalik
>Release:        5.0_RC1
>Organization:
ADS
>Environment:
NetBSD bart.fork.id.au 4.99.73 NetBSD 4.99.73 (BART) #0: Thu Oct 23 22:40:26 
EST 2008  
srcmstr%bart.fork.id.au@localhost:/vstore/netbsd-current/obj/sys/arch/amd64/compile/BART
 amd64

>Description:
Build fails as follows:

dependall ===> usr.bin/nvi/build
#   compile  build/api.o
/vstore/netbsd-5/src/../tools/bin/x86_64--netbsd-gcc -O2 -fPIC -DPIC  
-fstack-protector -Wstack-protector --param ssp-buffer-size=1 -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare 
-Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow 
-Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -std=gnu99  -Werror   
-I/vstore/netbsd-5/src/dist/nvi/include 
-I/vstore/netbsd-5/src/usr.bin/nvi/build -I. -DGTAGS 
-I/vstore/netbsd-5/src/dist/nvi/regex -D__REGEX_PRIVATE -DUSE_WIDECHAR 
-nostdinc -isystem /vstore/netbsd-5/src/../dest/usr/include   
-D_FORTIFY_SOURCE=2 -c    /vstore/netbsd-5/src/dist/nvi/common/api.c
In file included from 
/vstore/netbsd-5/src/dist/nvi/common/../common/common.h:24,
                 from /vstore/netbsd-5/src/dist/nvi/common/api.c:32:
/vstore/netbsd-5/src/usr.bin/nvi/build/port.h:190:1: error: "memcpy" redefined
In file included from /vstore/netbsd-5/src/../dest/usr/include/string.h:95,
                 from /vstore/netbsd-5/src/dist/nvi/common/api.c:28:
/vstore/netbsd-5/src/../dest/usr/include/ssp/string.h:79:1: error: this is the 
location of the previous definition

*** Failed target:  api.o
*** Failed command: /vstore/netbsd-5/src/../tools/bin/x86_64--netbsd-gcc -O2 
-fPIC -DPIC -fstack-protector -Wstack-protector --param ssp-buffer-size=1 -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare 
-Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow 
-Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -std=gnu99 -Werror 
-I/vstore/netbsd-5/src/dist/nvi/include 
-I/vstore/netbsd-5/src/usr.bin/nvi/build -I. -DGTAGS 
-I/vstore/netbsd-5/src/dist/nvi/regex -D__REGEX_PRIVATE -DUSE_WIDECHAR 
-nostdinc -isystem /vstore/netbsd-5/src/../dest/usr/include -D_FORTIFY_SOURCE=2 
-c /vstore/netbsd-5/src/dist/nvi/common/api.c
*** Error code 1

Stop.
nbmake: stopped in /vstore/netbsd-5/src/usr.bin/nvi/build



Problem is that usr.bin/nvi/build/port.h line 190 defines memcpy if HAVE_MEMCPY 
is not defined. This of course conflicts with the definition of memcpy done in 
usr/include/ssp/string.h when _FORTIFY_SOURCE > 0.
>How-To-Repeat:
Run build.sh with USE_FORT=yes defined in mk.conf

>Fix:
Append the following to usr.bin/nvi/build/config.h to get HAVE_MEMCPY defined, 
hence avoiding the redef by port.h:

/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1



Home | Main Index | Thread Index | Old Index