NetBSD-Bugs archive

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

bin/40539: netbsd-3 fails to build clean on cross build for vax; src/dist/file fails to build



>Number:         40539
>Category:       bin
>Synopsis:       netbsd-3 fails to build clean on cross build for vax; 
>src/dist/file fails to build
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 02 18:10:00 +0000 2009
>Originator:     Brad Parker
>Release:        netbsd-3
>Organization:
>Environment:
Building with cross compile on linux (readhat EWS3) for vax,
src/dist/file fails to build.  MIN() is redefined.

I might suggest removing the MIN() define from file.h and adding
a sys/param.h include in softmagic.c
>Description:
The problem first occurs in src/dist/file/src/apprentice.c, which includes
sys/param.h (which defines MIN).

#   compile  libmagic/apprentice.ln
CC=/files1/netbsd/NetBSD-3/src/release-3/tooldir/bin/vax--netbsdelf-gcc 
/files1/netbsd/NetBSD-3/src/release-3/t\
ooldir/bin/vax--netbsdelf-lint -chapbxzF -d 
/files1/netbsd/NetBSD-3/src/release-3/destdir/vax/usr/include  -DMA\
GIC='"/usr/share/misc/magic"' -DHAVE_CONFIG_H -DQUICK -DBUILTIN_ELF -DELFCORE 
-I/files1/netbsd/NetBSD-3/src/lib\
/libmagic -I/files1/netbsd/NetBSD-3/src/dist/file/src    -i 
/files1/netbsd/NetBSD-3/src/dist/file/src/apprentic\
e.c
In file included from /files1/netbsd/NetBSD-3/src/dist/file/src/apprentice.c:45:
/files1/netbsd/NetBSD-3/src/release-3/destdir/vax/usr/include/sys/param.h:253: 
warning: `MIN' redefined
/files1/netbsd/NetBSD-3/src/dist/file/src/file.h:90: warning: this is the 
location of the previous definition



>How-To-Repeat:
Try to build netbsd-3. I used this command

cd src && \
./build.sh -m vax \
        -D $REL/destdir/vax \
        -O $REL/objdir/vax \
        -T $REL/tooldir \
        -R $REL/releasedir \
        -U release

Building on linux EWS 3.  I think this problem is independant of
the build environment, however.

>Fix:
remove the MIN() define in file.h,
add #include <sys/param.h> to softmagic.c



Home | Main Index | Thread Index | Old Index