[MacPorts] #52210: libsdl2 can build on 10.6, but instructions a bit vague
MacPorts
noreply at macports.org
Wed Nov 2 11:27:21 CET 2016
#52210: libsdl2 can build on 10.6, but instructions a bit vague
-------------------------------------+--------------------
Reporter: kenneth.f.cunningham@… | Owner: jmroot
Type: defect | Status: new
Priority: Low | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: libsdl2 |
-------------------------------------+--------------------
Changes (by mojca):
* cc: jeremyhu (added)
* version: 2.3.4 =>
Comment:
Jeremy asked why the port could not be built without 10.7 SDK. Here's the
very first problem one hits:
{{{
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/SDL_error.c:120:
warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/SDL_error.c:224:
warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
CC build/SDL_hints.lo
CC build/SDL_log.lo
CC build/SDL_atomic.lo
CC build/SDL_spinlock.lo
CC build/SDL_audio.lo
CC build/SDL_audiocvt.lo
CC build/SDL_audiodev.lo
CC build/SDL_audiotypecvt.lo
CC build/SDL_mixer.lo
CC build/SDL_wave.lo
CC build/SDL_cpuinfo.lo
CC build/SDL_dynapi.lo
In file included from
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/dynapi/SDL_dynapi.c:31:
include/SDL_syswm.h:230:65: error: missing binary operator before token
"("
make: *** [build/SDL_dynapi.lo] Error 1
make: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5'
Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5"
&& /usr/bin/make -w all
Exit code: 2
}}}
After blacklisting the old compiler with
{{{
compiler.blacklist *gcc* { clang < 211 }
}}}
(I took the list from Ken Cunningham, I don't know whether also the latest
gcc versions are bad.)
the following problem pops up:
{{{
CC build/SDL_cocoaevents.lo
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaevents.m:332:40:
error: use of undeclared identifier 'NSAppKitVersionNumber10_6'; did you
mean 'NSAppKitVersionNumber'?
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) {
^~~~~~~~~~~~~~~~~~~~~~~~~
NSAppKitVersionNumber
/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:21:28:
note: 'NSAppKitVersionNumber' declared here
APPKIT_EXTERN const double NSAppKitVersionNumber;
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaevents.m:445:9:
warning: implicit declaration of function
'IOPMAssertionCreateWithDescription' is invalid in C99 [-Wimplicit-
function-declaration]
IOPMAssertionCreateWithDescription(kIOPMAssertPreventUserIdleDisplaySleep,
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaevents.m:445:44:
error: use of undeclared identifier
'kIOPMAssertionTypePreventUserIdleDisplaySleep'
IOPMAssertionCreateWithDescription(kIOPMAssertPreventUserIdleDisplaySleep,
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaevents.m:33:48:
note: expanded from macro 'kIOPMAssertPreventUserIdleDisplaySleep'
#define kIOPMAssertPreventUserIdleDisplaySleep
kIOPMAssertionTypePreventUserIdleDisplaySleep
^
1 warning and 2 errors generated.
make: *** [build/SDL_cocoaevents.lo] Error 1
}}}
--
Ticket URL: <https://trac.macports.org/ticket/52210#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list