• Unable to build using make


    I recently installed Antergos, and needed to compile the broadcom-wl driver for my BCM4352 wireless card. I cloned an existing broadcom-wl git repository, stepped into that directory, and ran make. Immediately, the following error is returned…

    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: Entering directory '/usr/lib/modules/4.14.67-1-lts/build'
    make[1]: *** No targets specified and no makefile found.  Stop.
    make[1]: Leaving directory '/usr/lib/modules/4.14.67-1-lts/build'
    make: *** [Makefile:159: all] Error 2
    

    However, the Makefile does exist and it is accessible…

    drwxr-xr-x 5 soup users 4096 Sep  7 12:02 .
    drwxr-xr-x 4 soup users 4096 Sep  7 12:02 ..
    -rw-r--r-- 1 soup users  236 Sep  7 12:02 dkms.conf
    drwxr-xr-x 8 soup users 4096 Sep  7 12:02 .git
    -rw-r--r-- 1 soup users  207 Sep  7 12:02 .gitignore
    drwxr-xr-x 2 soup users 4096 Sep  7 12:02 lib
    -rw-r--r-- 1 soup users 5154 Sep  7 12:02 Makefile
    -rw-r--r-- 1 soup users 2293 Sep  7 12:02 README.md
    drwxr-xr-x 6 soup users 4096 Sep  7 12:02 src
    

    And here is the contents of that makefile…

    #
    # Makefile fragment for Linux 2.6
    # Broadcom 802.11abg Networking Device Driver
    #
    # Copyright (C) 2015, Broadcom Corporation. All Rights Reserved.
    # 
    # Permission to use, copy, modify, and/or distribute this software for any
    # purpose with or without fee is hereby granted, provided that the above
    # copyright notice and this permission notice appear in all copies.
    # 
    # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
    # SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
    # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
    # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    #
    # $Id: Makefile_kbuild_portsrc 580354 2015-08-18 23:42:37Z $
    
    ifneq ($(KERNELRELEASE),)
    
      LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
        if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" -o "$(VERSION)" -ge "3" ]; then \
          echo TRUE; \
        else \
          echo FALSE; \
        fi \
      ))
    
        LINUXVER_WEXT_ONLY:=$(strip $(shell \
        if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
          echo FALSE; \
        else \
          echo TRUE; \
        fi \
      ))
    
      ifneq ($(API),)
        ifeq ($(API), CFG80211)
          APICHOICE := FORCE_CFG80211
          $(info CFG80211 API specified in command line)
        else
          ifeq ($(API), WEXT)
            APICHOICE := FORCE_WEXT
            $(info Wireless Extension API specified in command line)
          else
            $(error Unknown API type)
          endif
        endif
      else
        ifeq ($(LINUXVER_GOODFOR_CFG80211),TRUE)
          APICHOICE := PREFER_CFG80211
          $(info CFG80211 API is prefered for this kernel version)
        else
          ifeq ($(LINUXVER_WEXT_ONLY),TRUE)
            APICHOICE := FORCE_WEXT
            $(info Wireless Extension is the only possible API for this kernel version)
          else
            APICHOICE := PREFER_WEXT
            $(info Wireless Extension API is prefered for this kernel version)
          endif
        endif
      endif
    
      ifeq ($(APICHOICE),FORCE_CFG80211)
        ifneq ($(CONFIG_CFG80211),)
          APIFINAL := CFG80211
        else
          $(error CFG80211 is specified but it is not enabled in kernel)
        endif
      endif
    
      ifeq ($(APICHOICE),FORCE_WEXT)
        APIFINAL := WEXT
      endif
    
      ifeq ($(APICHOICE),PREFER_CFG80211)
        ifneq ($(CONFIG_CFG80211),)
          APIFINAL := CFG80211
        else
          ifneq ($(CONFIG_WIRELESS_EXT),)
            APIFINAL := WEXT
          else
            $(warning Neither CFG80211 nor Wireless Extension is enabled in kernel)
          endif
        endif
      endif
    
      ifeq ($(APICHOICE),PREFER_WEXT)
        ifneq ($(CONFIG_WIRELESS_EXT),)
          APIFINAL := WEXT
        else
          ifneq ($(CONFIG_CFG80211),)
            APIFINAL := CFG80211
          else
            $(warning Neither CFG80211 nor Wireless Extension is enabled in kernel)
          endif
        endif
      endif
    
    endif
    
    #Check GCC version so we can apply -Wno-date-time if supported.  GCC >= 4.9
    empty:=
    space:= $(empty) $(empty)
    GCCVERSIONSTRING := $(shell expr `$(CC) -dumpversion`)
    #Create version number without "."
    GCCVERSION := $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f1 -d.)
    GCCVERSION += $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f2 -d.)
    GCCVERSION += $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f3 -d.)
    # Make sure the version number has at least 3 decimals
    GCCVERSION += 00
    # Remove spaces from the version number
    GCCVERSION := $(subst $(space),$(empty),$(GCCVERSION))
    # Crop the version number to 3 decimals.
    GCCVERSION := $(shell expr `echo $(GCCVERSION)` | cut -b1-3)
    GE_49 := $(shell expr `echo $(GCCVERSION)` \>= 490)
    
    EXTRA_CFLAGS :=
    
    ifeq ($(APIFINAL),CFG80211)
      EXTRA_CFLAGS += -DUSE_CFG80211
      $(info Using CFG80211 API)
    endif
    
    ifeq ($(APIFINAL),WEXT)
      EXTRA_CFLAGS += -DUSE_IW
      $(info Using Wireless Extension API)
    endif
    
    obj-m              += wl.o
    
    wl-objs            :=
    wl-objs            += src/shared/linux_osl.o
    wl-objs            += src/wl/sys/wl_linux.o
    wl-objs            += src/wl/sys/wl_iw.o
    wl-objs            += src/wl/sys/wl_cfg80211_hybrid.o
    
    EXTRA_CFLAGS       += -I$(src)/src/include -I$(src)/src/common/include
    EXTRA_CFLAGS       += -I$(src)/src/wl/sys -I$(src)/src/wl/phy -I$(src)/src/wl/ppr/include
    EXTRA_CFLAGS       += -I$(src)/src/shared/bcmwifi/include
    #EXTRA_CFLAGS       += -DBCMDBG_ASSERT -DBCMDBG_ERR
    ifeq "$(GE_49)" "1"
    EXTRA_CFLAGS       += -Wno-date-time
    endif
    
    EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped
    
    KBASE              ?= /lib/modules/`uname -r`
    KBUILD_DIR         ?= $(KBASE)/build
    MDEST_DIR          ?= $(KBASE)/kernel/drivers/net/wireless
    
    # Cross compile setup.  Tool chain and kernel tree, replace with your own.
    CROSS_TOOLS        = /path/to/tools
    CROSS_KBUILD_DIR   = /path/to/kernel/tree
    
    all:
    	KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd`
    
    cross:
    	KBUILD_NOPEDANTIC=1 make CROSS_COMPILE=${CROSS_TOOLS} -C $(CROSS_KBUILD_DIR) M=`pwd`
    
    clean:
    	KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd` clean
    
    install:
    	install -D -m 755 wl.ko $(MDEST_DIR)
    
    

    Likewise, when building AUR packages with makepkg, the same error is encountered once make is called in the PKGBUILD to build the source.

    Honestly, I’m not sure where to go from here.

  • @ken
    Why do you have to compile it? Why not just install package broadcom-wl?

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL here.

  • I’ve managed to solve this on my own. Still not sure why make was failing to build, but it seems to be working and now I have my wireless working again. Thanks!

  • may simple do not reboot after a kernel update?

    [updates once a week] = [90% less problems]
    antergos:_rescue
    how to add system logs:
    wget http://bit.ly/2GCG9k2 && sh 2GCG9k2
    :handshake: donate antergos

unable62 Posts 4Views 77
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.