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

compilation with kernel 4.7 fails #32

Closed
wbolster opened this issue Jul 19, 2016 · 6 comments
Closed

compilation with kernel 4.7 fails #32

wbolster opened this issue Jul 19, 2016 · 6 comments

Comments

@wbolster
Copy link

apparently some drm apis changed. compilation fails on 4.7.

@philippe-levan
Copy link

Hi,

I also tried to install the driver with the 4.7 kernel :

philippe@philippe-XPS-13-9350:~/Downloads/kernel/DisplayLink USB Graphics Software for Ubuntu 1.1.68$ sudo ./displaylink-driver-1.1.62.run 
Verifying archive integrity... All good.
Uncompressing DisplayLink Linux Driver 1.1.62  100%  
DisplayLink Linux Software 1.1.62 install script called: install
Distribution discovered: Ubuntu 16.04.1 LTS
Installing
Configuring EVDI DKMS module
Registering EVDI kernel module with DKMS
Building EVDI kernel module with DKMS
ERROR (code 3): Failed to build evdi/1.1.62. Consult /var/lib/dkms/evdi/1.1.62/build/make.log for details..

And in the make.log, I found the following traces :

DKMS make.log for evdi-1.1.62 for kernel 4.7.0-040700-generic (x86_64)
mardi 26 juillet 2016, 08:50:45 (UTC+0200)
make KBUILD_VERBOSE=1 SUBDIRS=/var/lib/dkms/evdi/1.1.62/build SRCROOT=/var/lib/dkms/evdi/1.1.62/build CONFIG_MODULE_SIG= -C /lib/modules/4.7.0-040700-generic/build mod
ules
make[1]: Entering directory '/usr/src/linux-headers-4.7.0-040700-generic'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2;                                                       \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
echo >&2 ;                                                      \
/bin/false)
mkdir -p /var/lib/dkms/evdi/1.1.62/build/.tmp_versions ; rm -f /var/lib/dkms/evdi/1.1.62/build/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/var/lib/dkms/evdi/1.1.62/build

[...]

  gcc -Wp,-MD,/var/lib/dkms/evdi/1.1.62/build/.evdi_main.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -fno-pie -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-pie -no-pie -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -DCC_HAVE_ASM_GOTO -Iinclude/drm  -DMODULE  -DKBUILD_BASENAME='"evdi_main"'  -DKBUILD_MODNAME='"evdi"' -c -o /var/lib/dkms/evdi/1.1.62/build/.tmp_evdi_main.o /var/lib/dkms/evdi/1.1.62/build/evdi_main.c
/var/lib/dkms/evdi/1.1.62/build/evdi_main.c: In function ‘evdi_driver_unload’:
/var/lib/dkms/evdi/1.1.62/build/evdi_main.c:82:2: error: implicit declaration of function ‘drm_connector_unplug_all’ [-Werror=implicit-function-declaration]
  drm_connector_unplug_all(dev);
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/var/lib/dkms/evdi/1.1.62/build/evdi_main.o' failed
make[2]: *** [/var/lib/dkms/evdi/1.1.62/build/evdi_main.o] Error 1
Makefile:1463: recipe for target '_module_/var/lib/dkms/evdi/1.1.62/build' failed
make[1]: *** [_module_/var/lib/dkms/evdi/1.1.62/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.7.0-040700-generic'
Makefile:21: recipe for target 'all' failed
make: *** [all] Error 2

best regards,
Philippe

@carbinefreak
Copy link

Also fails in Gentoo on 4.7.0 with DRM library function errors. I'll second that the DRM libraries changed in 4.7.0


>>> Unpacking source...
 * Fetching git://github.com/DisplayLink/evdi.git ...
git fetch git://github.com/DisplayLink/evdi.git +refs/tags/v1.1.65:refs/tags/v1.1.65
git symbolic-ref refs/git-r3/x11-drivers/evdi/0/__main__ refs/tags/v1.1.65
 * Checking out git://github.com/DisplayLink/evdi.git to /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65 ...
git checkout --quiet refs/tags/v1.1.65
GIT update -->
   repository:               git://github.com/DisplayLink/evdi.git
   at the commit:            fec43a26dc45124cdd1dbc3316c2335625bd882e
>>> Source unpacked in /var/tmp/portage/x11-drivers/evdi-1.1.65/work
>>> Preparing source in /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65 ...
 * Preparing evdi module
make -j4 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' clean module 
rm -rf *.o *.ko .tmp* .*.*.cmd Module.symvers evdi.mod.c modules.order
make -C /lib/modules/4.7.0/build M=$PWD
make[1]: Entering directory '/usr/src/linux-4.7.0'
  LD      /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/built-in.o
  CC [M]  /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_connector.o
  CC [M]  /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_modeset.o
  CC [M]  /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_drv.o
  CC [M]  /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_encoder.o
  CC [M]  /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_main.o
  CC [M]  /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.o
  CC [M]  /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_stats.o
  CC [M]  /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.o
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_main.c: In function ‘evdi_driver_unload’:
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_main.c:82:2: error: implicit declaration of function ‘drm_connector_unplug_all’ [-Werror=implicit-function-declaration]
  drm_connector_unplug_all(dev);
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_main.o' failed
make[2]: *** [/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_main.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.c: In function ‘evdi_fb_user_fb_create’:
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.c:503:30: warning: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type
  obj = drm_gem_object_lookup(dev, file, mode_cmd->handles[0]);
                              ^
In file included from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_drv.h:23:0,
                 from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.c:22:
include/drm/drm_gem.h:241:24: note: expected ‘struct drm_file *’ but argument is of type ‘struct drm_device *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                        ^
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.c:503:35: warning: passing argument 2 of ‘drm_gem_object_lookup’ makes integer from pointer without a cast
  obj = drm_gem_object_lookup(dev, file, mode_cmd->handles[0]);
                                   ^
In file included from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_drv.h:23:0,
                 from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.c:22:
include/drm/drm_gem.h:241:24: note: expected ‘u32’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                        ^
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.c:503:8: error: too many arguments to function ‘drm_gem_object_lookup’
  obj = drm_gem_object_lookup(dev, file, mode_cmd->handles[0]);
        ^
In file included from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_drv.h:23:0,
                 from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.c:22:
include/drm/drm_gem.h:241:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                        ^
scripts/Makefile.build:289: recipe for target '/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.o' failed
make[2]: *** [/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_fb.o] Error 1
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.c: In function ‘evdi_gem_mmap’:
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.c:211:30: warning: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type
  obj = drm_gem_object_lookup(dev, file, handle);
                              ^
In file included from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_drv.h:23:0,
                 from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.c:11:
include/drm/drm_gem.h:241:24: note: expected ‘struct drm_file *’ but argument is of type ‘struct drm_device *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                        ^
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.c:211:35: warning: passing argument 2 of ‘drm_gem_object_lookup’ makes integer from pointer without a cast
  obj = drm_gem_object_lookup(dev, file, handle);
                                   ^
In file included from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_drv.h:23:0,
                 from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.c:11:
include/drm/drm_gem.h:241:24: note: expected ‘u32’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                        ^
/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.c:211:8: error: too many arguments to function ‘drm_gem_object_lookup’
  obj = drm_gem_object_lookup(dev, file, handle);
        ^
In file included from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_drv.h:23:0,
                 from /var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.c:11:
include/drm/drm_gem.h:241:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                        ^
scripts/Makefile.build:289: recipe for target '/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.o' failed
make[2]: *** [/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module/evdi_gem.o] Error 1
Makefile:1457: recipe for target '_module_/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module' failed
make[1]: *** [_module_/var/tmp/portage/x11-drivers/evdi-1.1.65/work/evdi-1.1.65/module] Error 2
make[1]: Leaving directory '/usr/src/linux-4.7.0'
Makefile:55: recipe for target 'module' failed
make: *** [module] Error 2

@rainerklier
Copy link

i fixed it myself by changing the code from the archive evdi-1.1.62-src.tar.gz.
i unpacked it, and changed it the following way:
in evdi_main.c change drm_connector_unplug_all() to drm_connector_unregister_all().
in evdi_fb.c, evdi_cursor.c and evdi_gem.c change all calls of drm_gem_object_lookup(dev, file, cmd->handles[0]) to drm_gem_object_lookup(file, cmd->handles[0]).
then i recreated the archive evdi-1.1.62-src.tar.gz with the changed files and ran the install script.

sorry that i have no patch file which automatically does all the above.

@displaylink-mlukaszek
Copy link
Contributor

The module code have been adjusted to kernels up to 4.7 - closing.

@philippe-levan
Copy link

Thanks a lot !

@fdbozzo
Copy link

fdbozzo commented Aug 20, 2016

Hi, I've downloaded the Ubuntu script from http://www.displaylink.com/downloads/ubuntu and does not work with 4.7 kernel. (I'm using Ubuntu 16.04)
I can see that this is fixed now in development, but I don't know what to do with this c++ code. I've tryied with sudo make all, but throws errors (file libdrm/drm.h not found) and I don't know what to do now.
Can somebody help me with this?

Thanks, and sorry for posting it here, but I don't know where to ask, and the README does not explain how to compile or the pre-requisites

Edit:
As mentioned here (#6) I've installed libdrm-devel and now I can compile with sudo make all and sudo make clean without errors.
So now what I need to do with use it? I have the DELL D3100 Dock Station. Thanks.-

Edit 2:
Ok, found it, I did this:

  1. copy "modules" contents into /usr/src/evdi-1.1.66 (invented "future" version)
  2. compile with sudo dkms install -m evdi/1.1.66 --kernelsourcedir /usr/src/linux-headers-4.7.1-040701-generic
  3. Reboot
  4. sudo modprobe evdi
  5. Confirmed loaded module with lsmod | grep evdi

Now I'm looking how to configure the HDMI attached monitor, which shows nothing

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

6 participants