kernel build failed

pls help me..

Code:
cd /usr/src

make buildkernel KERNCONF=MYKERNEL

make installkernel KERNCONF=MYKERNEL


Code:
./pci_if.h:238: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_MS'
./pci_if.h:238: error: stray '\335' in program
cc1: warnings being treated as errors
In file included from /usr/src/sys/modules/3dfx/../../dev/tdfx/tdfx_pci.c:60:
@/dev/pci/pcivar.h: In function 'pci_get_subvendor':
@/dev/pci/pcivar.h:244: warning: implicit declaration of function 'BUS_READ_IVAR'
@/dev/pci/pcivar.h:244: warning: nested extern declaration of 'BUS_READ_IVAR'
@/dev/pci/pcivar.h: In function 'pci_set_subvendor':
@/dev/pci/pcivar.h:244: warning: implicit declaration of function 'BUS_WRITE_IVAR'
@/dev/pci/pcivar.h:244: warning: nested extern declaration of 'BUS_WRITE_IVAR'
@/dev/pci/pcivar.h: In function 'pci_read_config':
@/dev/pci/pcivar.h:274: warning: implicit declaration of function 'PCI_READ_CONFIG'
@/dev/pci/pcivar.h:274: warning: nested extern declaration of 'PCI_READ_CONFIG'
@/dev/pci/pcivar.h: In function 'pci_write_config':
@/dev/pci/pcivar.h:280: warning: implicit declaration of function 'PCI_WRITE_CONFIG'
@/dev/pci/pcivar.h:280: warning: nested extern declaration of 'PCI_WRITE_CONFIG'
@/dev/pci/pcivar.h: In function 'pci_enable_busmaster':
@/dev/pci/pcivar.h:318: warning: implicit declaration of function 'PCI_ENABLE_BUSMASTER'
@/dev/pci/pcivar.h:318: warning: nested extern declaration of 'PCI_ENABLE_BUSMASTER'
@/dev/pci/pcivar.h: In function 'pci_disable_busmaster':
@/dev/pci/pcivar.h:324: warning: implicit declaration of function 'PCI_DISABLE_BUSMASTER'
@/dev/pci/pcivar.h:324: warning: nested extern declaration of 'PCI_DISABLE_BUSMASTER'
@/dev/pci/pcivar.h: In function 'pci_enable_io':
@/dev/pci/pcivar.h:330: warning: implicit declaration of function 'PCI_ENABLE_IO'
@/dev/pci/pcivar.h:330: warning: nested extern declaration of 'PCI_ENABLE_IO'
@/dev/pci/pcivar.h: In function 'pci_disable_io':
@/dev/pci/pcivar.h:336: warning: implicit declaration of function 'PCI_DISABLE_IO'
@/dev/pci/pcivar.h:336: warning: nested extern declaration of 'PCI_DISABLE_IO'
@/dev/pci/pcivar.h: In function 'pci_get_vpd_ident':
@/dev/pci/pcivar.h:342: warning: implicit declaration of function 'PCI_GET_VPD_IDENT'
@/dev/pci/pcivar.h:342: warning: nested extern declaration of 'PCI_GET_VPD_IDENT'
@/dev/pci/pcivar.h: In function 'pci_get_vpd_readonly':
@/dev/pci/pcivar.h:348: warning: implicit declaration of function 'PCI_GET_VPD_READONLY'
@/dev/pci/pcivar.h:348: warning: nested extern declaration of 'PCI_GET_VPD_READONLY'
@/dev/pci/pcivar.h: In function 'pci_set_powerstate':
@/dev/pci/pcivar.h:393: warning: implicit declaration of function 'PCI_SET_POWERSTATE'
@/dev/pci/pcivar.h:393: warning: nested extern declaration of 'PCI_SET_POWERSTATE'
@/dev/pci/pcivar.h: In function 'pci_get_powerstate':
@/dev/pci/pcivar.h:399: warning: implicit declaration of function 'PCI_GET_POWERSTATE'
@/dev/pci/pcivar.h:399: warning: nested extern declaration of 'PCI_GET_POWERSTATE'
@/dev/pci/pcivar.h: In function 'pci_find_extcap':
@/dev/pci/pcivar.h:405: warning: implicit declaration of function 'PCI_FIND_EXTCAP'
@/dev/pci/pcivar.h:405: warning: nested extern declaration of 'PCI_FIND_EXTCAP'
@/dev/pci/pcivar.h: In function 'pci_alloc_msi':
@/dev/pci/pcivar.h:411: warning: implicit declaration of function 'PCI_ALLOC_MSI'
@/dev/pci/pcivar.h:411: warning: nested extern declaration of 'PCI_ALLOC_MSI'
@/dev/pci/pcivar.h: In function 'pci_alloc_msix':
@/dev/pci/pcivar.h:417: warning: implicit declaration of function 'PCI_ALLOC_MSIX'
@/dev/pci/pcivar.h:417: warning: nested extern declaration of 'PCI_ALLOC_MSIX'
@/dev/pci/pcivar.h: In function 'pci_remap_msix':
@/dev/pci/pcivar.h:423: warning: implicit declaration of function 'PCI_REMAP_MSIX'
@/dev/pci/pcivar.h:423: warning: nested extern declaration of 'PCI_REMAP_MSIX'
@/dev/pci/pcivar.h: In function 'pci_release_msi':
@/dev/pci/pcivar.h:429: warning: implicit declaration of function 'PCI_RELEASE_MSI'
@/dev/pci/pcivar.h:429: warning: nested extern declaration of 'PCI_RELEASE_MSI'
@/dev/pci/pcivar.h: In function 'pci_msi_count':
@/dev/pci/pcivar.h:435: warning: implicit declaration of function 'PCI_MSI_COUNT'
@/dev/pci/pcivar.h:435: warning: nested extern declaration of 'PCI_MSI_COUNT'
@/dev/pci/pcivar.h: In function 'pci_msix_count':
@/dev/pci/pcivar.h:441: warning: implicit declaration of function 'PCI_MSIX_COUNT'
@/dev/pci/pcivar.h:441: warning: nested extern declaration of 'PCI_MSIX_COUNT'
*** Error code 1
1 error
*** Error code 2
1 error
 
In the first post you stated that you were building a custom kernel (MYKERNEL). Now you're posting the GENERIC kernel, which should not fail. Which one is it? A custom kernel or a generic kernel?
 
update now,


standard-supfile

Code:
*default host=cvsup10.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix


error..

Code:
/usr/src/sys/dev/pci/pcivar.h:411: warning: nested extern declaration of 'PCI_ALLOC_MSI'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_alloc_msix':
/usr/src/sys/dev/pci/pcivar.h:417: warning: implicit declaration of function 'PCI_ALLOC_MSIX'
/usr/src/sys/dev/pci/pcivar.h:417: warning: nested extern declaration of 'PCI_ALLOC_MSIX'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_remap_msix':
/usr/src/sys/dev/pci/pcivar.h:423: warning: implicit declaration of function 'PCI_REMAP_MSIX'
/usr/src/sys/dev/pci/pcivar.h:423: warning: nested extern declaration of 'PCI_REMAP_MSIX'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_release_msi':
/usr/src/sys/dev/pci/pcivar.h:429: warning: implicit declaration of function 'PCI_RELEASE_MSI'
/usr/src/sys/dev/pci/pcivar.h:429: warning: nested extern declaration of 'PCI_RELEASE_MSI'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_msi_count':
/usr/src/sys/dev/pci/pcivar.h:435: warning: implicit declaration of function 'PCI_MSI_COUNT'
/usr/src/sys/dev/pci/pcivar.h:435: warning: nested extern declaration of 'PCI_MSI_COUNT'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_msix_count':
/usr/src/sys/dev/pci/pcivar.h:441: warning: implicit declaration of function 'PCI_MSIX_COUNT'
/usr/src/sys/dev/pci/pcivar.h:441: warning: nested extern declaration of 'PCI_MSIX_COUNT'
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1
 
8.0-RELEASE-p1 i386 GENERIC


cvsup..
Code:
cd /usr/ports/ && make fetchindex
/usr/local/bin/cvsup /etc/ports-supfile
/usr/local/bin/cvsup /etc/standard-supfile
 
I do not use it ( stable-supfile) .. Which I take it? standard-supfile or stable-supfile ..

I'm using the standard-supfile.

stable-supfile conf..
Code:
# IMPORTANT: Change the next line to use one of the CVSup mirror sites
# listed at http://www.freebsd.org/doc/handbook/mirrors.html.
*default host=cvsup10.FreeBSD.org
*default base=/var/db
*default prefix=/usr
# The following line is for 8-stable.  If you want 7-stable, 6-stable,
# 5-stable, 4-stable, 3-stable, or 2.2-stable, change to "RELENG_7",
# "RELENG_6", "RELENG_5", "RELENG_4", "RELENG_3", or "RELENG_2_2"
# respectively.  
*default release=cvs tag=RELENG_8_0
*default delete use-rel-suffix
 
routers said:
update now,


standard-supfile

Code:
*default host=cvsup10.FreeBSD.org
*default base=/var/db
*default prefix=/usr
[B]*default release=cvs tag=.[/B]
*default delete use-rel-suffix

You're building 9-CURRENT, which may actually not build at all. Please use tag=RELENG_8 for 8-STABLE or tag=RELENG_8_0 for 8-RELEASE. You'll have to build everything again (make buildworld, etc.).
 
sorry problem continues ..


standard-supfile
Code:
# Defaults that apply to all the collections
# 
# IMPORTANT: Change the next line to use one of the CVSup mirror sites
# listed at http://www.freebsd.org/doc/handbook/mirrors.html.
*default host=cvsup10.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8
*default delete use-rel-suffix

# If you seem to be limited by CPU rather than network or disk bandwidth, try
# commenting out the following line.  (Normally, today's CPUs are fast enough
# that you want to run compression.)
*default compress

## Main Source Tree.
#               
# The easiest way to get the main source tree is to use the "src-all"
# mega-collection.  It includes all of the individual "src-*" collections.
src-all

# These are the individual collections that make up "src-all".  If you
# use these, be sure to comment out "src-all" above.
#src-base
#src-bin
#src-cddl
#src-contrib
#src-etc
#src-games
#src-gnu


*default release=cvs tag=RELENG_8_0 as tested, did not.


/usr/src/UPDATING

Code:
NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
        For ia64 the INVARIANTS and INVARIANT_SUPPORT kernel options
        were left in the GENERIC kernel because the kernel does not
        work properly without them.  For sun4v all of the normal kernel
        debugging tools present in HEAD were left in place because
        sun4v support still needs work to become production ready.

20090929:
        802.11s D3.03 support was committed. This is incompatible with
        the previous code, which was based on D3.0.

20090915:
        ZFS snapshots are now mounted with MNT_IGNORE flag. Use -v option for
        mount(8) and -a option for df(1) to see them.

20090813:
        Remove the option STOP_NMI.  The default action is now to use NMI
        only for KDB via the newly introduced function stop_cpus_hard()
        and maintain stop_cpus() to just use a normal IPI_STOP on ia32
        and amd64.

20090803:
        RELENG_8 branched.
 
DutchDaemon said:



# 1. `cd /usr/src' OK
# 1a. `make cleanworld && make cleandir` OK
# 2. `make buildworld' OK
# 3. make buildkernel KERNCONF=GENERIC FAILED

Code:
/usr/src/sys/dev/pci/pcivar.h:417: warning: implicit declaration of function 'PCI_ALLOC_MSIX'
/usr/src/sys/dev/pci/pcivar.h:417: warning: nested extern declaration of 'PCI_ALLOC_MSIX'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_remap_msix':
/usr/src/sys/dev/pci/pcivar.h:423: warning: implicit declaration of function 'PCI_REMAP_MSIX'
/usr/src/sys/dev/pci/pcivar.h:423: warning: nested extern declaration of 'PCI_REMAP_MSIX'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_release_msi':
/usr/src/sys/dev/pci/pcivar.h:429: warning: implicit declaration of function 'PCI_RELEASE_MSI'
/usr/src/sys/dev/pci/pcivar.h:429: warning: nested extern declaration of 'PCI_RELEASE_MSI'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_msi_count':
/usr/src/sys/dev/pci/pcivar.h:435: warning: implicit declaration of function 'PCI_MSI_COUNT'
/usr/src/sys/dev/pci/pcivar.h:435: warning: nested extern declaration of 'PCI_MSI_COUNT'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_msix_count':
/usr/src/sys/dev/pci/pcivar.h:441: warning: implicit declaration of function 'PCI_MSIX_COUNT'
/usr/src/sys/dev/pci/pcivar.h:441: warning: nested extern declaration of 'PCI_MSIX_COUNT'
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1


An application should not be so difficult, I do not understand anything.
 
Such stuff usually happens after mistakes in GENERIC or in case of src mismatch.
Relax and lets start over step by step. Your choice is 8-STABLE? Good choice.
To make things simple your standard-supfile must look like this:
*default host=cvsup.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8
*default delete use-rel-suffix
src-all
I would recommend to keep it not in /etc where lots of critical files live but move it to /root and rename it to src-supfile:
# mv /etc/standard-supfile /root/src-supfile
Just in case preserve your current /etc :
# cp -r /etc /etc.old
Also preserve your current /boot if your system is currently running fine.
# cp -r /boot /boot.good
You now are safe enough so first delete your probably messed up current sources:
# rm -rf /usr/src/*
and lets get new sources for 8-STABLE:
# csup -L 2 /root/src-supfile
Continue without looking into GENERIC and don't use KERNCONF=GENERIC:
Code:
# cd /usr/src
# make buildworld
# make buildkernel
Everything is fine now? Continue as in DutchDaemon's link:
Code:
# make installkernel
# reboot       ## to Single User Mode (option 4)
# adjkerntz -i
# mount -a -t ufs
# cd /usr/src
Now preview your config files changes; pay attention to master.passwd, group, rc.conf, hosts and devfs.conf files as well as other files you could modify:
# mergemaster -p
Now install userland:
# make installworld
Merge you config files with new ones. Actually install all new files except those mentioned in mergemaster -p step. Delete all the other obsolete files:
# mergemaster -Fi
Answer "YES" on last question "Do you want to delete what's left in temproot directory?".
Reboot to new system and check if everything is OK. If you are sure it's OK delete your backups:
Code:
# rm -rf /etc.old 
# rm -rf /boot.good
 
zeiz said:
Such stuff usually happens after mistakes in GENERIC or in case of src mismatch.
Relax and lets start over step by step. Your choice is 8-STABLE? Good choice.
To make things simple your standard-supfile must look like this:
Code:
*default host=cvsup.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8
*default delete use-rel-suffix
src-all

I would recommend to keep it not in /etc where lots of critical files live but move it to /root and rename it to src-supfile:
# mv /etc/standard-supfile /root/src-supfile OK
Just in case preserve your current /etc :
# cp -r /etc /etc.old OK
Also preserve your current /boot if your system is currently running fine.
# cp -r /boot /boot.good OK
You now are safe enough so first delete your probably messed up current sources:
# rm -rf /usr/src/* OK
and lets get new sources for 8-STABLE:
# csup -L 2 /root/src-supfile OK
Continue without looking into GENERIC and don't use KERNCONF=GENERIC:
Code:
# cd /usr/src
# make buildworld     
[color="DarkGreen"][B]OK[/B][/color]

Code:
# make buildkernel
[color="Red"][B]FAILED[/B][/color]

Code:
/usr/src/sys/dev/pci/pcivar.h:417: warning: implicit declaration of function 'PCI_ALLOC_MSIX'
/usr/src/sys/dev/pci/pcivar.h:417: warning: nested extern declaration of 'PCI_ALLOC_MSIX'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_remap_msix':
/usr/src/sys/dev/pci/pcivar.h:423: warning: implicit declaration of function 'PCI_REMAP_MSIX'
/usr/src/sys/dev/pci/pcivar.h:423: warning: nested extern declaration of 'PCI_REMAP_MSIX'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_release_msi':
/usr/src/sys/dev/pci/pcivar.h:429: warning: implicit declaration of function 'PCI_RELEASE_MSI'
/usr/src/sys/dev/pci/pcivar.h:429: warning: nested extern declaration of 'PCI_RELEASE_MSI'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_msi_count':
/usr/src/sys/dev/pci/pcivar.h:435: warning: implicit declaration of function 'PCI_MSI_COUNT'
/usr/src/sys/dev/pci/pcivar.h:435: warning: nested extern declaration of 'PCI_MSI_COUNT'
/usr/src/sys/dev/pci/pcivar.h: In function 'pci_msix_count':
/usr/src/sys/dev/pci/pcivar.h:441: warning: implicit declaration of function 'PCI_MSIX_COUNT'
/usr/src/sys/dev/pci/pcivar.h:441: warning: nested extern declaration of 'PCI_MSIX_COUNT'
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1
 
That's nothing to do with X but do you have physical access to the machine you are installing on? Could you explain in general what you are doing?
Don't hesitate drop me a PM if you speak other languages.
 
Back
Top