Opened 3 years ago
Last modified 8 months ago
#64655 assigned defect
libsdl2: find some version to use for Tiger and Leopard
Reported by: | barracuda156 | Owned by: | barracuda156 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | powerpc leopard | Cc: | paulpall (Paul Johannes Aru), mascguy (Christopher Nielsen) |
Port: | libsdl2 |
Description
The current version of libsdl2
fails for ppc, therefore I tried to install an early version which does not seem to have any arch restriction. However it fails, complaining of SDK:
libtool: compile: /usr/bin/gcc-4.2 -pipe -Os -arch ppc -I/opt/local/include -DUSING_GENERATED_CONFIG_H -Iinclude -I/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.0/include -maltivec -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -falign-loops=16 -force_cpusubtype_ALL -fpascal-strings -Wall -MMD -MT build/SDL_log.lo -c /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.0/src/SDL_log.c -fno-common -DPIC -o build/.libs/SDL_log.o In file included from include/SDL_config.h:33, from /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.0/src/SDL_assert.c:21: include/SDL_platform.h:90:3: error: #error SDL for Mac OS X must be built with a 10.6 SDK or above. In file included from include/SDL_config.h:33, from /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.0/src/SDL_error.c:21: include/SDL_platform.h:90:3: error: #error SDL for Mac OS X must be built with a 10.6 SDK or above. In file included from include/SDL_config.h:33, from /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.0/src/SDL_hints.c:21: include/SDL_platform.h:90:3: error: #error SDL for Mac OS X must be built with a 10.6 SDK or above. In file included from include/SDL_config.h:33, from /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.0/src/SDL_log.c:21: include/SDL_platform.h:90:3: error: #error SDL for Mac OS X must be built with a 10.6 SDK or above. make: *** [build/SDL_error.lo] Error 1 make: *** Waiting for unfinished jobs.... make: *** [build/SDL_hints.lo] Error 1 make: *** [build/SDL_log.lo] Error 1 make: *** [build/SDL_assert.lo] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.0' Command failed: cd "/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.0" && /usr/bin/make -j4 -w all Exit code: 2 Error: Failed to build libsdl2: command execution failed
Since ppc is supported in 10.6 SDK, it still might build, but how to point the port to the SDK? Apparently it does not look into /Developer. (I have pulled a 10.6 SDK from an installation of 10A190 just to try quickly and the error output did not change. I will try in 10.6.8 Rosetta later.)
Attachments (4)
Change History (41)
Changed 3 years ago by barracuda156
Attachment: | config.log added |
---|
Changed 3 years ago by barracuda156
comment:2 Changed 3 years ago by barracuda156
Summary: | libsdl2 @2.0.0 fails to build on 10.5.8: #error SDL for Mac OS X must be built with a 10.6 SDK or above → libsdl2 @2.0.0 fails to build on 10.5.8: expected expression before 'int' etc errors |
---|
Changed 3 years ago by barracuda156
Attachment: | config_10.6.SDK.log added |
---|
Changed 3 years ago by barracuda156
Attachment: | main.10.6.SDK.log added |
---|
comment:3 follow-ups: 4 11 Changed 3 years ago by kencu (Ken)
use the one from leopardports that everyone has been using for five years now.
If you didn’t grab it I can stick it here for you.
I shut leopardports and tigerports etc down at chris’ request.
comment:4 Changed 3 years ago by barracuda156
Replying to kencu:
use the one from leopardports that everyone has been using for five years now. If you didn’t grab it I can stick it here for you. I shut leopardports and tigerports etc down at chris’ request.
Thank you, I will try it then. I am not sure I have the latest copy of your port repos, but I do have some.
- S. By the way, if it is not something private, what was the reason behind the request? I don't ask this out of sheer curiosity, but rather in a context of having considered making such repo at a later date. If it violates some Macports policies, of course I just won't do it in the first place.
comment:5 follow-up: 9 Changed 3 years ago by kencu (Ken)
caused confusion and wacky tickets.
I never wanted a rogue repo anyway… it was originally envisioned as an official MacPorts overlay for older systems to use, but it was never accepted and then actively discouraged, eventually.
comment:6 follow-up: 10 Changed 3 years ago by evanmiller (Evan Miller)
I keep an unauthorized clone of Ken's work here: https://github.com/evanmiller/TigerPorts/
I've deleted all of the Portfiles whose fixes were integrated upstream. That leaves only about 20 ports, including the libsdl2 family. (Should be able to knock out a couple more when another legacysupport release happens...)
comment:7 Changed 3 years ago by kencu (Ken)
Summary: | libsdl2 @2.0.0 fails to build on 10.5.8: expected expression before 'int' etc errors → libsdl2: find some version to use for Tiger and Leopard someday |
---|
comment:8 Changed 3 years ago by kencu (Ken)
Summary: | libsdl2: find some version to use for Tiger and Leopard someday → libsdl2: find some version to use for Tiger and Leopard |
---|
comment:9 Changed 3 years ago by barracuda156
Replying to kencu:
caused confusion and wacky tickets.
I never wanted a rogue repo anyway… it was originally envisioned as an official MacPorts overlay for older systems to use, but it was never accepted and then actively discouraged, eventually.
Got it. Quite unfortunate IMO, it appears to be a good idea to have targeted repos for old systems, given that a number of modern versions of ports just don't build.
Your Leopard version of libsdl2
installed nicely:
36-47:~ svacchanda$ port -v installed libsdl2 The following ports are currently installed: libsdl2 @2.0.3_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2022-02-14T19:15:22+0800'
comment:10 Changed 3 years ago by barracuda156
Replying to evanmiller:
I keep an unauthorized clone of Ken's work here: https://github.com/evanmiller/TigerPorts/
I've deleted all of the Portfiles whose fixes were integrated upstream. That leaves only about 20 ports, including the libsdl2 family. (Should be able to knock out a couple more when another legacysupport release happens...)
Thank you. Saved a local copy for later use, it may be helpful, as I got a machine with Tiger now too.
comment:11 Changed 3 years ago by barracuda156
Replying to kencu:
use the one from leopardports that everyone has been using for five years now.
I have managed to build libsdl2
v. 2.0.9.
Sergey-Fedorovs-Mac-mini:~ svacchanda$ port -v installed libsdl2 The following ports are currently installed: libsdl2 @2.0.3_0 requested_variants='' platform='darwin 10' archs='ppc' date='2022-02-26T03:41:25+0800' libsdl2 @2.0.9_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-03-01T23:11:25+0800'
So far tested on 10.6 PPC and 10.6.8 Rosetta, but I am sure 10.5.8 gonna build too.
The patch is ugly though and needs work. With one file, cocoamodes
, I gave up tweaking it and for now pulled it from 2.0.3. I should be possible to fix the original one for PPC though.
Pretty much all troubles were with Cocoa Video components, and it is far worse than it was with 2.0.3.
I have one technical question: is there a way to force Cmake build system accept compiler.c_standard
and custom Object C flags?
There are two systemic problems with libsdl2
which I could not solve in any reasonably nice way:
1) ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
– I had to manually delete -Werror-after-statement flag in configure to get away and make these warnings and not errors. Setting C standard in port file or command line had no effect.
2) There is some Objective C exception used in cocoaopengl
which makes the build fail. Solution should be as easy as passing '-fobjc-exceptions'
flag, however neither setting configure.objc_flags-append
in port file nor writing EXTRA_OBJCFLAGS
in configure has any effect. I had to stick the flag along other CFLAGS, and of course everything complains about that (but builds).
UPD. Just now found something potentially promising: https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/cmake-1.1.tcl Though it still mentions that Cmake may ignore Objective C flags.
comment:12 follow-up: 13 Changed 3 years ago by barracuda156
- S. Wonder if
libsdl2
actually works though LOL. I honestly picked a random helloworld from here: https://gist.github.com/cicanci/b54715298ab55dff2fbcd0ca3829d13b
And neither of the two versions produced meaningful output on 10.6.8.
Here is what I got with my 2.0.9:
Sergey-Fedorovs-Mac-mini:Documents svacchanda$ /opt/svacchanda/gcc10ppc/bin/g++ /Users/svacchanda/Documents/test.cpp -I/opt/local/include/SDL2 -L/opt/local/lib -lSDL2 -o test Sergey-Fedorovs-Mac-mini:Documents svacchanda$ /Users/svacchanda/Documents/test 2022-03-02 02:07:01.292 test[38833:903] *** __NSAutoreleaseNoPool(): Object 0x1944e20 of class NSView autoreleased with no pool in place - just leaking 2022-03-02 02:07:01.336 test[38833:903] *** __NSAutoreleaseNoPool(): Object 0x1945080 of class NSCFArray autoreleased with no pool in place - just leaking 2022-03-02 02:07:01.340 test[38833:903] *** __NSAutoreleaseNoPool(): Object 0x19459f0 of class NSCFArray autoreleased with no pool in place - just leaking 2022-03-02 02:07:01.977 test[38833:903] INFO: SDL_LoadBMP Error: Couldn't open image.bmp
Then I reverted to the old @kencu's 2.0.3:
Sergey-Fedorovs-Mac-mini:Documents svacchanda$ /opt/svacchanda/gcc10ppc/bin/g++ /Users/svacchanda/Documents/test.cpp -I/opt/local/include/SDL2 -L/opt/local/lib -lSDL2 -o test2 Sergey-Fedorovs-Mac-mini:Documents svacchanda$ /Users/svacchanda/Documents/test2 2022-03-02 02:09:36.649 test2[38865:903] INFO: SDL_Init Error: The video driver did not add any displays
They fail differently, but both fail.
- S. At the same time I am not sure how this at all is supposed to work via Rosetta, so will repeat on the Quad later.
comment:13 follow-up: 16 Changed 3 years ago by kencu (Ken)
Replying to barracuda156:
> 2022-03-02 02:07:01.977 test[38833:903] INFO: SDL_LoadBMP Error: Couldn't open image.bmp
Yes, looks like it can't load (? can't find) image.bmp. Perhaps that example won't work on any system without it?
Try building one of the dozens of ports that use libsdl2 instead. Pretty much all the ones I ever tried work quite well on 10.6.8.
comment:14 follow-up: 15 Changed 3 years ago by kencu (Ken)
don't be misled by this:
*** __NSAutoreleaseNoPool(): Object 0x1945080 of class NSCFArray autoreleased with no pool in place - just leaking
this is not the error. It is something else, that could be fixed on SnowLeopard by adding the @autoreleasepool bits manually to the example code. Newer OS versions do some of those things automatically for you, but on SL you have to do it the old way still.
I have patched various ports here and there for that. The last one that comes to mind was glib2 that I fixed up for older systems when I moved it to meson last year.
But that is just a warning, not an error -- the error is there is no image.bmp to be loaded by the example, it seems.
comment:15 Changed 3 years ago by barracuda156
Replying to kencu:
don't be misled by this:
*** __NSAutoreleaseNoPool(): Object 0x1945080 of class NSCFArray autoreleased with no pool in place - just leakingthis is not the error. It is something else, that could be fixed on SnowLeopard by adding the @autoreleasepool bits manually to the example code. Newer OS versions do some of those things automatically for you, but on SL you have to do it the old way still.
I have patched various ports here and there for that. The last one that comes to mind was glib2 that I fixed up for older systems when I moved it to meson last year.
But that is just a warning, not an error -- the error is there is no image.bmp to be loaded by the example, it seems.
@autoreleasepool syntax was massively failing for me, I had to refactor numerous instances of this and return them to the form which PPC is happy with. So adding that won't work (for PPC), but the warning may be a result of me messing up something in the process: it was not always immediately obvious where to stick [pool release];
. I mean, I can identify structure and follow its logic, but I don’t know anything about Objective C. Another problem was that some functions apparently are missing in SDK itself, so I had to resort to your trick #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
(using 1070 due to 10A190).
The whole thing took me almost 24 hrs (well, I was doing other stuff in parallel, but anyway).
At the same time outside of Cocoa Video folder few changes had to be made. Mostly refactoring of @autoreleasepool.
I have also noticed they removed some elements of PowerPC-relevant code (though not all of it). When I have time I will search source folder with BBEdit to make sure I restore all portions of PPC code that were present in 2.0.3 but got removed later.
comment:16 follow-up: 18 Changed 3 years ago by barracuda156
Replying to kencu:
Replying to barracuda156:
> 2022-03-02 02:07:01.977 test[38833:903] INFO: SDL_LoadBMP Error: Couldn't open image.bmpYes, looks like it can't load (? can't find) image.bmp. Perhaps that example won't work on any system without it?
Thank you. Indeed, it tried to actually open a window (which immediately closed). With 2.0.3 I got just an error straightaway.
Try building one of the dozens of ports that use libsdl2 instead. Pretty much all the ones I ever tried work quite well on 10.6.8.
Yes, I always try to build dependencies when I build a port without being sure it has been built correctly. Building smpeg2
worked for instance.
Strangely, on 10A190 ffmpeg
complained about version after I upgraded libsdl2
from 2.0.3 to 2.0.9. Didn't have time to rebuild it yet or figure out what it got upset about. As I recall, with an earlier 2.0.3 it silently used it to build itself. (Cannot test ffmpeg
on 10.6.8 since x265
remains broken, and Cmake/meson build system is a nightmare: simple things that take 2 min to fix with gcc + gnumake, become nontrivial problems with the former.)
comment:17 Changed 3 years ago by kencu (Ken)
look here at this patch for an idea how I handled it in glib2:
comment:18 follow-ups: 19 23 Changed 3 years ago by kencu (Ken)
Replying to barracuda156:
Thank you. Indeed, it tried to actually open a window (which immediately closed).
what I'm trying to say is there is nothing wrong with libsdl2.
you just have to go get an image.bmp and it will work fine.
comment:19 Changed 3 years ago by barracuda156
Replying to kencu:
Replying to barracuda156:
Thank you. Indeed, it tried to actually open a window (which immediately closed).
what I'm trying to say is there is nothing wrong with libsdl2.
I have rebuilt ffmpeg
now, that worked:
36-227:~ svacchanda$ port -v installed ffmpeg The following ports are currently installed: ffmpeg @4.4.1_1+gpl2 requested_variants='+gpl2' platform='darwin 10' archs='ppc' date='2022-02-15T18:07:25+0800' ffmpeg @4.4.1_1+gpl2+gpl3+nonfree (active) requested_variants='+gpl2+gpl3+nonfree' platform='darwin 10' archs='ppc' date='2022-03-02T22:47:45+0800'
Here is what it complained about libsdl2
:
---> Scanning binaries for linking errors Incompatible library version: /opt/local/bin/ffmpeg requires version 3.0.0 or later, but /opt/local/lib/libSDL2-2.0.0.dylib provides version 1.0.0 Incompatible library version: /opt/local/bin/ffplay requires version 3.0.0 or later, but /opt/local/lib/libSDL2-2.0.0.dylib provides version 1.0.0 Incompatible library version: /opt/local/bin/ffprobe requires version 3.0.0 or later, but /opt/local/lib/libSDL2-2.0.0.dylib provides version 1.0.0 Incompatible library version: /opt/local/lib/libavdevice.58.13.100.dylib requires version 3.0.0 or later, but /opt/local/lib/libSDL2-2.0.0.dylib provides version 1.0.0 ---> Found 4 broken files, matching files to ports ---> Found 1 broken port, determining rebuild order You can always run 'port rev-upgrade' again to fix errors. The following ports will be rebuilt: ffmpeg @4.4.1+gpl2+gpl3+nonfree
Configuration of the build (as before):
---> Configuring ffmpeg Executing: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_ffmpeg/ffmpeg/work/ffmpeg-4.4.1" && ./configure --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --disable-libzvbi --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-zlib --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-indev=jack --disable-opencl --disable-outdev=xv --disable-audiotoolbox --disable-videotoolbox --enable-sdl2 --disable-securetransport --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/gcc-mp-7 --enable-libzimg --disable-filter=coreimage --disable-filter=coreimagesrc --enable-libdav1d --disable-indev=avfoundation --arch=ppc --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-version3 --enable-libsmbclient --enable-nonfree --enable-libfdk-aac
comment:20 Changed 3 years ago by barracuda156
- S. I could even rebuild
libsdl2
with+x11
and then rebuildffmpeg
with+x11
too:
36-227:~ svacchanda$ port -v installed libsdl2 The following ports are currently installed: libsdl2 @2.0.3_0 requested_variants='' platform='darwin 10' archs='ppc' date='2022-02-14T20:01:16+0800' libsdl2 @2.0.9_0 requested_variants='' platform='darwin 10' archs='ppc' date='2022-03-01T21:12:57+0800' libsdl2 @2.0.9_0+x11 (active) requested_variants='+x11' platform='darwin 10' archs='ppc' date='2022-03-02T23:17:54+0800' 36-227:~ svacchanda$ port -v installed ffmpeg The following ports are currently installed: ffmpeg @4.4.1_1+gpl2 requested_variants='+gpl2' platform='darwin 10' archs='ppc' date='2022-02-15T18:07:25+0800' ffmpeg @4.4.1_1+gpl2+gpl3+nonfree requested_variants='+gpl2+gpl3+nonfree' platform='darwin 10' archs='ppc' date='2022-03-02T22:47:45+0800' ffmpeg @4.4.1_1+gpl2+gpl3+nonfree+x11 (active) requested_variants='+gpl2+gpl3+nonfree+x11' platform='darwin 10' archs='ppc' date='2022-03-03T00:27:18+0800'
Here is the config:
---> Configuring ffmpeg Executing: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_ffmpeg/ffmpeg/work/ffmpeg-4.4.1" && ./configure --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-libzvbi --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-zlib --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-indev=jack --disable-opencl --disable-outdev=xv --disable-audiotoolbox --disable-videotoolbox --enable-sdl2 --disable-securetransport --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/gcc-mp-7 --enable-libzimg --disable-filter=coreimage --disable-filter=coreimagesrc --enable-libdav1d --disable-indev=avfoundation --arch=ppc --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-version3 --enable-libsmbclient --enable-nonfree --enable-libfdk-aac
(I fixed building zvbi
on 10A190: it just needed --without-doxygen
added to skip html documentation which was causing a failure.)
comment:21 follow-ups: 22 24 Changed 3 years ago by kencu (Ken)
I am having trouble following this, but -- it seems you have a mixture of things happening due to different versions of software being installed and uninstalled and the other things reinstalled and then uninstalled and then things being built against one version of something but that something is then uninstalled and a different version of that something is installed but the thing is not rebuilt against the different version and thinks the old version is still installed and ...
dies.
Or something like that.
comment:22 Changed 3 years ago by barracuda156
Replying to kencu:
I am having trouble following this, but -- it seems you have a mixture of things happening due to different versions of software being installed and uninstalled and the other things reinstalled and then uninstalled and then things being built against one version of something but that something is then uninstalled and a different version of that something is installed but the thing is not rebuilt against the different version and thinks the old version is still installed and ...
dies.
Or something like that.
Oh, leave it, the only important part is that we got libsdl2
@2.0.9 built for PowerPC and ffmpeg
can be built with this libsdl2
being enabled. (Rest are details which I mention only in case someone has interest.)
- S. Once I verify it on 10.5.8, I will probably make a separate ticket to make some changes to
ffmpeg
port file.
comment:23 Changed 3 years ago by barracuda156
Replying to kencu:
what I'm trying to say is there is nothing wrong with libsdl2.
Unfortunately on Leopard I could not replicate what worked on 10A190 and 10.6.8:
In file included from /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.9/src/video/cocoa/SDL_cocoaevents.m:26:0: /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.9/src/video/cocoa/SDL_cocoavideo.h:61:14: error: unknown type name 'NSEventMask' static const NSEventMask NSEventMaskAny = NSAnyEventMask; ^~~~~~~~~~~ In file included from /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.9/src/video/cocoa/SDL_cocoaclipboard.m:25:0: /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.9/src/video/cocoa/SDL_cocoavideo.h:61:14: error: unknown type name 'NSEventMask' static const NSEventMask NSEventMaskAny = NSAnyEventMask; ^~~~~~~~~~~ /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.9/src/video/cocoa/SDL_cocoaclipboard.m: In function 'GetTextFormat': /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.9/src/video/cocoa/SDL_cocoaclipboard.m:31:20: warning: unused variable 'data' [-Wunused-variable] SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; ^~~~ /opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.9/src/video/cocoa/SDL_cocoaevents.m:125:1: error: cannot find protocol declaration for 'NSApplicationDelegate' @interface SDLAppDelegate : NSObject <NSApplicationDelegate> { ^
comment:24 Changed 3 years ago by barracuda156
Replying to kencu:
I started working on the latest libsdl2
– to move in to Cmake build system and fix for PPC, but ran into this: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522
Need to wait until Iain fixes gcc
:)
comment:25 Changed 2 years ago by paulpall (Paul Johannes Aru)
Cc: | paulpall added |
---|
comment:26 Changed 2 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|---|
Keywords: | snowleopard lion added |
Owner: | set to jmroot |
Status: | new → assigned |
Version: | 2.7.1 → 2.7.2 |
The latest update breaks 10.6 and 10.7 as well.
For 10.7, compilation fails with:
libsdl2/work/SDL2-2.24.0/src/video/cocoa/SDL_cocoaevents.m:348:46: error: no visible @interface for 'NSBundle' declares the selector 'loadNibNamed:owner:topLevelObjects:' success = [[NSBundle mainBundle] loadNibNamed:mainNibFileName owner:[NSApplication sharedApplication] topLevelObjects:nil]; ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
While the headers now disallow building on 10.6 and earlier:
include/SDL_platform.h:112:3: error: SDL for Mac OS X only supports deploying on 10.7 and above. # error SDL for Mac OS X only supports deploying on 10.7 and above. ^
comment:27 Changed 2 years ago by mascguy (Christopher Nielsen)
Summary: | libsdl2: find some version to use for Tiger and Leopard → libsdl2: builds fail for 10.7 and earlier |
---|
comment:28 follow-ups: 29 31 Changed 2 years ago by kencu (Ken)
reverting the change that broke 10.6 is easy...
https://github.com/libsdl-org/SDL/commit/d35c737f1c8ba4d28c3d45c557961b3ddce9bef0
what is not so easy is that everywhere in SDL now, they will no longer take steps to maintain 10.6 support ... so this will degrade over time, possibly quite quickly.
might have to peg 10.6 at 2.22.0 which we have on the packages server. And that is not too bad -- should be good for a few years, at least.
And maybe some SnowLeopard lover will come along to maintain it for a while with workarounds like we did with 10.4 and 10.5, who knows...
comment:29 Changed 2 years ago by jmroot (Joshua Root)
Replying to kencu:
reverting the change that broke 10.6 is easy...
https://github.com/libsdl-org/SDL/commit/d35c737f1c8ba4d28c3d45c557961b3ddce9bef0
That was just documenting the breakage that already happened when they got rid of the code paths supporting non-ARC builds.
comment:30 Changed 2 years ago by jmroot (Joshua Root)
Keywords: | snowleopard lion removed |
---|---|
Owner: | jmroot deleted |
Summary: | libsdl2: builds fail for 10.7 and earlier → libsdl2: find some version to use for Tiger and Leopard |
I'm not going to work on Leopard support, and also the relevant ticket for Snow Leopard is #52210.
comment:31 Changed 2 years ago by barracuda156
Replying to kencu:
And maybe some SnowLeopard lover will come along to maintain it for a while with workarounds like we did with 10.4 and 10.5, who knows...
Well, if I manage to fix it for PPC…
Not really high on priority list of what to fix, but I will return to it in a while.
comment:32 Changed 2 years ago by mascguy (Christopher Nielsen)
Owner: | set to barracuda156 |
---|
comment:33 follow-up: 34 Changed 8 months ago by rmottola (Riccardo)
I that on 10.5 today: interstingly I got a big jump:
libsdl2 2.0.3_0 < 2.30.0_0
and 2.30 moans with:
leopard ---> Fetching distfiles for libsdl2-snowleopard Error: Failed to fetch libsdl2-snowleopard: Building libsdl2-snowleopard @2.0.22 on Mac OS X 10.6 requires the MacOSX10.7.sdk to be present in /Developer/SDKs/ Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2-snowleopard/libsdl2-snowleopard/main.log for details.
But I am on Leopard . I wonder if the error is bogus, since 2.0.22 did build without 10.7 SDK, right? or do we need... libsdl2-leopard ??
comment:34 Changed 8 months ago by barracuda156
Replying to rmottola:
I that on 10.5 today: interstingly I got a big jump:
libsdl2 2.0.3_0 < 2.30.0_0and 2.30 moans with:
leopard ---> Fetching distfiles for libsdl2-snowleopard Error: Failed to fetch libsdl2-snowleopard: Building libsdl2-snowleopard @2.0.22 on Mac OS X 10.6 requires the MacOSX10.7.sdk to be present in /Developer/SDKs/ Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl2-snowleopard/libsdl2-snowleopard/main.log for details.But I am on Leopard . I wonder if the error is bogus, since 2.0.22 did build without 10.7 SDK, right? or do we need... libsdl2-leopard ??
I am not particularly sure what is going on with 10.5 on x86. I am also not sure that it is a great idea to use 10.7 SDK on 10.6, forget 10.5.
libsdl2 can be built with a native SDK with X11 backend, but it needs some fixes. May not yet work on PPC as-is, but perhaps on x86 should. Once I make sure it works, I will make a port for it.
comment:35 Changed 8 months ago by kencu (Ken)
Using the 10.7 SDK on 10.6 has worked perfectly for years now -- SDL is written to do that, in the proper Apple way.
However, they recently decided to drop support for 10.6, as they would inevitably do, and move the bar up. So we pegged libsdl2 at the last version for 10.6 that looked solid.
Newer versions of SDL than the one we pegged for 10.6 already are highly unlikely to work properly, even if they miraculously build, because support was dropped and all the fallbacks and workarounds were being removed.
You had postulated that perhaps a newer libsdl2 could be made to work properly on older systems by going through X11 and ignoring the Apple SDK limitations by not using the Apple APIs. This could possibly work -- last I heard, you were testing it to see if it did or did not actually function, as there is no point committing non-functional garbage into MacPorts port tree.
comment:36 Changed 8 months ago by kencu (Ken)
For 10.4 and 10.5, we had pegged the last versions of SDL for those systems that we could make work reasonably well. They were getting pretty old though, and not much current software was restricting itself to the API those old versions of SDL provided.
For those systems, either a lot of holdbacks on software were going to be needed, or perhaps the X11 miracle might be shown to work and give them new life.
(OTOH, I heard you say X11 is completely nonfunctional for you on 10.5 now, so --- no idea about that, but if so, that is pretty bad news for 10.5 and less.).
comment:37 Changed 8 months ago by barracuda156
This will likely work on 10.5.8 ppc: https://ports.macports.org/port/libsdl2-powerpc
Please let me know if it does not build, it will be addressed.
Joystick module is disabled at the moment, so games and emulators are likely not to run. Video output via SDL is confirmed to work, however. Anything not relying on joystick is likely to work too.
Ok so I installed a vanilla 10.6 SDK from Xcode 3.2.6 (that is, a standard 10.6 SDK), added these lines to
macports.conf
:Which made the compiler find correct SDK, however the build still failed:
Any suggestions how to fix that? Since port file contains no restriction, apparently it was building for Leopard.