Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#58767 closed defect (fixed)

libsdl2 @2.0.10 build failure on 10.11

Reported by: dyne2meter Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: elcapitan Cc:
Port: libsdl2

Description

libsdl2 fails build on mac os 10.11.6 with the following

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.10/src/video/cocoa/SDL_cocoawindow.m:1119:52: error: use of undeclared identifier 'NSEventSubtypeMouseEvent'
:info:build     const BOOL istrackpad = ([theEvent subtype] == NSEventSubtypeMouseEvent);
:info:build                                                    ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.10/src/video/cocoa/SDL_cocoawindow.m:1164:52: error: use of undeclared identifier 'NSEventSubtypeMouseEvent'
:info:build     const BOOL istrackpad = ([theEvent subtype] == NSEventSubtypeMouseEvent);
:info:build                                                    ^
:info:build 2 errors generated.
:info:build make: *** [build/SDL_cocoawindow.lo] Error 1
:info:build make: *** Waiting for unfinished jobs....
:info:build libtool: compile:  /usr/bin/clang -pipe -Os -arch x86_64 -I/opt/local/include -DUSING_GENERATED_CONFIG_H -Iinclude -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.10/include -idirafter /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.10/src/video/khronos -mmmx -m3dnow -msse -msse2 -msse3 -Wall -fno-strict-aliasing -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -D_THREAD_SAFE -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.10/src/hidapi/hidapi -MMD -MT build/SDL_render_metal.lo -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.10/src/render/metal/SDL_render_metal.m -o build/SDL_render_metal.o >/dev/null 2>&1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.10'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.10" && /usr/bin/make -j2 -w all V=1 
:info:build Exit code: 2
:error:build Failed to build libsdl2: command execution failed
:debug:build Error code: CHILDSTATUS 32064 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2/libsdl2/main.log for details.

This looks like a Cocoa class introduced only in systems subsequent to El Capitan. If there isn't a way to fix this for legacy systems, they are going to lose ffmpeg, and then, audacity.

Attachments (2)

main.log.tar.gz (11.6 KB) - added by dyne2meter 5 years ago.
main.log
10.11-fix.patch (558 bytes) - added by jmroot (Joshua Root) 5 years ago.

Download all attachments as: .zip

Change History (12)

Changed 5 years ago by dyne2meter

Attachment: main.log.tar.gz added

main.log

comment:1 Changed 5 years ago by kencu (Ken)

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Cc: jmr@… removed
Owner: set to jmroot
Status: newassigned

comment:3 Changed 5 years ago by kencu (Ken)

seems like it built on every system except 10.11 <https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/90789/steps/install-port/logs/stdio>.

I would imagine this patch <http://hg.libsdl.org/SDL/rev/75dad4c8914e> needs to be tweaked to include 10.11 based on this.

comment:4 Changed 5 years ago by jmroot (Joshua Root)

According to Apple docs, NSEventSubtypeMouseEvent is indeed only available in 10.12+. But NSEventSubtypeTouch is in 10.6+, so that part seems wrong.

comment:5 Changed 5 years ago by kencu (Ken)

As is, builds on 10.6 up except 10.11.

Changed 5 years ago by jmroot (Joshua Root)

Attachment: 10.11-fix.patch added

comment:6 Changed 5 years ago by jmroot (Joshua Root)

Try that patch.

comment:7 Changed 5 years ago by jmroot (Joshua Root)

Keywords: elcapitan added
Summary: libsdl2 build failurelibsdl2 @2.0.10 build failure on 10.11

comment:8 Changed 5 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In 3bf6cab2eab7cc87e9997ada25881502a11463cd/macports-ports (master):

libsdl2: build fix for 10.11

Fixes: #58767

comment:9 Changed 5 years ago by kencu (Ken)

Yeah, that fixed it. We do such good service for upstream!

comment:10 Changed 5 years ago by dyne2meter

@kencu: Now I look "relaxed" too. ;D

Last edited 5 years ago by dyne2meter (previous) (diff)
Note: See TracTickets for help on using tickets.