Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Problem compiling broadcom-sta
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
josedb
Apprentice
Apprentice


Joined: 03 Nov 2006
Posts: 218

PostPosted: Wed May 06, 2020 12:56 am    Post subject: [SOLVED] Problem compiling broadcom-sta Reply with quote

I have compiled this time ago, but after several updates i am able to do it anymore, need a suggestion:

Code:
localhost / # emerge -va broadcom-sta

 * IMPORTANT: 18 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ~] net-wireless/broadcom-sta-6.30.223.271-r5::gentoo  0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]

>>> Verifying ebuild manifests
>>> Running pre-merge checks for net-wireless/broadcom-sta-6.30.223.271-r5
 *
 * If you are stuck using this unmaintained driver (likely in a MacBook),
 * you may be interested to know that a newer compatible wireless card
 * is supported by the in-tree brcmfmac driver. It has a model number
 * BCM943602CS and is for sale on the second hand market for less than
 * 20 USD.
 *
 * See https://wikidevi.com/wiki/Broadcom_Wireless_Adapters and
 *     https://wikidevi.com/wiki/Broadcom_BCM943602CS
 * for more information.
 *

>>> Emerging (1 of 1) net-wireless/broadcom-sta-6.30.223.271-r5::gentoo
 * hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz BLAKE2B SHA512 size ;-) ...                                                                 [ ok ]
 * README-broadcom-sta-6.30.223.271.txt BLAKE2B SHA512 size ;-) ...                                                                            [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     5.6.10-gentoo
 * Checking for suitable kernel configuration options...
 *   B43: If you insist on building this, you must blacklist it!
 *   BCMA: If you insist on building this, you must blacklist it!
 *   SSB: If you insist on building this, you must blacklist it!
 *   MAC80211: If you insist on building this, you must blacklist it!
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
>>> Unpacking source...
>>> Unpacking hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz to /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work
>>> Unpacking README-broadcom-sta-6.30.223.271.txt to /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work
unpack README-broadcom-sta-6.30.223.271.txt: file format not recognized. Ignoring.
>>> Source unpacked in /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work
>>> Preparing source in /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work ...
 * Applying broadcom-sta-6.30.223.141-makefile.patch ...
patching file Makefile
Hunk #1 succeeded at 147 with fuzz 2 (offset 19 lines).                                                                                        [ ok ]
 * Applying broadcom-sta-6.30.223.141-eth-to-wlan.patch ...                                                                                    [ ok ]
 * Applying broadcom-sta-6.30.223.141-gcc.patch ...                                                                                            [ ok ]
 * Applying broadcom-sta-6.30.223.248-r3-Wno-date-time.patch ...
patching file Makefile
Hunk #1 succeeded at 145 with fuzz 2 (offset 19 lines).                                                                                        [ ok ]
 * Applying broadcom-sta-6.30.223.271-r1-linux-3.18.patch ...                                                                                  [ ok ]
 * Applying broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch ...                                                                                [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.7.patch ...                                                                                   [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.8.patch ...                                                                                   [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.11.patch ...                                                                                  [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.12.patch ...                                                                                  [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.15.patch ...                                                                                  [ ok ]
 * Applying broadcom-sta-6.30.223.271-r5-linux-5.1.patch ...                                                                                   [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work ...
ln: failed to create symbolic link 'Module.symvers': File exists
 * Preparing wl module
make -j16 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' -C /usr/src/linux M=/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work wl.ko
make: Entering directory '/usr/src/linux-5.6.10-gentoo'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
  AR      /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/built-in.a
  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.o
  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.o
  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_iw.o
  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_cfg80211_hybrid.o
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c: In function ‘osl_reg_map’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:949:10: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
  949 |  return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
      |          ^~~~~~~~~~~~~~~
      |          ioremap_cache
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:949:10: warning: returning ‘int’ from a function with return type ‘void *’ makes pointer from integer without a cast [-Wint-conversion]
  949 |  return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
      |         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c: In function ‘osl_os_get_image_block’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:1083:28: warning: passing argument 2 of ‘kernel_read’ makes pointer from integer without a cast [-Wint-conversion]
 1083 |  rdlen = kernel_read(fp, fp->f_pos, buf, len);
      |                          ~~^~~~~~~
      |                            |
      |                            loff_t {aka long long int}
In file included from ./include/linux/huge_mm.h:8,
                 from ./include/linux/mm.h:567,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/include/linuxver.h:65,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:25:
./include/linux/fs.h:3018:43: note: expected ‘void *’ but argument is of type ‘loff_t’ {aka ‘long long int’}
 3018 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                           ^~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:1083:37: warning: passing argument 3 of ‘kernel_read’ makes integer from pointer without a cast [-Wint-conversion]
 1083 |  rdlen = kernel_read(fp, fp->f_pos, buf, len);
      |                                     ^~~
      |                                     |
      |                                     char *
In file included from ./include/linux/huge_mm.h:8,
                 from ./include/linux/mm.h:567,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/include/linuxver.h:65,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:25:
./include/linux/fs.h:3018:51: note: expected ‘size_t’ {aka ‘long unsigned int’} but argument is of type ‘char *’
 3018 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                                   ^~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:1083:42: warning: passing argument 4 of ‘kernel_read’ makes pointer from integer without a cast [-Wint-conversion]
 1083 |  rdlen = kernel_read(fp, fp->f_pos, buf, len);
      |                                          ^~~
      |                                          |
      |                                          int
In file included from ./include/linux/huge_mm.h:8,
                 from ./include/linux/mm.h:567,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/include/linuxver.h:65,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:25:
./include/linux/fs.h:3018:59: note: expected ‘loff_t *’ {aka ‘long long int *’} but argument is of type ‘int’
 3018 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                                           ^~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c: In function ‘wl_attach’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:592:20: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
  592 |  if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
      |                    ^~~~~~~~~~~~~~~
      |                    ioremap_cache
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:592:18: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  592 |  if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
      |                  ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c: In function ‘wl_pci_probe’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:779:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  779 |  if ((val & 0x0000ff00) != 0)
      |  ^~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:781:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  781 |   bar1_size = pci_resource_len(pdev, 2);
      |   ^~~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:782:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  782 |   bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
      |               ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c: In function ‘wl_reg_proc_entry’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:3378:58: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3378 |  if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
      |                                                          ^~~~~~~~
      |                                                          |
      |                                                          const struct file_operations *
In file included from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:38:
./include/linux/proc_fs.h:59:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
   59 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
      |                               ^~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_cfg80211_hybrid.c:43:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_set_auth_type’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_cfg80211_hybrid.h:52:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
   52 |  if (wl_dbg_level & WL_DBG_DBG) {   \
      |     ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_cfg80211_hybrid.c:815:3: note: in expansion of macro ‘WL_DBG’
  815 |   WL_DBG(("network eap\n"));
      |   ^~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_cfg80211_hybrid.c:816:2: note: here
  816 |  default:
      |  ^~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:267: /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c: In function ‘_wl_add_monitor_if’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:2982:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
 2982 |  strncpy(wlif->dev->name, wlif->name, strlen(wlif->name));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:267: /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.o] Error 1
make: *** [Makefile:1683: /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work] Error 2
make: Leaving directory '/usr/src/linux-5.6.10-gentoo'
 * ERROR: net-wireless/broadcom-sta-6.30.223.271-r5::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-wireless/broadcom-sta-6.30.223.271-r5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-wireless/broadcom-sta-6.30.223.271-r5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/temp/environment'.
 * Working directory: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work'
 * S: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work'

>>> Failed to emerge net-wireless/broadcom-sta-6.30.223.271-r5, Log file:

>>>  '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/temp/build.log'

 * Messages for package net-wireless/broadcom-sta-6.30.223.271-r5:

 *
 * If you are stuck using this unmaintained driver (likely in a MacBook),
 * you may be interested to know that a newer compatible wireless card
 * is supported by the in-tree brcmfmac driver. It has a model number
 * BCM943602CS and is for sale on the second hand market for less than
 * 20 USD.
 *
 * See https://wikidevi.com/wiki/Broadcom_Wireless_Adapters and
 *     https://wikidevi.com/wiki/Broadcom_BCM943602CS
 * for more information.
 *

 * Messages for package net-wireless/broadcom-sta-6.30.223.271-r5:

 *   B43: If you insist on building this, you must blacklist it!
 *   BCMA: If you insist on building this, you must blacklist it!
 *   SSB: If you insist on building this, you must blacklist it!
 *   MAC80211: If you insist on building this, you must blacklist it!
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
 * ERROR: net-wireless/broadcom-sta-6.30.223.271-r5::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-wireless/broadcom-sta-6.30.223.271-r5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-wireless/broadcom-sta-6.30.223.271-r5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/temp/environment'.
 * Working directory: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work'
 * S: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work'


I can see the message about buying another card, but where i live this is not an option, best card is sold here is tplink t9e which has the same broadcom chip.


Last edited by josedb on Thu May 07, 2020 1:04 am; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15434

PostPosted: Wed May 06, 2020 2:10 am    Post subject: Re: Problem compiling broadcom-sta Reply with quote

josedb wrote:
I have compiled this time ago, but after several updates i am able to do it anymore, need a suggestion:
Based on the error messages, this looks like typical out-of-tree bitrot. What worked in one kernel no longer works in a newer kernel. The driver depends on kernel details that have changed over time, and the driver must be patched to handle those changes. For in-tree drivers, the person who commits the breaking change is expected to deal with it. For out-of-tree drivers, the burden falls on the party that maintains the driver out-of-tree.

You have two distinct problems:
Code:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/shared/linux_osl.c:949:10: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
The used function is no longer available.
Code:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r5/work/src/wl/sys/wl_linux.c:3378:58: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
This function has changed its signature. The argument being passed is no longer correct. The parameter should be a pointer to a proc_ops structure, not a file_operations structure.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24152
Location: here

PostPosted: Wed May 06, 2020 7:00 am    Post subject: Reply with quote

Try patch proposed in this bug
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
josedb
Apprentice
Apprentice


Joined: 03 Nov 2006
Posts: 218

PostPosted: Wed May 06, 2020 2:19 pm    Post subject: Reply with quote

First of all, thanks for your help. My bad , i should have checked in bugzilla. I am trying this when i am back home from work. thanks again.
Back to top
View user's profile Send private message
josedb
Apprentice
Apprentice


Joined: 03 Nov 2006
Posts: 218

PostPosted: Thu May 07, 2020 1:05 am    Post subject: Reply with quote

After applying the patch, it emerges normally. Thanks for the help
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum