Bug 273422 - x11-drivers/xf86-video-intel ETIME build failure on 14-STABLE (src update to 14-STABLE from 13-STABLE)
Summary: x11-drivers/xf86-video-intel ETIME build failure on 14-STABLE (src update to ...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on: 225324
Blocks:
  Show dependency treegraph
 
Reported: 2023-08-29 15:12 UTC by jakub_lach
Modified: 2025-01-09 08:24 UTC (History)
13 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments
workaround (312 bytes, patch)
2023-09-03 23:08 UTC, Curtis Villamizar
no flags Details | Diff
patch to disable compilation of unused tools (1.52 KB, patch)
2023-10-28 08:11 UTC, Martin Birgmeier
no flags Details | Diff
patch (920 bytes, patch)
2023-11-27 17:32 UTC, Ivan Rozhuk
rozhuk.im: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jakub_lach 2023-08-29 15:12:12 UTC
--- dri3info-dri3info.o ---
cc -DHAVE_CONFIG_H -I. -I..   -isystem /usr/local/include -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include/libdrm  -O2 -pipe -march=penryn  -Werror=uninitialized -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MT dri3info-dri3info.o -MD -MP -MF .deps/dri3info-dri3info.Tpo -c -o dri3info-dri3info.o `test -f 'dri3info.c' || echo './'`dri3info.c
--- intel_virtual_output-virtual.o ---
virtual.c:499:11: error: use of undeclared identifier 'ETIME'
                return -ETIME;
                        ^
virtual.c:506:11: error: use of undeclared identifier 'ETIME'
                return -ETIME;
                        ^
virtual.c:3008:12: error: use of undeclared identifier 'ETIME'
                        return -ETIME;
                                ^
virtual.c:3042:16: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-attributes]
__attribute__((format(gnu_printf, 3, 4)))
               ^
virtual.c:3056:40: warning: format string is not a string literal [-Wformat-nonliteral]
        len = vsnprintf(buf+4, sizeof(buf)-4, format, va)+5;
                                              ^~~~~~
virtual.c:3465:17: error: use of undeclared identifier 'ETIME'
                                if (ret != -ETIME) {
                                            ^
2 warnings and 4 errors generated.
*** [intel_virtual_output-virtual.o] Error code 1

make[4]: stopped in /usr/obj/usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-b74b67f0f321875492968f7097b9d6e82a66d7df/tools
--- dri3info-dri3info.o ---
mv -f .deps/dri3info-dri3info.Tpo .deps/dri3info-dri3info.Po
1 error

make[4]: stopped in /usr/obj/usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-b74b67f0f321875492968f7097b9d6e82a66d7df/tools

make[3]: stopped in /usr/obj/usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-b74b67f0f321875492968f7097b9d6e82a66d7df

make[2]: stopped in /usr/obj/usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-b74b67f0f321875492968f7097b9d6e82a66d7df

FreeBSD 14.0-ALPHA3 amd64 1400097 #0 stable/14-7be292918: Sat Aug 26 23:03:48 CEST 2023
Comment 1 Curtis Villamizar 2023-09-03 23:08:08 UTC
Created attachment 244618 [details]
workaround
Comment 2 Curtis Villamizar 2023-09-03 23:10:11 UTC
The attached workaround avoids the compile problem.  I'll know soon if it works
but haven't tested beyond getting past the compile.
Comment 3 Curtis Villamizar 2023-09-03 23:12:30 UTC
btw- ETIME is defined in Linux as the Posix errno for time expired in streams.
Comment 4 jakub_lach 2023-09-04 08:10:32 UTC
(In reply to Curtis Villamizar from comment #1)

Thanks, the problem with this bug is that I've thought that ETIME linuxism was already taken care of. Yet here we are. 

FWIW, I'm using 

.if !empty(.CURDIR:M/usr/ports/*)
.include "/etc/ports.conf"
WRKDIRPREFIX= /usr/obj
.endif

in make.conf
Comment 5 jakub_lach 2023-09-04 09:15:10 UTC
(In reply to jakub_lach from comment #4)

No difference without ports.conf
Comment 6 jakub_lach 2023-09-04 09:29:29 UTC
(In reply to jakub_lach from comment #5)

ETIME bug #225324
Comment 7 David Gilbert 2023-10-13 22:23:54 UTC
With this patch, my 14-STABLE kernel panics when I load this module.
Comment 8 Martin Birgmeier 2023-10-28 08:11:13 UTC
Created attachment 245934 [details]
patch to disable compilation of unused tools

The compilation fails for a file which is not included in the installation (pkg-plist), so it can be disabled using an argument to configure. Patch attached.

I have not tested the result, but if the kernel panics there are obviously other issues as well.

-- Martin
Comment 9 Martin Birgmeier 2023-10-28 08:13:02 UTC
(In reply to Martin Birgmeier from comment #8)

Sorry, the patch contains other stuff as well - just ignore that.

-- Martin
Comment 10 Ivan Rozhuk 2023-11-27 17:32:57 UTC
Created attachment 246608 [details]
patch

Same as Martin Birgmeier patch, but cleaned.
Comment 11 litherum 2024-01-20 22:06:29 UTC
I'm hitting this on my machine too. Applying last November's patch (the one from Ivan Rozhuk) locally and rebuilding x11-drivers/xf86-video-intel works for me. It would be very useful to land this patch.
Comment 12 O. Hartmann 2024-02-26 18:45:33 UTC
Same here on recent CURRENT (FreeBSD 15.0-CURRENT #12 main-n268534-32fdcff8703d: Sun Feb 25 21:41:58 CET 2024 amd64), recent ports tree with recent updates to port x11-drivers/xf86-video-intel as of today (26.02.2024, CET):

[...]

--- cursor-cursor.o ---
mv -f .deps/cursor-cursor.Tpo .deps/cursor-cursor.Po
--- cursor ---
/bin/sh ../libtool  --tag=CC    --mode=link cc -I/usr/local/include -I/usr/local/include/libpng16 -D_THREAD_SAFE -O2 -pipe  -Werror=uninitialized -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -fstack-protector-strong -o cursor cursor-cursor.o -L/usr/local/lib -lXfixes -lX11 -lpng16 
--- intel_virtual_output-virtual.o ---
virtual.c:499:11: error: use of undeclared identifier 'ETIME'
  499 |                 return -ETIME;
      |                         ^
virtual.c:506:11: error: use of undeclared identifier 'ETIME'
  506 |                 return -ETIME;
      |                         ^
--- cursor ---
libtool: link: cc -I/usr/local/include -I/usr/local/include/libpng16 -D_THREAD_SAFE -O2 -pipe -Werror=uninitialized -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fstack-protector-strong -o cursor cursor-cursor.o  -L/usr/local/lib -lXfixes -lX11 -lpng16
--- intel_virtual_output-virtual.o ---
virtual.c:3008:12: error: use of undeclared identifier 'ETIME'
 3008 |                         return -ETIME;
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-23 23:24:04 UTC
ping
Comment 14 David Gilbert 2024-06-24 16:27:59 UTC
This works for me (compiles), _BUT_ ... on a new intel chipset I get this:

intel(0): intel_uxa_set_pixmap_bo: size of buffer object does not match constraints: size=8388608, must be greater than 8294400, but less than 4194304

Now... if I go in there are make this statement pass rather than fail (by just hardwiring it to pass) it runs just fine.
Comment 15 rkoberman 2024-06-25 04:29:33 UTC
The xf86-intel driver has been abandoned for at least a a few years and don't properly support anything newer than Haswell. If you delete the driver, X11 will default the modesetting driver (always installed by Xorg). It works FAR better then the old Intel driver. 

I should open a bug report with pkg-message that it should not be used on any graphics newer than a decade old. It may work, but modesetting is well maintained and works far better than than the old, unmaintained Intel driver.

Also, if you are running 14.1, recent 14-STABLE or current, you really should run the drm-61-kmod port.
Comment 16 litherum 2024-06-25 11:11:02 UTC
Which port, other than x11-drivers/xf86-video-intel, produces /usr/local/lib/xorg/modules/drivers/intel_drv.so?

The handbook indicates that file should exist: https://docs.freebsd.org/en/books/handbook/x11/#x-config-video-cards-file-intel
Comment 17 Emmanuel Vadot freebsd_committer freebsd_triage 2024-06-25 12:13:04 UTC
There is clearly something wrong with your setups, ports builds fine here and also on the cluster.
https://pkg.freebsd.org/FreeBSD:15:amd64/latest/All/xf86-video-intel-2.99.917.923_1,1.pkg
https://pkg.freebsd.org/FreeBSD:14:amd64/latest/All/xf86-video-intel-2.99.917.923_1,1.pkg

So without knowing why it doesn't compile for you I'll not commit anything.
Comment 18 David Gilbert 2024-06-25 16:58:59 UTC
(In reply to rkoberman from comment #15)

...so ... what about the minimal amount of 3D acceleration?  Does the mode setting driver do that?
Comment 19 Emmanuel Vadot freebsd_committer freebsd_triage 2024-06-26 13:51:52 UTC
(In reply to dgilbert from comment #18)

modesetting and xf86-video-intel have nothing to do with 3D acceleration, you always have it as long as drm-kmod supports your card, they're both about 2D accel.
Comment 20 rkoberman 2024-06-27 05:50:46 UTC
(In reply to dgilbert from comment #18)
There is no intel_drv.so unless you use the obsolete Intel driver. The modsetting driver is a part of the base Xorg installation and the Xorg software will use it unless it finds some other driver. It is not related to acceleration. That comes from mesa which is needed for either driver. Just delete the xf86-video-intel or move the intel_drv.so out of the way.

With tha driver I can play a 4K video with almost no CPU utilization. I have been using it since Jan sent me a link to the Intel announcement that the Intel driver was in maintenance mode with only critical fixes being made. All new functionality has been using the modesetting driver.
Comment 21 Dmitry Afanasiev 2024-09-18 08:14:00 UTC
I got this problem on 14.1-STABLE 4938f5544 which xf86-video-intel-2.99.917.923_1,1.
which ports git revision ddc37e84f1.

But I successfully built same revision of port in Aug on 14.1-STABLE b99852587

What happens? o_O
Comment 22 Curtis Villamizar 2024-09-25 22:02:55 UTC
(In reply to Dmitry Afanasiev from comment #21)

This code is now in virtual.c:

#ifndef ETIME
#define ETIME EBUSY  /* or pick something from sys/errno.h or a large number */
#endif

Probably time to close this.
Comment 23 jakub_lach 2024-12-06 23:49:02 UTC
(In reply to Curtis Villamizar from comment #22)
 
Still the same

--- intel_virtual_output-virtual.o ---
virtual.c:499:11: error: use of undeclared identifier 'ETIME'
  499 |                 return -ETIME;
      |                         ^
virtual.c:506:11: error: use of undeclared identifier 'ETIME'
  506 |                 return -ETIME;
      |                         ^
virtual.c:3008:12: error: use of undeclared identifier 'ETIME'
 3008 |                         return -ETIME;
      |                                 ^
virtual.c:3042:16: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-attributes]
 3042 | __attribute__((format(gnu_printf, 3, 4)))
      |                ^
virtual.c:3056:40: warning: format string is not a string literal [-Wformat-nonliteral]
 3056 |         len = vsnprintf(buf+4, sizeof(buf)-4, format, va)+5;
      |                                               ^~~~~~
virtual.c:3465:17: error: use of undeclared identifier 'ETIME'
 3465 |                                 if (ret != -ETIME) {
      |                                             ^
2 warnings and 4 errors generated.
*** [intel_virtual_output-virtual.o] Error code 1

make[2]: stopped in /usr/obj/usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-b74b67f0f321875492968f7097b9d6e82a66d7df/tools
--- dri3info-dri3info.o ---
mv -f .deps/dri3info-dri3info.Tpo .deps/dri3info-dri3info.Po
1 error

make[2]: stopped in /usr/obj/usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-b74b67f0f321875492968f7097b9d6e82a66d7df/tools

make[1]: stopped in /usr/obj/usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-b74b67f0f321875492968f7097b9d6e82a66d7df

make: stopped in /usr/obj/usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-b74b67f0f321875492968f7097b9d6e82a66d7df
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/x11-drivers/xf86-video-intel
Comment 24 Curtis Villamizar 2024-12-07 01:46:43 UTC
(In reply to jakub_lach from comment #23)

Oops .. yeah .. my bad!
I still had the local patch set up.  It's automated so I goofed.
Keep open.
Comment 25 Dmitry Afanasiev 2025-01-09 08:24:36 UTC
(In reply to Curtis Villamizar from comment #24)
any news? :)