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

Fails to compile in RHEL 9 kernel 5.14 #457

Open
nbardier opened this issue Feb 18, 2024 · 4 comments
Open

Fails to compile in RHEL 9 kernel 5.14 #457

nbardier opened this issue Feb 18, 2024 · 4 comments

Comments

@nbardier
Copy link

Hello, compile fails on RHEL 9.2, kernel 5.14, using latest evdi (1.14.2)

$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.2 (Plow)
$ uname -a
Linux cafe 5.14.0-284.30.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 25 09:13:12 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux

$ make
CFLAGS="-isystem./include -isystem./include/uapi -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes -Werror=discarded-qualifiers " make -C module
make[1]: Entering directory '/usr/local/src/evdi-1.14.2/module'
make -C /lib/modules/5.14.0-284.30.1.el9_2.x86_64/build M=$PWD
make[2]: Entering directory '/usr/src/kernels/5.14.0-284.30.1.el9_2.x86_64'
CC [M] /usr/local/src/evdi-1.14.2/module/evdi_platform_drv.o
CC [M] /usr/local/src/evdi-1.14.2/module/evdi_platform_dev.o
CC [M] /usr/local/src/evdi-1.14.2/module/evdi_sysfs.o
CC [M] /usr/local/src/evdi-1.14.2/module/evdi_modeset.o
CC [M] /usr/local/src/evdi-1.14.2/module/evdi_connector.o
CC [M] /usr/local/src/evdi-1.14.2/module/evdi_encoder.o
CC [M] /usr/local/src/evdi-1.14.2/module/evdi_drm_drv.o
CC [M] /usr/local/src/evdi-1.14.2/module/evdi_fb.o
/usr/local/src/evdi-1.14.2/module/evdi_fb.c: In function ‘evdifb_create’:
/usr/local/src/evdi-1.14.2/module/evdi_fb.c:408:23: error: ‘struct drm_fb_helper’ has no member named ‘info’
408 | efbdev->helper.info = info;
| ^
/usr/local/src/evdi-1.14.2/module/evdi_fb.c: In function ‘evdi_fbdev_destroy’:
/usr/local/src/evdi-1.14.2/module/evdi_fb.c:468:27: error: ‘struct drm_fb_helper’ has no member named ‘info’
468 | if (efbdev->helper.info) {
| ^
/usr/local/src/evdi-1.14.2/module/evdi_fb.c:469:38: error: ‘struct drm_fb_helper’ has no member named ‘info’
469 | info = efbdev->helper.info;
| ^
/usr/local/src/evdi-1.14.2/module/evdi_fb.c: In function ‘evdi_fbdev_init’:
/usr/local/src/evdi-1.14.2/module/evdi_fb.c:505:53: error: passing argument 3 of ‘drm_fb_helper_prepare’ makes pointer from integer without a cast [-Werror=int-conversion]
505 | drm_fb_helper_prepare(dev, &efbdev->helper, 32, &evdi_fb_helper_funcs);
| ^~
| |
| int
In file included from /usr/local/src/evdi-1.14.2/module/evdi_fb.c:26:
./include/drm/drm_fb_helper.h:215:62: note: expected ‘const struct drm_fb_helper_funcs *’ but argument is of type ‘int’
215 | const struct drm_fb_helper_funcs *funcs);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/local/src/evdi-1.14.2/module/evdi_fb.c:505:9: error: too many arguments to function ‘drm_fb_helper_prepare’
505 | drm_fb_helper_prepare(dev, &efbdev->helper, 32, &evdi_fb_helper_funcs);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/evdi-1.14.2/module/evdi_fb.c:26:
./include/drm/drm_fb_helper.h:214:6: note: declared here
214 | void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper,
| ^~~~~~~~~~~~~~~~~~~~~
/usr/local/src/evdi-1.14.2/module/evdi_fb.c:526:15: error: too few arguments to function ‘drm_fb_helper_initial_config’
526 | ret = drm_fb_helper_initial_config(&efbdev->helper);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/evdi-1.14.2/module/evdi_fb.c:26:
./include/drm/drm_fb_helper.h:264:5: note: declared here
264 | int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/src/evdi-1.14.2/module/evdi_fb.c: In function ‘evdi_fbdev_unplug’:
/usr/local/src/evdi-1.14.2/module/evdi_fb.c:560:27: error: ‘struct drm_fb_helper’ has no member named ‘info’
560 | if (efbdev->helper.info) {
| ^
/usr/local/src/evdi-1.14.2/module/evdi_fb.c:563:38: error: ‘struct drm_fb_helper’ has no member named ‘info’
563 | info = efbdev->helper.info;
| ^
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:321: /usr/local/src/evdi-1.14.2/module/evdi_fb.o] Error 1
make[2]: *** [Makefile:1923: /usr/local/src/evdi-1.14.2/module] Error 2
make[2]: Leaving directory '/usr/src/kernels/5.14.0-284.30.1.el9_2.x86_64'
make[1]: *** [Makefile:86: module] Error 2
make[1]: Leaving directory '/usr/local/src/evdi-1.14.2/module'
make: *** [Makefile:13: module] Error 2

@elguero
Copy link
Contributor

elguero commented Feb 18, 2024

Hi @nbardier ,

Yes, you will need to use 1.14.1 since there were changes in the kernel between RHEL 9.2 and 9.3 which 1.14.2 takes care of. There is no backwards compatibility at present.

@nbardier
Copy link
Author

nbardier commented Feb 25, 2024

Hi, I tried with 1.14.1 and got this error:

$ make
CFLAGS="-isystem./include -isystem./include/uapi -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes -Werror=discarded-qualifiers " make -C module
make[1]: Entering directory '/usr/local/src/evdi-1.14.1/module'
make -C /lib/modules/5.14.0-284.30.1.el9_2.x86_64/build M=$PWD
make[2]: Entering directory '/usr/src/kernels/5.14.0-284.30.1.el9_2.x86_64'
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_platform_drv.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_platform_dev.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_sysfs.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_modeset.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_connector.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_encoder.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_drm_drv.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_fb.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_gem.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_painter.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_params.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_cursor.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_debug.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_i2c.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_ioc32.o
LD [M] /usr/local/src/evdi-1.14.1/module/evdi.o
MODPOST /usr/local/src/evdi-1.14.1/module/Module.symvers
CC [M] /usr/local/src/evdi-1.14.1/module/evdi.mod.o
LD [M] /usr/local/src/evdi-1.14.1/module/evdi.ko
BTF [M] /usr/local/src/evdi-1.14.1/module/evdi.ko
Skipping BTF generation for /usr/local/src/evdi-1.14.1/module/evdi.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/kernels/5.14.0-284.30.1.el9_2.x86_64'
make[1]: Leaving directory '/usr/local/src/evdi-1.14.1/module'
CFLAGS="-I../module -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes -Werror=discarded-qualifiers " make -C library
make[1]: Entering directory '/usr/local/src/evdi-1.14.1/library'
cc -I../module -std=gnu99 -fPIC -D_FILE_OFFSET_BITS=64 -I../module -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes -Werror=discarded-qualifiers $(pkg-config --cflags-only-I libdrm) -c -o evdi_lib.o evdi_lib.c
cc evdi_lib.o -shared -Wl,-soname,libevdi.so.1 -o libevdi.so.1.14.1 -lc -lgcc
cp libevdi.so.1.14.1 libevdi.so
ln -sf libevdi.so.1.14.1 libevdi.so.1
make[1]: Leaving directory '/usr/local/src/evdi-1.14.1/library'
CXXFLAGS="-I../module -I../library -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare " make -C pyevdi
make[1]: Entering directory '/usr/local/src/evdi-1.14.1/pyevdi'
g++ -I../library $(python3 -m pybind11 --includes) -std=c++11 -fPIC -I../module -I../library -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -c Buffer.cpp
/usr/bin/python3: No module named pybind11
g++ -I../library $(python3 -m pybind11 --includes) -std=c++11 -fPIC -I../module -I../library -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -c Card.cpp
/usr/bin/python3: No module named pybind11
Card.cpp:3:10: fatal error: pybind11/pybind11.h: No such file or directory
3 | #include <pybind11/pybind11.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:32: Card.o] Error 1
make[1]: Leaving directory '/usr/local/src/evdi-1.14.1/pyevdi'
make: *** [Makefile:12: all] Error 2

@nbardier
Copy link
Author

nbardier commented Feb 25, 2024

Nevermind my previous message, seems I had to install pybind11. I installed it with 'yum install python3-pybind11'.
However, I now get the following errors:

$ make
CFLAGS="-isystem./include -isystem./include/uapi -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes -Werror=discarded-qualifiers " make -C module
make[1]: Entering directory '/usr/local/src/evdi-1.14.1/module'
make -C /lib/modules/5.14.0-284.30.1.el9_2.x86_64/build M=$PWD
make[2]: Entering directory '/usr/src/kernels/5.14.0-284.30.1.el9_2.x86_64'
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_platform_drv.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_platform_dev.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_sysfs.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_modeset.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_connector.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_encoder.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_drm_drv.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_fb.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_gem.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_painter.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_params.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_cursor.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_debug.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_i2c.o
CC [M] /usr/local/src/evdi-1.14.1/module/evdi_ioc32.o
LD [M] /usr/local/src/evdi-1.14.1/module/evdi.o
MODPOST /usr/local/src/evdi-1.14.1/module/Module.symvers
CC [M] /usr/local/src/evdi-1.14.1/module/evdi.mod.o
LD [M] /usr/local/src/evdi-1.14.1/module/evdi.ko
BTF [M] /usr/local/src/evdi-1.14.1/module/evdi.ko
Skipping BTF generation for /usr/local/src/evdi-1.14.1/module/evdi.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/kernels/5.14.0-284.30.1.el9_2.x86_64'
make[1]: Leaving directory '/usr/local/src/evdi-1.14.1/module'
CFLAGS="-I../module -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes -Werror=discarded-qualifiers " make -C library
make[1]: Entering directory '/usr/local/src/evdi-1.14.1/library'
cc -I../module -std=gnu99 -fPIC -D_FILE_OFFSET_BITS=64 -I../module -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes -Werror=discarded-qualifiers $(pkg-config --cflags-only-I libdrm) -c -o evdi_lib.o evdi_lib.c
cc evdi_lib.o -shared -Wl,-soname,libevdi.so.1 -o libevdi.so.1.14.1 -lc -lgcc
cp libevdi.so.1.14.1 libevdi.so
ln -sf libevdi.so.1.14.1 libevdi.so.1
make[1]: Leaving directory '/usr/local/src/evdi-1.14.1/library'
CXXFLAGS="-I../module -I../library -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare " make -C pyevdi
make[1]: Entering directory '/usr/local/src/evdi-1.14.1/pyevdi'
g++ -I../library $(python3 -m pybind11 --includes) -std=c++11 -fPIC -I../module -I../library -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -c Buffer.cpp
g++ -I../library $(python3 -m pybind11 --includes) -std=c++11 -fPIC -I../module -I../library -Werror -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -c Card.cpp
In file included from Card.cpp:4:
Card.h:29:10: error: ‘function’ in namespace ‘std’ does not name a template type
29 | std::function<void(struct evdi_mode)> m_modeHandler;
| ^~~~~~~~
Card.h:7:1: note: ‘std::function’ is defined in header ‘’; did you forget to ‘#include ’?
6 | #include
+++ |+#include
7 | #include
Card.h:30:10: error: ‘function’ in namespace ‘std’ does not name a template type
30 | std::function<void(std::shared_ptr buffer)> acquire_framebuffer_cb;
| ^~~~~~~~
Card.h:30:5: note: ‘std::function’ is defined in header ‘’; did you forget to ‘#include ’?
30 | std::function<void(std::shared_ptr buffer)> acquire_framebuffer_cb;
| ^~~
Card.cpp: In function ‘void card_C_mode_handler(evdi_mode, void*)’:
Card.cpp:28:14: error: ‘class Card’ has no member named ‘m_modeHandler’
28 | if(card->m_modeHandler != nullptr){
| ^~~~~~~~~~~~~
Card.cpp:29:15: error: ‘class Card’ has no member named ‘m_modeHandler’
29 | card->m_modeHandler(mode);
| ^~~~~~~~~~~~~
Card.cpp: In constructor ‘Card::Card(int)’:
Card.cpp:69:5: error: ‘m_modeHandler’ was not declared in this scope
69 | m_modeHandler = nullptr;
| ^~~~~~~~~~~~~
Card.cpp:70:5: error: ‘acquire_framebuffer_cb’ was not declared in this scope
70 | acquire_framebuffer_cb = nullptr;
| ^~~~~~~~~~~~~~~~~~~~~~
Card.cpp: In member function ‘void Card::grab_pixels()’:
Card.cpp:162:8: error: ‘acquire_framebuffer_cb’ was not declared in this scope
162 | if(acquire_framebuffer_cb)
| ^~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:32: Card.o] Error 1
make[1]: Leaving directory '/usr/local/src/evdi-1.14.1/pyevdi'
make: *** [Makefile:12: all] Error 2

@nbardier
Copy link
Author

A quick google search sent me to this stackoverflow post https://stackoverflow.com/questions/61758906/building-cpp-with-pybind11

I added

#include

below this in pyevdi/Card.h

// Copyright (c) 2022 DisplayLink (UK) Ltd.
#ifndef CARD_H
#define CARD_H

#include "Buffer.h"
#include
#include

And it seems to compile now...

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

2 participants