Bug 251163 - graphics/drm-fbsd12.0-kmod fails to build on FreeBSD-stable
Summary: graphics/drm-fbsd12.0-kmod fails to build on FreeBSD-stable
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hans Petter Selasky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-15 17:38 UTC by gja822
Modified: 2020-11-17 05:44 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gja822 2020-11-15 17:38:53 UTC
I'm on FreeBSD 12.2-PRERELEASE r364926 amd64 now.
Lately graphics/drm-fbsd12.0-kmod stopped to build with errors like this:

--- ttm_agp_backend.o ---
In file included from /usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/ttm/ttm_agp_backend.c:35:
In file included from /usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/include/drm/ttm/ttm_bo_driver.h:37:
In file included from /usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/include/drm/drmP.h:139:
/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-99da0ba/drivers/gpu/drm/drm_os_freebsd.h:124:9: error: 'IS_ALIGNED' macro redefined [-Werror,-Wmacro-redefined]
#define IS_ALIGNED(x, y)        (((x) & ((y) - 1)) == 0)
        ^
/usr/src/sys/compat/linuxkpi/common/include/linux/kernel.h:138:9: note: previous definition is here
Comment 1 Tatsuki Makino 2020-11-16 06:03:46 UTC
r367566 | hselasky | 2020-11-10 22:36:07 +0900 (Tue, 10 Nov 2020) | 6 lines
Changed paths:
   M /stable/12
   M /stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h

MFC r366751:
Remove ifdefs around IS_ALIGNED() definition in the LinuxKPI.
Comment 2 Niclas Zeising freebsd_committer freebsd_triage 2020-11-16 08:57:32 UTC
I've asked hselasky to have a look at this.
Comment 3 Hans Petter Selasky freebsd_committer freebsd_triage 2020-11-16 09:13:07 UTC
Can this be fixed in the port? We need IS_ALIGNED() in 12-stable for coming mlx5en and mlx5ib patches.

--HPS
Comment 4 Hans Petter Selasky freebsd_committer freebsd_triage 2020-11-16 09:22:42 UTC
I'll fix it.
Comment 5 Niclas Zeising freebsd_committer freebsd_triage 2020-11-16 09:38:13 UTC
It can be done in the port, it's OK.  Just make sure it still compiles on 12.1 and 12.2 as well.
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-11-16 09:39:41 UTC
A commit references this bug:

Author: hselasky
Date: Mon Nov 16 09:39:00 UTC 2020
New revision: 555459
URL: https://svnweb.freebsd.org/changeset/ports/555459

Log:
  Buildfix for 12-stable after r367566.

  PR:		251163
  Approved by:	pi (implicit)

Changes:
  head/graphics/drm-fbsd12.0-kmod/Makefile
  head/graphics/drm-fbsd12.0-kmod/distinfo
Comment 7 Tatsuki Makino 2020-11-17 05:44:10 UTC
(In reply to commit-hook from comment #6)

Mere reporting, the build and installation of stable/12@r367732 with PORTS_MODULES=graphics/drm-fbsd12.0-kmod ended in success.
At least I have solved it. Thank you very much.