Bug 246997 - graphics/mesa-dri: configure failed without wayland
Summary: graphics/mesa-dri: configure failed without wayland
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
: 247000 247002 247006 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-05 09:52 UTC by rozhuk.im
Modified: 2020-07-11 14:38 UTC (History)
11 users (show)

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


Attachments
Specify platform based on the option (3.98 KB, patch)
2020-06-05 10:15 UTC, Emmanuel Vadot
no flags Details | Diff
Specify platform in mesa-dri and mesa-libs based on options. (1.78 KB, patch)
2020-06-05 14:48 UTC, Guido Falsi
no flags Details | Diff
Proper platform options (6.87 KB, patch)
2020-06-05 19:22 UTC, Emmanuel Vadot
no flags Details | Diff
better platform (7.20 KB, patch)
2020-06-06 08:55 UTC, Emmanuel Vadot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rozhuk.im 2020-06-05 09:52:46 UTC
I have no wayland in system and unset option in mesa port, but get:

Using 'PKG_CONFIG' from environment with value: 'pkgconf'
Found pkg-config: /usr/local/bin/pkgconf (1.6.3)
Found CMake: /usr/local/bin/cmake (3.17.3)
Build-time dependency wayland-scanner found: NO (tried pkgconfig and cmake)

meson.build:1317:2: ERROR: Dependency "wayland-scanner" not found, tried pkgconfig and cmake

A full log can be found at /tmp/ports/usr/ports/graphics/mesa-dri/work/mesa-19.0.8/_build/meson-logs/meson-log.txt
===>  Script "configure" failed unexpectedly.
Please report the problem to x11@FreeBSD.org [maintainer] and attach the
"/tmp/ports/usr/ports/graphics/mesa-dri/work/mesa-19.0.8/_build/meson-logs/meson-log.txt"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1
Comment 1 Emmanuel Vadot freebsd_committer 2020-06-05 10:04:52 UTC
I see the problem, platforms defaults to auto which contain wayland.
I'll send a patch in a few minutes.
Comment 2 Emmanuel Vadot freebsd_committer 2020-06-05 10:15:30 UTC
Created attachment 215245 [details]
Specify platform based on the option

Could you try this patch ?
Comment 3 Niclas Zeising freebsd_committer 2020-06-05 14:18:01 UTC
*** Bug 247000 has been marked as a duplicate of this bug. ***
Comment 4 Niclas Zeising freebsd_committer 2020-06-05 14:39:30 UTC
*** Bug 247002 has been marked as a duplicate of this bug. ***
Comment 5 Alexey Dokuchaev freebsd_committer 2020-06-05 14:41:32 UTC
I've patched out 'wayland' myself (essentially identical as suggested patch), but the build still fails for me on 11.3/i386:

src/util/libmesa_util.a(crc32.c.o): In function `util_hash_crc32':
crc32.c:(.text+0x19): undefined reference to `crc32'
src/util/libmesa_util.a(disk_cache.c.o): In function `cache_put':
disk_cache.c:(.text+0xef3): undefined reference to `deflateInit_'
disk_cache.c:(.text+0xf42): undefined reference to `deflate'
disk_cache.c:(.text+0xfc7): undefined reference to `deflateEnd'
disk_cache.c:(.text+0x1098): undefined reference to `deflateEnd'
src/util/libmesa_util.a(disk_cache.c.o): In function `disk_cache_get':
disk_cache.c:(.text+0x1453): undefined reference to `inflateInit_'
disk_cache.c:(.text+0x146a): undefined reference to `inflate'
disk_cache.c:(.text+0x147b): undefined reference to `inflateEnd'
Comment 6 Niclas Zeising freebsd_committer 2020-06-05 14:47:08 UTC
(In reply to Alexey Dokuchaev from comment #5)

I think you need ports r538015 as well.
Comment 7 Guido Falsi freebsd_committer 2020-06-05 14:48:36 UTC
Created attachment 215249 [details]
Specify platform in mesa-dri and mesa-libs based on options.

As I noted in bug #247000 it looks like bot mesa-dri and mesa-libs require similar patches.

I'm having success building both mesa-libs and mesa-dri with this revised patch.

The build is still running so I'll require a little time before being able to run test the resulting binaries.
Comment 8 Alexey Dokuchaev freebsd_committer 2020-06-05 15:03:29 UTC
(In reply to Niclas Zeising from comment #6)
> I think you need ports r538015 as well.
I do have it, and it looks like it's related to "ld.lld: error: undefined symbol: __atomic_load_8", not {de,in}flate* functions.
Comment 9 Emmanuel Vadot freebsd_committer 2020-06-05 15:07:14 UTC
(In reply to Alexey Dokuchaev from comment #5)

This is another issue where libz isn't added by meson.
I'm working on that.
Comment 10 Emmanuel Vadot freebsd_committer 2020-06-05 15:08:01 UTC
(In reply to Guido Falsi from comment #7)

Yeah that's what I said on #freebsd-xorg, that mesa-libs also needs this.
Will try your patch in a few and commit if that works.
Comment 11 Emmanuel Vadot freebsd_committer 2020-06-05 15:34:52 UTC
*** Bug 247006 has been marked as a duplicate of this bug. ***
Comment 12 commit-hook freebsd_committer 2020-06-05 16:19:22 UTC
A commit references this bug:

Author: manu
Date: Fri Jun  5 16:18:59 UTC 2020
New revision: 538032
URL: https://svnweb.freebsd.org/changeset/ports/538032

Log:
  mesa*: Always use LLD

  LLD is already used in 12 and 13 but we still use ld.bfd by default on 11
  and for some unknown reason some mesa libs fails to build with it since the
  meson switch.

  PR:		246997
  Approved by:	zeising (x11@ implicit)

Changes:
  head/graphics/mesa-dri/Makefile.common
Comment 13 Helge Oldach 2020-06-05 18:01:33 UTC
I am still getting the same "wayland-scanner" error. Kind of confusing - is it expected that the LLD related commit has any impact?
Comment 14 Emmanuel Vadot freebsd_committer 2020-06-05 19:22:08 UTC
Created attachment 215281 [details]
Proper platform options

Add a patch to define which platform options we want to compile
Each options are translated into -Dplatform=
Add a dependency on PLATFORM_WAYLAND to WAYLAND option.
Comment 15 Emmanuel Vadot freebsd_committer 2020-06-06 08:55:01 UTC
Created attachment 215288 [details]
better platform

Add another IMPLIES for WAYLAND.
Comment 16 Matthias Fechner freebsd_committer 2020-06-06 09:09:23 UTC
I can confirm that this patch fixed the problem:
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=215288
Comment 17 rozhuk.im 2020-06-06 16:57:47 UTC
Build and install without wayland* options - OK.
Comment 18 Guido Falsi freebsd_committer 2020-06-06 19:19:22 UTC
I confirm that I'm running fine with the latest port version with WAYLAND disabled.