1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Could not find bsd.compiler.mk

Discussion in 'Installing and Upgrading FreeBSD' started by Leander, Sep 13, 2012.

  1. Leander

    Leander Member

    Messages:
    180
    Thanks Received:
    2
    Hi,

    I try to compile a new kernel but it kept on failing ... so I tried to debug a little and tried to compile GENERIC to see whether it would run at all but it also kept on failing with the following error message:
    Code:
    Storage [/usr/src]# make buildkernel KERNCONF=GENERIC
    "Makefile.inc1", line 49: Could not find bsd.compiler.mk
    "Makefile.inc1", line 279: Malformed conditional (${MK_CLANG_IS_CC} == "no")
    "Makefile.inc1", line 1129: Malformed conditional (${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no")
    "Makefile.inc1", line 1131: if-less endif
    "Makefile.inc1", line 1186: Malformed conditional (${MK_CLANG} != "no" && (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"))
    "Makefile.inc1", line 1189: if-less endif
    "Makefile.inc1", line 1191: Malformed conditional (${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no")
    "Makefile.inc1", line 1193: if-less endif
    "Makefile.inc1", line 1254: Malformed conditional (${MK_LIBCPLUSPLUS} != "no")
    "Makefile.inc1", line 1256: if-less endif
    "Makefile.inc1", line 1259: Malformed conditional (${MK_LIBCPLUSPLUS} != "no")
    "Makefile.inc1", line 1261: if-less endif
    make: fatal errors encountered -- cannot continue
    *** Error code 1
    
    Stop in /usr/src.
    Storage [/usr/src]#


    It looks lke it can't find the makefile "Could not find bsd.compiler.mk"

    Looking for it manually also didn't find any file named like this:
    Code:
    Storage [/usr/src]# find / -name bsd.compiler.mk
    Storage [/usr/src]# 
    


    Note that the FreeBSD 9.0 Release is freshly installed on this machine.
    Any ideas why this happens?
     
  2. Uniballer

    Uniballer Member

    Messages:
    252
    Thanks Received:
    26
    Did you
    Code:
    make buildworld
    first to build the kernel tool chain?
     
  3. Leander

    Leander Member

    Messages:
    180
    Thanks Received:
    2
    Hi Uniballer,

    nope ... , since I just wanted to recompile the kernel only instead of rebuilding the entire system.

    ... but "make buildworld" also didn't help ...
    Code:
    Storage [/usr/src]# make buildworld
    cd: /usr/src/tools/build/make_check: No such file or directory
    
    --------------------------------------------------------------
    >>> Building an up-to-date make(1)
    --------------------------------------------------------------
    cd: /usr/src/usr.bin/make: No such file or directory
    *** Error code 2
    
    Stop in /usr/src.
    *** Error code 1
    
    Stop in /usr/src.
    Storage [/usr/src]# 
    
     
  4. chatwizrd

    chatwizrd Member

    Messages:
    205
    Thanks Received:
    22
  5. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,609
    Thanks Received:
    2,381
    It looks like your source tree is incomplete.
     
  6. Leander

    Leander Member

    Messages:
    180
    Thanks Received:
    2
    Maybe ... ?!
    So here is what I do in order to sync src and ports:

    Code:
    # Generate Supfile for Ports and Sources:
    echo "
    *default tag=.
    *default host=cvsup.de.FreeBSD.org
    *default prefix=/usr
    *default base=/var/db
    *default release=cvs
    *default delete use-rel-suffix
    *default compress
    
    src-base release=cvs
    src-sys release=cvs
    
    ports-all
    " > /etc/cvsup/ports-supfile
    chmod 0755 /etc/cvsup/ports-supfile
    
    
    
    
    
    
    mkdir -p -m 0644 /var/db/sup
    
    echo "#==============#
    # CVSUP Refuse #
    #==============#
    
    doc/bn_*
    doc/da_*
    #doc/de_*
    doc/el_*
    doc/es_*
    doc/fr_*
    doc/hu_*
    doc/it_*
    doc/ja_*
    doc_mn_*
    doc/nl_*
    doc/no_*
    doc/pl_*
    doc/pt_*
    doc/ru_*
    doc/sr_*
    doc/tr_*
    doc/zh_*
    
    #ports/accessibility
    #ports/arabic
    #ports/astro
    " > /var/db/sup/refuse
    chmod -R 0755 /var/db/sup/refuse
    
    
    csup -z -L 0 /etc/cvsup/ports-supfile
    
    cd /usr/ports && make fetchindex



    it's mainly copied from the handbook - so I don't see what I'm missing?!
    Any ideas?

    Thx & best regards
     
  7. Leander

    Leander Member

    Messages:
    180
    Thanks Received:
    2
    It seems to work when I modified /etc/cvsup/ports-supfile to
    Code:
    #src-base release=cvs
    #src-sys release=cvs
    src-all


    Sys and base had always been enough to recompile the kernel ... What am I missing?
     
  8. phoenix

    phoenix Moderator Staff Member Moderator

    Messages:
    3,444
    Thanks Received:
    769
    You can't use a buildworld/buildkernel cycle to build the kernel without a full source tree installed.

    You can use "the old way" of compiling a kernel, though:
    Code:
    # cd /usr/src/sys/<arch>/conf
    # ee MYKERNEL
    # config MYKERNEL
    # cd ../compile/MYKERNEL
    # make cleandepends; make depends; make; make install
    # shutdown -r now
     
  9. Leander

    Leander Member

    Messages:
    180
    Thanks Received:
    2
    I never used the old way of compiling a kernel. The "new" way as described in the handbook has always worked for me up to RELEASE 7.3 even I only had base and sys synced ...

    any way it' working now - thx for the help ;)