Bug 238085 - graphics/glfw doesn't build when WAYLAND option is set
Summary: graphics/glfw doesn't build when WAYLAND option is set
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Jason Helfman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-23 21:50 UTC by Grzegorz Junka
Modified: 2019-08-14 03:13 UTC (History)
5 users (show)

See Also:
neel: maintainer-feedback+


Attachments
svn-diff-glfw (1.37 KB, patch)
2019-08-03 17:47 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Junka 2019-05-23 21:50:16 UTC
It builds fine when using default options but when WAYLAND is selected instead of X11 then it fails with:

/usr/local/libexec/ccache/cc -D_GLFW_USE_CONFIG_H -Dglfw_EXPORTS -Iinclude -Isrc -I/usr/local/include/libepoll-shim -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC   -Wall -fvisibility=hidden -MD -MT src/CMakeFiles/glfw.dir/wl_init.c.o -MF src/CMakeFiles/glfw.dir/wl_init.c.o.d -o src/CMakeFiles/glfw.dir/wl_init.c.o   -c src/wl_init.c
src/wl_init.c:32:10: fatal error: 'linux/input.h' file not found
#include <linux/input.h>
         ^~~~~~~~~~~~~~~
1 error generated.
[21/135] /usr/local/libexec/ccache/cc -D_GLFW_USE_CONFIG_H -Dglfw_EXPORTS -Iinclude -Isrc -I/usr/local/include/libepoll-shim -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC   -Wall -fvisibility=hidden -MD -MT src/CMakeFiles/glfw.dir/posix_time.c.o -MF src/CMakeFiles/glfw.dir/posix_time.c.o.d -o src/CMakeFiles/glfw.dir/posix_time.c.o   -c src/posix_time.c
[22/135] /usr/local/libexec/ccache/cc -D_GLFW_USE_CONFIG_H -Dglfw_EXPORTS -Iinclude -Isrc -I/usr/local/include/libepoll-shim -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC   -Wall -fvisibility=hidden -MD -MT src/CMakeFiles/glfw.dir/wl_monitor.c.o -MF src/CMakeFiles/glfw.dir/wl_monitor.c.o.d -o src/CMakeFiles/glfw.dir/wl_monitor.c.o   -c src/wl_monitor.c
[23/135] /usr/local/libexec/ccache/cc -D_GLFW_USE_CONFIG_H -Dglfw_EXPORTS -Iinclude -Isrc -I/usr/local/include/libepoll-shim -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fPIC   -Wall -fvisibility=hidden -MD -MT src/CMakeFiles/glfw.dir/wl_window.c.o -MF src/CMakeFiles/glfw.dir/wl_window.c.o.d -o src/CMakeFiles/glfw.dir/wl_window.c.o   -c src/wl_window.c
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/glfw
=>> Cleaning up wrkdir
===>  Cleaning for glfw-3.3
build of graphics/glfw | glfw-3.3 ended at Thu May 23 19:38:26 UTC 2019
build time: 00:00:12
!!! build failure encountered !!!
Comment 1 Walter Schwarzenfeld freebsd_triage 2019-08-03 17:47:35 UTC
Created attachment 206243 [details]
svn-diff-glfw

I got it from here.

https://github.com/kovidgoyal/kitty/blob/master/glfw/wl_init.c
Comment 2 Neel Chauhan 2019-08-03 17:53:29 UTC
Sounds good to me.
Comment 3 commit-hook freebsd_committer 2019-08-13 18:08:55 UTC
A commit references this bug:

Author: jgh
Date: Tue Aug 13 18:08:40 UTC 2019
New revision: 508841
URL: https://svnweb.freebsd.org/changeset/ports/508841

Log:
  - address WAYLAND build

  PR:		238085
  Submitted by:	list1@gjunka.com
  Approved by:	neel@neelc.org (maintainer)

Changes:
  head/graphics/glfw/Makefile
  head/graphics/glfw/files/patch-src-wl_init.c
Comment 4 commit-hook freebsd_committer 2019-08-13 18:13:58 UTC
A commit references this bug:

Author: jgh
Date: Tue Aug 13 18:13:24 UTC 2019
New revision: 508842
URL: https://svnweb.freebsd.org/changeset/ports/508842

Log:
  MFH: r508841

  - address WAYLAND build

  PR:		238085
  Submitted by:	list1@gjunka.com
  Approved by:	neel@neelc.org (maintainer)

  Approved by:	ports-secteam (with hat)

Changes:
_U  branches/2019Q3/
  branches/2019Q3/graphics/glfw/Makefile
  branches/2019Q3/graphics/glfw/files/patch-src-wl_init.c
Comment 5 Jason Helfman freebsd_committer 2019-08-13 18:14:39 UTC
Thanks for your contribution! Port has been updated.
-jgh
Comment 6 Jan Beich freebsd_committer 2019-08-14 03:13:30 UTC
FWIW, according to <dev/evdev/input.h> maintainer <linux/input.h> to be used in portable software.

https://lists.freebsd.org/pipermail/freebsd-x11/2019-March/023097.html