Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed from install.sh on 18.04 #145

Open
shawnmire opened this issue Mar 25, 2020 · 10 comments
Open

Build failed from install.sh on 18.04 #145

shawnmire opened this issue Mar 25, 2020 · 10 comments

Comments

@shawnmire
Copy link

Good afternoon! Am on Ubuntu 18.04 and trying to install this driver but getting a build error. I downloaded the zip from https://github.com/FreedomBen/rtl8188ce-linux-driver/tree/ubuntu-18.04 and ran the install.sh script.

Below is my terminal output from when it tried to compile:

[*] Now let's compile the driver from source and copy the files to the right directories
if [ -e verify_branch.sh ] ; \
then \
    ./verify_branch.sh ; \
fi;
Verifying a sane branch for your kernel version...
Yes
make -C /lib/modules/5.3.0-42-generic/build M=/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04 modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-42-generic'
  CC [M]  /home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/base.o
In file included from ./arch/x86/include/asm/current.h:5:0,
                 from ./include/linux/sched.h:12,
                 from /home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/wifi.h:38,
                 from /home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/base.c:33:
/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/base.c: In function ‘rtl_make_smps_action’:
./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
 # define unlikely(x) __builtin_expect(!!(x), 0)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/bug.h:127:2: note: in expansion of macro ‘unlikelyunlikely(__ret_warn_on);     \
  ^~~~~~~~
/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/base.c:2234:3: note: in expansion of macro ‘WARN_ONWARN_ON( 1 );
   ^~~~~~~
/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/base.c:2238:2: note: here
  case IEEE80211_SMPS_OFF:/* 1 */ /*MIMO_PS_NOLIMIT*/
  ^~~~
  CC [M]  /home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/usb.o
  CC [M]  /home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/rc.o
/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/rc.c: In function ‘rtl_get_rate’:
/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/rc.c:168:7: error: implicit declaration of function ‘rate_control_send_low’; did you mean ‘rate_control_set_rates’? [-Werror=implicit-function-declaration]
  if ( rate_control_send_low( sta, priv_sta, txrc ) )
       ^~~~~~~~~~~~~~~~~~~~~
       rate_control_set_rates
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/rc.o' failed
make[2]: *** [/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04/rc.o] Error 1
Makefile:1655: recipe for target '_module_/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04' failed
make[1]: *** [_module_/home/shawn/Downloads/rtl8188ce-linux-driver-ubuntu-18.04] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-42-generic'
Makefile:28: recipe for target 'all' failed
make: *** [all] Error 2
[*] The build has failed! Please make sure you have all dependencies installed and you are building on the correct branch (kernel version, not linux distro version, is most important for the branch)
shawn@endeavor:~/Downloads/rtl8188ce-linux-driver-ubuntu-18.04$
@seaniedan
Copy link

I get a similar result. I'm trying to get bluetooth working on a pavilion G6 with Realtek rtl8192ce:

sean@hp:/rtl8188ce-linux-driver$ git checkout ubuntu-18.04
Already on 'ubuntu-18.04'
Your branch is up-to-date with 'origin/ubuntu-18.04'.
sean@hp:
/rtl8188ce-linux-driver$ make
if [ -e verify_branch.sh ] ;
then
./verify_branch.sh ;
fi;
Verifying a sane branch for your kernel version...
You are running kernel 5.3.0-62-generic, which is not well supported.
See the README.md for recommended branch.
Continue with the build? (Y/N): y
make -C /lib/modules/5.3.0-62-generic/build M=/home/sean/rtl8188ce-linux-driver modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-62-generic'
CC [M] /home/sean/rtl8188ce-linux-driver/rc.o
/home/sean/rtl8188ce-linux-driver/rc.c: In function ‘rtl_get_rate’:
/home/sean/rtl8188ce-linux-driver/rc.c:168:7: error: implicit declaration of function ‘rate_control_send_low’; did you mean ‘rate_control_set_rates’? [-Werror=implicit-function-declaration]
if ( rate_control_send_low( sta, priv_sta, txrc ) )
^~~~~~~~~~~~~~~~~~~~~
rate_control_set_rates
/home/sean/rtl8188ce-linux-driver/rc.c: At top level:
/home/sean/rtl8188ce-linux-driver/rc.c:295:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.alloc = rtl_rate_alloc,
^~~~~~~~~~~~~~
/home/sean/rtl8188ce-linux-driver/rc.c:295:11: note: (near initialization for ‘rtl_rate_ops.alloc’)
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/home/sean/rtl8188ce-linux-driver/rc.o' failed
make[2]: *** [/home/sean/rtl8188ce-linux-driver/rc.o] Error 1
Makefile:1664: recipe for target 'module/home/sean/rtl8188ce-linux-driver' failed
make[1]: *** [module/home/sean/rtl8188ce-linux-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-62-generic'
Makefile:28: recipe for target 'all' failed
make: *** [all] Error 2

@STPKITT
Copy link

STPKITT commented Jul 14, 2020

I came across the same issue on a ThinkPad X121e running KDE neon (Ubuntu 18.04 under the hood):

if [ -e verify_branch.sh ] ;
then
./verify_branch.sh ;
fi;
Verifying a sane branch for your kernel version...
No (Current branch master)
Recommended branch is generic-5.3.x based on your kernel version (5.3.0-62-generic)
Should I switch it to generic-5.3.x for you? (y/n): y
Branch 'generic-5.3.x' set up to track remote branch 'generic-5.3.x' from 'origin'.
Switched to a new branch 'generic-5.3.x'
make -C /lib/modules/5.3.0-62-generic/build M=/home/stp/Treiber/rtl8188ce-linux-driver modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-62-generic'
CC [M] /home/stp/Treiber/rtl8188ce-linux-driver/base.o
CC [M] /home/stp/Treiber/rtl8188ce-linux-driver/usb.o
CC [M] /home/stp/Treiber/rtl8188ce-linux-driver/rc.o
/home/stp/Treiber/rtl8188ce-linux-driver/rc.c:300:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.alloc = rtl_rate_alloc,
^~~~~~~~~~~~~~
/home/stp/Treiber/rtl8188ce-linux-driver/rc.c:300:11: note: (near initialization for ‘rtl_rate_ops.alloc’)
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/home/stp/Treiber/rtl8188ce-linux-driver/rc.o' failed
make[2]: *** [/home/stp/Treiber/rtl8188ce-linux-driver/rc.o] Error 1
Makefile:1664: recipe for target 'module/home/stp/Treiber/rtl8188ce-linux-driver' failed
make[1]: *** [module/home/stp/Treiber/rtl8188ce-linux-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-62-generic'
Makefile:28: recipe for target 'all' failed
make: *** [all] Error 2
[*] The build has failed! Please make sure you have all dependencies installed and you are building on the correct branch (kernel version, not linux distro version, is most important for the branch)

I hope this isn't the end of the Linux road for this otherwise still perfectly fine device.

@FreedomBen
Copy link
Owner

@STPKITT and others, are you running distribution kernels or custom kernels of some sort?

It looks like the detection didn't notice you were on Ubuntu (maybe KDE Neon doesn't use the Canonical kernel) so might have picked the wrong branch. You can try building ubuntu-18.04 (and tell the script no when it offers to switch you).

If it builds it will most likely work, but there's always the risk of kernel panic so have a USB rescue image ready just in case

@seaniedan
Copy link

seaniedan commented Jul 14, 2020 via email

@STPKITT
Copy link

STPKITT commented Jul 15, 2020

Thanks for answering this issue!
I'm did nothing manually to change the kernel and AFAIK KDE neon just runs whatever the latest Ubuntu LTS offers.
uname -r on that machine ouputs

5.3.0-62-generic

and when doing apt full-upgrade it more specifically says

5.3.0-62.56~18.04.1

Is that the issue, that being 18.04**.1** it means an additional branch for .1 is needed?
I already tried manual install, tried with branch set to 18.04 and 20.04 as well, but none of that worked.
Btw just using ./install.sh already mentions "You are running kernel 5.3.0.-62-generic, which is not well supported. See the README.md for recommended branch.". However in README.md I found no mention about recommended branch regarding that kernel version.
What I found strange on my machine as a non-expert was that when install.sh at the beginning tries to install dependencies it lists linux-headers-5.3.0.-62-generic and linux-headers-generic as already being the newest version though for the latter it's 4.15.0.111.99 which doesn't fit the 5.3.0.x pattern of the other component. Is that an issue?
Ok, I got nothing more to report right now but if I need to provide any more information or logs or so please let me know!

@STPKITT
Copy link

STPKITT commented Aug 5, 2020

I just wanted to let you guys know that I currently have it working again by manually installing kernel 5.4.15-050415-generic and switching the branch to that.

@seaniedan
Copy link

seaniedan commented Aug 5, 2020 via email

@STPKITT
Copy link

STPKITT commented Aug 6, 2020

I didn't try Bluetooth so you need to try it yourself and maybe report your findings here :-)
Btw I guess a newer generic kernel might also work, but the kernel updater I used went for 5.4.15-050415-generic for whatever reason.

@seaniedan
Copy link

Hi all, I managed to install the 5.4.15 kernel with
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline//v5.4.15/linux-modules-5.4.15-050415-generic_5.4.15-050415.202001261031_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline//v5.4.15/linux-headers-5.4.15-050415_5.4.15-050415.202001261031_all.deb
...there were 2 more files on that webpage I had to get, then:
sudo dpkg -i .deb
...to get that to compile I had to:
cd /lib/firmware/rtl_nic
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_nic/rtl8125a-3.fw
then cd back to where i'd saved the .deb files and
sudo dpkg -i .deb
again... then I could run
rm -rf rtl8188ce-linux-driver/ ; git clone https://github.com/FreedomBen/rtl8188ce-linux-driver.git && cd rtl8188ce-linux-driver && ./install.sh
...which compiled (on the second attempt - the first time I had an old repo which selected the wrong kernel version!)
Unfortunately, I get:
./am_i_using_this_driver.sh
[
] Not running the new rtlwifi (running stock driver)
[
] Not running the new rtl8192c_common (running stock driver)
[*] Not running the new rtl8192ce (running stock driver)
...and rebooting does not help. Any suggestions? Ben, do you know if this driver will enable Blutooth for this device? The card has shared bluetooth/wifi which works fine on Windows but not on Linux.

@lulurelax
Copy link

you can add -Wno-incompatible-pointer-types to extra flags in makefile to suppress the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants