Opened 8 years ago
Closed 8 years ago
#52155 closed defect (invalid)
libsdl @1.2.15_3 is not building universal
Reported by: | kenneth.f.cunningham@… | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | Cc: | ||
Port: | libsdl |
Description
I don't seem to be able to get libSDL to build as universal (required as i386 for another port I'm working on).
$ sudo port -v install libsdl @1.2.15_3 +universal +x11
$ otool -vh /opt/local/lib/libSDL.a Archive : /opt/local/lib/libSDL.a /opt/local/lib/libSDL.a(SDL.o): Mach header magic cputype cpusubtype caps filetype ncmds sizeofcmds flags MH_MAGIC_64 X86_64 ALL 0x00 OBJECT 4 672 SUBSECTIONS_VIA_SYMBOLS /opt/local/lib/libSDL.a(SDL_error.o):
I tried unsetting the build_arch in my macports.conf but that made no difference.
I did get libSDL to build with only i386 architecture by manually setting build_arch in macports.conf to i386
cxx_stdlib libc++ buildfromsource always delete_la_files yes default_compilers macports-clang-3.7 macports-clang-3.4 macports-clang-3.3 gcc-4.2 apple-gcc-4.2 gcc-4.0 #build_arch x86_64 build_arch i386
and building libSDL
$ sudo port -v install libsdl @1.2.15_3+x11
$ otool -vh /opt/local/lib/libSDL.a Archive : /opt/local/lib/libSDL.a /opt/local/lib/libSDL.a(SDL.o): Mach header magic cputype cpusubtype caps filetype ncmds sizeofcmds flags MH_MAGIC I386 ALL 0x00 OBJECT 4 448 SUBSECTIONS_VIA_SYMBOLS /opt/local/lib/libSDL.a(SDL_error.o):
I'm on this on a 10.6 machine, upgraded to libc++. Original attempted +universal build log attached.
Attachments (1)
Change History (7)
Changed 8 years ago by kenneth.f.cunningham@…
Attachment: | libsdl.log added |
---|
comment:1 follow-up: 2 Changed 8 years ago by jmroot (Joshua Root)
Cc: | jmr@… removed |
---|---|
Owner: | changed from macports-tickets@… to jmr@… |
Status: | new → assigned |
Try this instead:
lipo -info /opt/local/lib/libSDL.a
comment:2 Changed 8 years ago by larryv (Lawrence Velázquez)
Or this:
$ otool -arch all -hv /opt/local/lib/libSDL.a
By default, otool
only shows the slice for the host architecture—unless the file doesn’t contain it, in which case it shows all the slices.
comment:3 Changed 8 years ago by larryv (Lawrence Velázquez)
Replying to kenneth.f.cunningham@…:
I did get libSDL to build with only i386 architecture by manually setting build_arch in macports.conf to i386
cxx_stdlib libc++ buildfromsource always delete_la_files yes default_compilers macports-clang-3.7 macports-clang-3.4 macports-clang-3.3 gcc-4.2 apple-gcc-4.2 gcc-4.0 #build_arch x86_64 build_arch i386
Please don’t do this. You can set the build architecture on a per-build basis instead:
$ sudo port install whatever build_arch=i386
comment:4 Changed 8 years ago by mf2k (Frank Schima)
Port: | libsdl added; libSDL @1.2.15 removed |
---|
comment:5 Changed 8 years ago by kenneth.f.cunningham@…
Oh crap - sorry for the dumb ticket. libSDL is indeed building universal -- and why wouldn't it be, after all these years?
I thought I had figured out why my port wasn't properly linking against the i386 libSDL, but clearly it is something else causing it to fail. I'll work on that some more.
And I'll try to improve the signal to noise ratio if I can.
comment:6 Changed 8 years ago by jmroot (Joshua Root)
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
libsdl build log