Bug 4245

Summary: wayland fails to compile on Centos 5.x
Product: [Build System, Metadata & Runtime] OE-Core Reporter: chnarius <chnarius>
Component: graphicsAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.damian, meta.mr.watcher, meta.watcher, richard.purdie, ross.burton, sgw
Version: 1.4   
Target Milestone: 1.4 M6   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description chnarius 2013-04-11 08:09:27 UTC
Sevaral macros are not available on Centos 5.x which has older kernel and glibc.

-bash-3.2$ lsb_release -ri
Distributor ID:	CentOS
Release:	5.5
-bash-3.2$ uname -r
2.6.18-194.el5PAE
-bash-3.2$ /lib/libc.so.6 
GNU C Library stable release version 2.5, by Roland McGrath et al.

Log:
| wayland-1.0.6/src/wayland-shm.c: In function 'shm_pool_create_buffer':
| wayland-1.0.6/src/wayland-shm.c:134: warning: dereferencing type-punned pointer will break strict-aliasing rules
| wayland-1.0.6/src/wayland-server.c: In function 'get_socket_lock':
| wayland-1.0.6/src/wayland-server.c:1245: error: 'O_CLOEXEC' undeclared (first use in this function)
| wayland-1.0.6/src/wayland-server.c:1245: error: (Each undeclared identifier is reported only oncewayland-1.0.6/src/event-loop.c:33:26: error: sys/signalfd.h: No such file or directory
| wayland-1.0.6/src/event-loop.c:34:25: error: sys/timerfd.h: No such file or directory
| wayland-1.0.6/src/wayland-shm.c: In function 'shm_create_pool':
| wayland-1.0.6/src/wayland-shm.c:217: warning: dereferencing type-punned pointer will break strict-aliasing rules
| 
| wayland-1.0.6/src/wayland-server.c:1245: error: for each function it appears in.)
| wayland-1.0.6/src/wayland-shm.c: In function 'wl_shm_buffer_create':
| wayland-1.0.6/src/wayland-shm.c:289: warning: dereferencing type-punned pointer will break strict-aliasing rules
| wayland-1.0.6/src/wayland-shm.c: In function 'wl_buffer_is_shm':
| wayland-1.0.6/src/wayland-shm.c:304: warning: dereferencing type-punned pointer will break strict-aliasing rules
| wayland-1.0.6/src/data-device.c: In function 'wl_data_source_send_offer':
| wayland-1.0.6/src/data-device.c:105: warning: dereferencing type-punned pointer will break strict-aliasing rules
| wayland-1.0.6/src/data-device.c: In function 'create_data_source':
| wayland-1.0.6/src/data-device.c:466: warning: dereferencing type-punned pointer will break strict-aliasing rules
| make[3]: *** [wayland-server.lo] Error 1
| make[3]: *** Waiting for unfinished jobs....
| wayland-1.0.6/src/wayland-client.c: In function 'wl_display_connect_to_fd':
| wayland-1.0.6/src/wayland-client.c:529: warning: dereferencing type-punned pointer will break strict-aliasing rules
| wayland-1.0.6/src/event-loop.c: In function 'wl_event_loop_add_timer':
| wayland-1.0.6/src/event-loop.c:199: warning: implicit declaration of function 'timerfd_create'
| wayland-1.0.6/src/event-loop.c:199: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
| wayland-1.0.6/src/event-loop.c:199: error: (Each undeclared identifier is reported only once
| wayland-1.0.6/src/event-loop.c:199: error: for each function it appears in.)
| wayland-1.0.6/src/event-loop.c:199: error: 'TFD_CLOEXEC' undeclared (first use in this function)
| wayland-1.0.6/src/event-loop.c: In function 'wl_event_source_timer_update':
| wayland-1.0.6/src/event-loop.c:208: error: storage size of 'its' isn't known
| wayland-1.0.6/src/event-loop.c:214: warning: implicit declaration of function 'timerfd_settime'
| wayland-1.0.6/src/event-loop.c:208: warning: unused variable 'its'
| wayland-1.0.6/src/event-loop.c: In function 'wl_event_source_signal_dispatch':
| wayland-1.0.6/src/event-loop.c:234: error: storage size of 'signal_info' isn't known
| wayland-1.0.6/src/event-loop.c:234: warning: unused variable 'signal_info'
| wayland-1.0.6/src/event-loop.c: In function 'wl_event_loop_add_signal':
| wayland-1.0.6/src/event-loop.c:268: warning: implicit declaration of function 'signalfd'
| wayland-1.0.6/src/event-loop.c:268: error: 'SFD_CLOEXEC' undeclared (first use in this function)
| make[3]: *** [event-loop.lo] Error 1
Comment 1 chnarius 2013-04-11 08:11:52 UTC
Same issue on Centos 5.8.
Comment 2 Richard Purdie 2013-04-11 11:30:56 UTC
This is wayland-native, right? Not wayland itself for the target?
Comment 3 Ross Burton 2013-04-11 13:55:26 UTC
Presuming this is wayland-native we don't need to build all of it, just the scanner.  Changing the recipe to just build the scanner should speed the build and might fix the issue.
Comment 4 Ross Burton 2013-04-11 17:10:58 UTC
I think I've got a fix:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/wayland-native&id=350195f7c6ac5e3b9edc82f8e1f7fa0a8ba56346

Can you please test this, I don't have a centos machine to hand.
Comment 5 chnarius 2013-04-12 05:09:47 UTC
That fixes the issue. Thanks.
Comment 6 Laurentiu Palcu 2013-04-12 06:49:49 UTC
Fixed by Ross's commit. Closing.
Comment 7 Ross Burton 2013-04-12 07:41:02 UTC
This hasn't landed in master yet, reopening.