Opened 11 years ago

Closed 11 years ago

#20235 closed defect (fixed)

libsdl does not build 64-bit

Reported by: hussein@… Owned by: nox@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: LP64 Cc: tobypeterson, huahang.liu@…, lstoll@…, sam@…, benjaminkreeger@…, epichub (Bjørn Magnus Mathisen), geoff@…, allencmcbride@…, aselder@…, pkutzner+macports@…, kenny@…, fletch@…, skymoo (Adam Mercer), phil@…, michael@…, macports@…, aecollins1@…, richard.allen.smith.jr@…, ed@…, ejeklint@…, macports.org@…, tomjmalone@…, macports@…, tumdum@…, kurtjaeke@…, hansondr@…, scott@…, elias-macports@…, kirdatt.jai@…, lhunath@…, trevorturk@…, macports@…, gohanlon@…, joemisra@…, domiman@…, arnaud.demouhy@…, gtaylor@…, tommccullough-tenica, ricsmo@…, jicheu@…, takeshi@…, ksaito11+macport@…, jdswinbank (John Swinbank), sam.receive@…, desfania@…, anfalas@…, jungwook.shin@…, captainproton1971 (Captain Proton), jason@…, ruud@…, julian@…, andrzej.sliwa@…, deti@…, nicos_pavlov@…, arturoc@…, macports@…, xgutter@…, jonathan@…, kennybongort@…, mattjamieson@…, jpenney (Jason Penney), al.sutton@…, jan.hosang@…, nikdog@…, jeremykarlson@…, hahn.seb@…, faisal.moledina@…, ih-mon@…, whcordis@…, godisgovernment@…, software@…, nicholas.robinson@…, taqticus@…, ryandesign (Ryan Schmidt)
Port: libsdl

Description (last modified by mf2k (Frank Schima))

Building libsdl
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_devel_libsdl/work/SDL-1.2.13" && /usr/bin/make -j1 all " returned error 2
Command output: ./src/video/quartz/SDL_QuartzEvents.m: In function 'QZ_PumpEvents':
./src/video/quartz/SDL_QuartzEvents.m:722: warning: 'CGMouseDelta' is deprecated
./src/video/quartz/SDL_QuartzEvents.m:722: warning: 'CGMouseDelta' is deprecated
./src/video/quartz/SDL_QuartzEvents.m:787: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'

Attachments (1)

macports-libsdl-1.2.13-10.6.patch (60.7 KB) - added by kenny@… 11 years ago.
Patch that contains backport of enough of 1.2.14 to compile in 64-bit

Download all attachments as: .zip

Change History (153)

comment:1 Changed 11 years ago by mf2k (Frank Schima)

Description: modified (diff)
Milestone: MacPorts 1.8.0
Owner: changed from macports-tickets@… to nox@…

comment:2 Changed 11 years ago by tobypeterson

yuck

comment:3 Changed 11 years ago by tobypeterson

Cc: toby@… added

comment:4 Changed 11 years ago by tobypeterson

FYI: I have a libsdl-devel port that almost works, based on a recent snapshot of libsdl. I don't know if libsdl 1.2.x will ever compile properly on SL.

comment:5 Changed 11 years ago by huahang.liu@…

Cc: huahang.liu@… added

Cc Me!

comment:7 Changed 11 years ago by aieouie@…

How to use the patch ?

comment:8 Changed 11 years ago by aieouie@…

I do this, and after ? please help

macadam:macports adam$ patch -p0 < ~/Desktop/libsdl.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: Portfile
|===================================================================
|--- Portfile	(revision 53834)
|+++ Portfile	(working copy)
--------------------------
File to patch: 

comment:9 Changed 11 years ago by lstoll@…

Cc: lstoll@… added

Cc Me!

comment:10 Changed 11 years ago by nerdling (Jeremy L)

Keywords: snowleopard added

comment:11 Changed 11 years ago by sam@…

Cc: sam@… added

Cc Me!

comment:12 Changed 11 years ago by tobypeterson

committed libsdl-devel to main repo... it builds, and sort of works

comment:13 in reply to:  12 Changed 11 years ago by huahang.liu@…

Replying to toby@…:

committed libsdl-devel to main repo... it builds, and sort of works

libsdl-framework builds, but in 32-bit not 64-bit mode~ libsdl doesn't build still and don't find any libsdl-devel. But even if lib-devel builds, there are still a lot of other ports that depends on libsdl not libsdl-devel won't build...

comment:14 Changed 11 years ago by tobypeterson

Yes, it's still broken - that's why the ticket is still open.

comment:15 Changed 11 years ago by benjaminkreeger@…

Cc: benjaminkreeger@… added

Cc Me!

comment:16 Changed 11 years ago by epichub (Bjørn Magnus Mathisen)

Cc: bjornmagnus@… added

Cc Me!

comment:17 Changed 11 years ago by geoff@…

Cc: geoff@… added

Cc Me!

comment:18 Changed 11 years ago by tomvons@…

It fails for me when I use the no_x11 variant, it installs fine without it.

comment:19 Changed 11 years ago by tomvons@…

Cc: tomvons@… added

Cc Me!

comment:20 Changed 11 years ago by sferik@…

Cc: sferik@… added

Cc Me!

comment:21 Changed 11 years ago by jm3@…

Cc: jm3@… added

Cc Me!

comment:22 Changed 11 years ago by allencmcbride@…

Cc: allencmcbride@… added

Cc Me!

comment:23 Changed 11 years ago by aselder@…

Cc: aselder@… added

Cc Me!

comment:24 Changed 11 years ago by pkutzner+macports@…

Cc: pkutzner+macports@… added

Cc Me!

comment:25 Changed 11 years ago by kenny@…

Cc: kenny@… added

Cc Me!

comment:26 Changed 11 years ago by fletch@…

Cc: fletch@… added

Cc Me!

comment:27 Changed 11 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:28 Changed 11 years ago by jm3@…

Cc: jm3@… removed

Cc Me!

comment:29 Changed 11 years ago by jm3@…

Cc: jm3@… added

Cc Me!

comment:30 Changed 11 years ago by phil@…

Cc: phil@… added

Cc Me!

comment:31 Changed 11 years ago by michael@…

Cc: michael@… added

Cc Me!

comment:32 Changed 11 years ago by aecollins1@…

Cc: aecollins1@… added

Cc Me!

comment:33 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:34 Changed 11 years ago by aecollins1@…

Cc: aecollins1@… removed

Cc Me!

comment:35 Changed 11 years ago by aecollins1@…

Cc: aecollins1@… added

Cc Me!

comment:36 Changed 11 years ago by richard.allen.smith.jr@…

Cc Me!

comment:37 Changed 11 years ago by richard.allen.smith.jr@…

Cc: richard.allen.smith.jr@… added

Cc Me!

comment:38 Changed 11 years ago by ed@…

Cc: ed@… added

Cc Me!

comment:39 Changed 11 years ago by ejeklint@…

Cc: ejeklint@… added

Cc Me!

comment:40 Changed 11 years ago by macports.org@…

Cc: macports.org@… added

Cc Me!

comment:41 Changed 11 years ago by tomjmalone@…

Cc: tomjmalone@… added

Cc Me!

comment:42 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:43 Changed 11 years ago by tumdum@…

Cc: tumdum@… added

Cc Me!

comment:44 Changed 11 years ago by kurtjaeke@…

Cc: kurtjaeke@… added

Cc Me!

comment:45 Changed 11 years ago by bts@…

Cc: bts@… added

Cc Me!

comment:46 Changed 11 years ago by bts@…

Cc: bts@… removed

Cc Me!

comment:47 Changed 11 years ago by hansondr@…

Cc: hansondr@… added

Cc Me!

comment:48 Changed 11 years ago by scott@…

Cc: scott@… added

Cc Me!

comment:49 Changed 11 years ago by elias-macports@…

Cc: elias-macports@… added

Cc Me!

comment:50 Changed 11 years ago by kirdatt.jai@…

I tried this command

sudo port install libsdl -d patch libsdl.patch 

and I got this error

-->  Computing dependencies for libsdl
--->  Building libsdl
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libsdl/work/SDL-1.2.13" && /usr/bin/make -j2 all " returned error 2
Command output: ./src/video/quartz/SDL_QuartzEvents.m:737: error: 'UsrActivity' undeclared (first use in this function)
./src/video/quartz/SDL_QuartzEvents.m:737: error: (Each undeclared identifier is reported only once
./src/video/quartz/SDL_QuartzEvents.m:737: error: for each function it appears in.)
./src/video/quartz/SDL_QuartzEvents.m:787: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:789: error: 'struct SDL_PrivateVideoData' has no member named 'current_mods'
./src/video/quartz/SDL_QuartzEvents.m:790: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:791: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:793: error: 'struct SDL_PrivateVideoData' has no member named 'current_mods'
./src/video/quartz/SDL_QuartzEvents.m:794: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:795: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:798: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:804: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:806: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:809: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:809: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:816: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:822: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:822: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:837: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
./src/video/quartz/SDL_QuartzEvents.m:872: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
./src/video/quartz/SDL_QuartzEvents.m:896: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
./src/video/quartz/SDL_QuartzEvents.m:921: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
make: *** [build/SDL_QuartzGL.lo] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build/SDL_QuartzEvents.lo] Error 1

Just thought I let everyone know what I did

Thanks for the help

comment:51 Changed 11 years ago by kirdatt.jai@…

Cc: kirdatt.jai@… added

Cc Me!

comment:52 Changed 11 years ago by tomvons@…

Cc: tomvons@… removed

Cc Me!

comment:53 Changed 11 years ago by blb@…

Cc: lhunath@… added

Cc reporter of dup #21016.

comment:54 in reply to:  description Changed 11 years ago by tapajos@…

My solution.

Run sudo port install libsdl

After the fail go to /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/libsdl/work/SDL-1.2.13 and apply the patch.

After that try sudo port install libsdl again and it will work.

comment:55 Changed 11 years ago by jirapong.nanta@…

I successfully install with

  1. sudo port install libsdl
  2. download original format of the libsdl.patch (download above)
  3. cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/libsdl/ (You should find Portfile here)
  4. sudo patch -p0 < ~/Downloads/libsdl.patch
  5. sudo port install libsdl (again - i got error about libsdl-devel is being used)
  6. sudo port -f activate libsdl

comment:56 Changed 11 years ago by tobypeterson

Keywords: LP64 added; snowleopard removed
Summary: libsdl does not build under Snow Leopardlibsdl does not build 64-bit
Version: 1.8.0

Please note that, while the attached patch will make libsdl build, it doesn't actually produce a *usable* libsdl.

comment:57 Changed 11 years ago by trevorturk@…

Cc: trevorturk@… added

Cc Me!

comment:58 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:59 Changed 11 years ago by gohanlon@…

Cc: gohanlon@… added

Cc Me!

comment:60 Changed 11 years ago by gohanlon@…

Cc: gohanlon@… removed

Cc Me!

comment:61 Changed 11 years ago by gohanlon@…

Cc: gohanlon@… added

Cc Me!

comment:62 Changed 11 years ago by joemisra@…

Cc: joemisra@… added

Cc Me!

comment:63 Changed 11 years ago by duco@…

With patch applied the (implicit) variant darwin_10 builds succesfully. The +universal variant still fails:

$ sudo port install libsdl +universal
--->  Computing dependencies for libsdl
--->  Building libsdl
--->  Building libsdl for architecture x86_64
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libsdl/work/SDL-1.2.13-x86_64" && /usr/bin/make -j2 all " returned error 2
Command output: ./src/video/quartz/SDL_QuartzEvents.m: In function 'QZ_PumpEvents':
./src/video/quartz/SDL_QuartzEvents.m:737: error: 'UsrActivity' undeclared (first use in this function)
...

comment:64 Changed 11 years ago by domiman@…

Cc: domiman@… added

Cc Me!

comment:65 Changed 11 years ago by arnaud.demouhy@…

Cc: arnaud.demouhy@… added

Cc Me!

comment:66 Changed 11 years ago by gtaylor@…

Cc: gtaylor@… added

Cc Me!

comment:67 Changed 11 years ago by gtaylor@…

Cc: gtaylor@… removed

Cc Me!

comment:68 Changed 11 years ago by gtaylor@…

Cc: gtaylor@… added

Cc Me!

comment:69 Changed 11 years ago by tommccullough-tenica

Cc: thomas.mccullough@… added

Cc Me!

comment:70 Changed 11 years ago by jrminter@…

I don't see a link to the patch described above. What am I missing? This one is holding up other packages that I need... Thanks.

comment:71 Changed 11 years ago by tobypeterson

The patch was deleted because it did more harm than good. Basically, SDL won't build until the SDL developers fix it. Simple as that.

comment:72 Changed 11 years ago by phil@…

Based on this thread http://bugzilla.libsdl.org/show_bug.cgi?id=581 , they're aware of the problem and it's been fixed in their SVN version. However, it's not clear when their next official release will come. Is it possible to build a MacPorts package from the SVN version?

comment:73 Changed 11 years ago by tobypeterson

Nothing in that ticket indicates that it's been fixed. As noted above, the libsdl-devel port is based off the latest snapshot, and I had to hack it quite a bit to get it to compile.

comment:74 Changed 11 years ago by tobypeterson

Oh - that specific ticket is fixed in svn, but there are other compilation issues that need to be worked around.

comment:75 Changed 11 years ago by tehcog (tehcog)

Cc: brewerleece@… added

Cc Me!

comment:76 Changed 11 years ago by ricsmo@…

Cc: ricsmo@… added

Cc Me!

comment:77 Changed 11 years ago by ryandesign (Ryan Schmidt)

Please remember to use WikiFormatting, everybody. I've just fixed a bunch of prior comments to make them legible.

comment:78 Changed 11 years ago by jicheu@…

Cc: jicheu@… added

Cc Me!

comment:79 Changed 11 years ago by takeshi@…

Cc: takeshi@… added

Cc Me!

comment:80 Changed 11 years ago by ksaito11+macport@…

Cc: ksaito11+macport@… added

Cc Me!

comment:81 Changed 11 years ago by jdswinbank (John Swinbank)

Cc: swinbank@… added

Cc Me!

comment:82 Changed 11 years ago by tobypeterson

Cc: sam.receive@… added

comment:83 Changed 11 years ago by desfania@…

Cc: desfania@… added

Cc Me!

comment:84 Changed 11 years ago by anfalas@…

Cc: anfalas@… added

Cc Me!

comment:85 Changed 11 years ago by jungwook.shin@…

Cc: jungwook.shin@… added

Cc Me!

comment:86 Changed 11 years ago by captainproton1971 (Captain Proton)

Cc: captainproton1971@… added

Cc Me!

comment:87 Changed 11 years ago by jason@…

Cc: jason@… added

Cc Me!

comment:88 Changed 11 years ago by ruud@…

Cc: ruud@… added

Cc Me!

comment:89 Changed 11 years ago by julian@…

Cc: julian@… added

Cc Me!

comment:90 Changed 11 years ago by brian.postow@…

Cc: brian.postow@… added

Cc Me!

comment:91 Changed 11 years ago by tobypeterson

Cc: andrzej.sliwa@… added

comment:92 Changed 11 years ago by allencmcbride@…

Wow, over 55 people cc'ed now. I'm betting I'm not the only one who didn't realize how dependent they were on libsdl until now. It seems, based on the bugzilla report linked above and on this message on the SDL mailing list, that what we need is a backported bug fix to the 1.2 line, since even if 1.3 were released tomorrow, it might not work with applications made for 1.2. I'm still naive on FOSS culture, but should we consider all making a small donation to the SDL project to help sponsor such a fix? If half of the people watching this ticket gave three or four dollars, that would be around $100. I don't know if that would make any difference or not, but we could ask their devel list.

comment:93 Changed 11 years ago by deti@…

Cc: deti@… added

Cc Me!

comment:94 Changed 11 years ago by deti@…

Cc: deti@… removed

Cc Me!

comment:95 Changed 11 years ago by deti@…

Cc: deti@… added

Cc Me!

comment:96 in reply to:  92 Changed 11 years ago by phil@…

Replying to allencmcbride@…:

Wow, over 55 people cc'ed now. I'm betting I'm not the only one who didn't realize how dependent they were on libsdl until now. It seems, based on the bugzilla report linked above and on this message on the SDL mailing list, that what we need is a backported bug fix to the 1.2 line, since even if 1.3 were released tomorrow, it might not work with applications made for 1.2. I'm still naive on FOSS culture, but should we consider all making a small donation to the SDL project to help sponsor such a fix? If half of the people watching this ticket gave three or four dollars, that would be around $100. I don't know if that would make any difference or not, but we could ask their devel list.

That sounds like a good idea. Can Toby or Nox clarify what we need from the SDL team? I think a number of us would be happy to contribute.

comment:97 Changed 11 years ago by domiman@…

there is movement on the SDL front it seems: http://bugzilla.libsdl.org/show_bug.cgi?id=581

comment:98 Changed 11 years ago by nicos_pavlov@…

Cc: nicos_pavlov@… added

Cc Me!

comment:99 Changed 11 years ago by arturoc@…

Cc: arturoc@… added

Cc Me!

comment:100 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:101 Changed 11 years ago by xgutter@…

Cc: xgutter@… added

Cc Me!

comment:102 Changed 11 years ago by jonathan@…

Cc: jonathan@… added

Cc Me!

comment:103 Changed 11 years ago by kennybongort@…

Cc: kennybongort@… added

Cc Me!

comment:104 in reply to:  97 Changed 11 years ago by allencmcbride@…

Replying to domiman@…:

there is movement on the SDL front it seems: http://bugzilla.libsdl.org/show_bug.cgi?id=581

...where an alarming message was recently posted suggesting this issue may resolved as "WONTFIX". I've written the sdl mailing list to ask if small donations would make any difference, or if this is out of our hands.

comment:105 Changed 11 years ago by domiman@…

That message appears exactly the same on other bugs, so I think it's not as alarming and mostly seems to be a standard reply.

comment:106 in reply to:  105 Changed 11 years ago by allencmcbride@…

Replying to domiman@…:

That message appears exactly the same on other bugs, so I think it's not as alarming and mostly seems to be a standard reply.

You are correct. Whew. :-)

comment:107 Changed 11 years ago by mattjamieson@…

Cc: mattjamieson@… added

Cc Me!

comment:108 Changed 11 years ago by jpenney (Jason Penney)

Cc: jpenney@… added

Cc Me!

comment:109 Changed 11 years ago by al.sutton@…

Cc: al.sutton@… added

Cc Me!

comment:110 Changed 11 years ago by al.sutton@…

Its' a blocker for building the Android SDK on Mac OS X... :(

comment:111 Changed 11 years ago by jan.hosang@…

Cc: jan.hosang@… added

Cc Me!

comment:112 Changed 11 years ago by chad@…

Cc Me!

comment:113 Changed 11 years ago by chadfawcett@…

Cc Me!

comment:114 Changed 11 years ago by nikdog@…

Cc: nikdog@… added

Cc Me!

comment:115 Changed 11 years ago by nikdog@…

I compiled libsdl-1.3 myself. How do I let MacPorts know that it is now installed?

comment:116 Changed 11 years ago by lhunath@…

You should just install libsdl-devel instead. And for those ports that depend on libsdl and you want to try 1.3 on, change their Portfile to depend on libsdl-devel instead.

comment:117 Changed 11 years ago by every_step_i_destroy@…

Obviously, 64-bit support is currently impossible, unless Apple takes a look at their QuickTime.framework and AudioUnit.framework etc. to bring back legacy code and take away _LP64_ blocks (which leave out definitions) and build frameworks for 64-bit support. Bellow command tell you you can't build anything 64-bit which is depending on QuickTime.framework, for example.

nm -arch all /System/Library/Frameworks/QuickTime.framework/QuickTime | grep "for architecture"

Of course, you can look forward to see SDL 1.3, but it's not backward compatible, you know, so official-working SDL release won't be the near future.

The following command will configure SDL 1.2 for you, I hope.

./configure CC="gcc-4.0" CXX="g++-4.0" CPPFLAGS="-isysroot /Developer/SDLs/MacOSX10.5.sdk"

comment:118 in reply to:  117 Changed 11 years ago by every_step_i_destroy@…

./configure CC="gcc-4.0" CXX="g++-4.0" CPPFLAGS="-isysroot /Developer/SDLs/MacOSX10.5.sdk"

Uh-oh, my bad. You need to apply a patch to SDL 1.2.13 (http://lists.macosforge.org/pipermail/macports-tickets/2009-March/027008.html for detail)

http://trac.macports.org/raw-attachment/ticket/18955/libsdl-glxtokens.diff

then,

./configure CC="gcc-4.0" CXX="g++-4.0" CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
make
make install

That's worked for me.

comment:119 Changed 11 years ago by tobypeterson

Can you people seriously stop posting bogus advice into this ticket? Building a 32-bit SDL does not help at all, because all of its dependents are still trying to build 64-bit.

comment:120 Changed 11 years ago by jeremykarlson@…

Cc: jeremykarlson@… added

Cc Me!

comment:121 Changed 11 years ago by hahn.seb@…

Cc: hahn.seb@… added

Cc Me!

comment:122 Changed 11 years ago by hahn.seb@…

Cc: hahn.seb@… removed

Cc Me!

comment:123 Changed 11 years ago by hahn.seb@…

Cc: hahn.seb@… added

Cc Me!

comment:124 Changed 11 years ago by faisal.moledina@…

Cc: faisal.moledina@… added

Cc Me!

comment:125 Changed 11 years ago by ih-mon@…

Cc: ih-mon@… added

Cc Me!

Changed 11 years ago by kenny@…

Patch that contains backport of enough of 1.2.14 to compile in 64-bit

comment:126 Changed 11 years ago by kenny@…

I helped test the patch to 1.2.14 on the SDL ticket, so I thought I'd circle back here and update MacPorts to work with it.

I attached a patch of backporting the audio and cdrom changes coming in SDL 1.2.14 for Mac OS X and also the video patch from SDL ticket 581.

Hopefully this isn't bogus advice :-)

$ file libSDL-1.2.0.11.2.dylib
libSDL-1.2.0.11.2.dylib: Mach-O 64-bit dynamically linked shared library x86_64

comment:127 in reply to:  126 Changed 11 years ago by jicheu@…

Kenny unless I made something wrong it does not compile on my mac :

port fetch sdl
port patch sdl
patch < <your patch>
configure
build :
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libsdl/work/SDL-1.2.13" && /usr/bin/make -j2 all " returned error 2
Command output: ./src/video/quartz/SDL_QuartzEvents.m:691: error: 'struct SDL_PrivateVideoData' has no member named 'power_connection'
./src/video/quartz/SDL_QuartzEvents.m: In function 'QZ_PumpEvents':
./src/video/quartz/SDL_QuartzEvents.m:737: error: 'UsrActivity' undeclared (first use in this function)
./src/video/quartz/SDL_QuartzEvents.m:737: error: (Each undeclared identifier is reported only once
./src/video/quartz/SDL_QuartzEvents.m:737: error: for each function it appears in.)
./src/video/quartz/SDL_QuartzEvents.m:787: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:789: error: 'struct SDL_PrivateVideoData' has no member named 'current_mods'
./src/video/quartz/SDL_QuartzEvents.m:790: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:791: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:793: error: 'struct SDL_PrivateVideoData' has no member named 'current_mods'
./src/video/quartz/SDL_QuartzEvents.m:794: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:795: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:798: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:804: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:805: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:806: error: 'struct SDL_PrivateVideoData' has no member named 'last_virtual_button'
./src/video/quartz/SDL_QuartzEvents.m:809: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:809: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:816: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:822: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:822: error: 'struct SDL_PrivateVideoData' has no member named 'expect_mouse_up'
./src/video/quartz/SDL_QuartzEvents.m:837: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
./src/video/quartz/SDL_QuartzEvents.m:872: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
./src/video/quartz/SDL_QuartzEvents.m:896: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
./src/video/quartz/SDL_QuartzEvents.m:921: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
make: *** [build/SDL_QuartzEvents.lo] Error 1

comment:128 Changed 11 years ago by kenny@…

The patch I attached was really meant for MacPorts maintaners to use (e.g., toby), but you could apply it thusly:

Make sure old remnants are not there anymore:

  • port uninstall libsdl
  • port clean libsdl

Clean up libsdl-devel if you used it:

  • port uninstall libsdl-devel

Make sure your ports tree is up to date and apply the patch to the port tree itself:

  • port selfupdate
  • cd /opt/local/var/macports/sources/rsync.macports.org
  • patch -p0 < /path/to/macports-libsdl-1.2.13-10.6.patch
  • port install libsdl

comment:129 in reply to:  128 Changed 11 years ago by whcordis@…

Replying to kenny@…:

The patch I attached was really meant for MacPorts maintaners to use (e.g., toby), but you could apply it thusly:

Make sure old remnants are not there anymore:

  • port uninstall libsdl
  • port clean libsdl

Clean up libsdl-devel if you used it:

  • port uninstall libsdl-devel

Make sure your ports tree is up to date and apply the patch to the port tree itself:

  • port selfupdate
  • cd /opt/local/var/macports/sources/rsync.macports.org
  • patch -p0 < /path/to/macports-libsdl-1.2.13-10.6.patch
  • port install libsdl

libsdl-devel often gets installed first (ex. ffmpeg depends on libsdl-devel but not libsdl). When libsdl-devel is installed after using your patch the following error occurs

--->  Activating libsdl @1.2.13_6
Error: Target org.macports.activate returned: Image error: /opt/local/bin/sdl-config is being used by the active libsdl-devel port.  Please deactivate this port first, or use 'port -f activate libsdl' to force the activation.
Error: Status 1 encountered during processing.

Simply deactivating libsdl-devel and anything that depends on it and then installing libsdl works. ffmpeg will then install and avoid installing libsdl-devel.

comment:130 Changed 11 years ago by whcordis@…

Cc: whcordis@… added

Cc Me!

comment:131 Changed 11 years ago by jicheu@…

Thanks @kenny. It actually worked and am now able to build again my company's flagship project ! ( I had to tweak between sdl-devel and sdl, but finally but deactivating devel, installing libsdl then reactivating (with -f) devel, it worked)

comment:132 Changed 11 years ago by godisgovernment@…

Cc: godisgovernment@… added

Cc Me!

comment:133 Changed 11 years ago by software@…

Cc: software@… added

Cc Me!

comment:134 Changed 11 years ago by domiman@…

Building libsdl worked fine. When I try to build pentagram (http://pentagram.sf.net) it builds fine (only needed an additional include in the acoreudio header) but crashes with that error http://pastebin.com/f65bcb813 Any ideas what's going wrong?

comment:135 Changed 11 years ago by domiman@…

Please disregard my previous question, we disabled sdlmain for some reason :)

comment:136 Changed 11 years ago by sferik@…

Cc: sferik@… removed

Cc Me!

comment:137 Changed 11 years ago by hahn.seb@…

Can we expect a new version containing the fix to be released soon? Waiting on libsdl to make a new release seems more than pointless atm, because their list of issues that they want to fix before the release of 1.2.14 is long and activity in their project is low

comment:138 Changed 11 years ago by godisgovernment@…

the patch kenny posted seems to work OK, when will it be committed? :)

comment:139 Changed 11 years ago by jm3@…

Cc: jm3@… removed

Cc Me!

comment:140 Changed 11 years ago by nicholas.robinson@…

Thanks for the patch information @kenny. My Qt-SDL project now builds successfully under Snow Leopard. Unfortunately running the program fails with the following:

dyld: Library not loaded: /opt/local/lib/libSDL-1.2.0.dylib
  Referenced from: /Client
  Reason: no suitable image found.  Did find:
	/opt/local/lib/libSDL-1.2.0.dylib: mach-o, but wrong architecture
Trace/BPT trap

I am running Mac OS X 10.6 with 64-bit Kernel and Extensions disabled. Initially I tried to remedy the problem by explicitly settings the build architecture in Qt with CONFIG += x86, however this does not help.

comment:141 Changed 11 years ago by nicholas.robinson@…

Cc: nicholas.robinson@… added

Cc Me!

comment:142 in reply to:  140 Changed 11 years ago by kenny@…

It sounds like part of your project is compiled with i386 (32-bit) and part is x86-64 (64-bit). You can use the file command to determine what architecture a binary or library file is compiled for. Especially since it sounds like you tried different approaches when trying to get it to compile.

If anyone has used some random workarounds suggested before where they've changed many things, I'd recommend:

  1. Making sure you have the right GCC with: sudo gcc_select 4.2
  2. Making sure you didn't inadvertently mix architectures: file /opt/local/lib/*.dylib; file /opt/local/bin/*
  3. If you really messed something up, you might even want to remove MacPorts completely and reinstall.

However, this discussion doesn't belong on the bug tracker and further discussion should instead be put on a discussion list where more people can address your problem. I'd suggest macports-users or the #MacPorts IRC channel.

comment:143 Changed 11 years ago by taqticus@…

Cc: taqticus@… added

Cc Me!

comment:144 in reply to:  131 Changed 11 years ago by ryandesign (Ryan Schmidt)

Replying to jicheu@…:

deactivating devel, installing libsdl then reactivating (with -f) devel

Please don't do that.

comment:145 Changed 11 years ago by tobypeterson

Resolution: fixed
Status: newclosed

comment:146 Changed 11 years ago by sava.chankov@…

I cannot get 1.2.14 to compile 64 bit.

> sudo port install libsdl +no_x11 +universal 
--->  Computing dependencies for libsdl
--->  Fetching libsdl
--->  Attempting to fetch SDL-1.2.14.tar.gz from http://www.libsdl.org/tmp/
--->  Verifying checksum(s) for libsdl
--->  Extracting libsdl
--->  Applying patches to libsdl
--->  Configuring libsdl
--->  Configuring libsdl for architecture i386
--->  Configuring libsdl for architecture x86_64
--->  Building libsdl
--->  Building libsdl for architecture i386
--->  Building libsdl for architecture x86_64
Error: Target org.macports.build returned: shell command " cd "/Users/sava/Downloads/mports64/var/macports/build/_Users_sava_Downloads_mports64_var_macports_sources_rsync.macports.org_release_ports_devel_libsdl/work/SDL-1.2.14-x86_64" && /usr/bin/make -j2 all " returned error 2
Command output:  /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/dummy/SDL_nullvideo.c  -fno-common -DPIC -o build/.libs/SDL_nullvideo.o
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/disk/SDL_diskaudio.c  -o build/SDL_diskaudio.lo
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/dummy/SDL_nullvideo.c -o build/SDL_nullvideo.o >/dev/null 2>&1
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/disk/SDL_diskaudio.c  -fno-common -DPIC -o build/.libs/SDL_diskaudio.o
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/dummy/SDL_dummyaudio.c  -o build/SDL_dummyaudio.lo
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/disk/SDL_diskaudio.c -o build/SDL_diskaudio.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/loadso/dlopen/SDL_sysloadso.c  -o build/SDL_sysloadso.lo
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/dummy/SDL_dummyaudio.c  -fno-common -DPIC -o build/.libs/SDL_dummyaudio.o
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/dummy/SDL_dummyaudio.c -o build/SDL_dummyaudio.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/quartz/SDL_QuartzEvents.m  -o build/SDL_QuartzEvents.lo
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/loadso/dlopen/SDL_sysloadso.c  -fno-common -DPIC -o build/.libs/SDL_sysloadso.o
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/loadso/dlopen/SDL_sysloadso.c -o build/SDL_sysloadso.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/quartz/SDL_QuartzGL.m  -o build/SDL_QuartzGL.lo
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/quartz/SDL_QuartzEvents.m  -fno-common -DPIC -o build/.libs/SDL_QuartzEvents.o
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/quartz/SDL_QuartzGL.m  -fno-common -DPIC -o build/.libs/SDL_QuartzGL.o
./src/video/quartz/SDL_QuartzEvents.m: In function 'QZ_InitOSKeymap':
./src/video/quartz/SDL_QuartzEvents.m:203: warning: 'GetScriptManagerVariable' is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h:993)
./src/video/quartz/SDL_QuartzEvents.m: In function 'QZ_PumpEvents':
./src/video/quartz/SDL_QuartzEvents.m:736: error: 'UsrActivity' undeclared (first use in this function)
./src/video/quartz/SDL_QuartzEvents.m:736: error: (Each undeclared identifier is reported only once
./src/video/quartz/SDL_QuartzEvents.m:736: error: for each function it appears in.)
make: *** [build/SDL_QuartzEvents.lo] Error 1
make: *** Waiting for unfinished jobs....
./src/video/quartz/SDL_QuartzGL.m: In function 'QZ_SetupOpenGL':
./src/video/quartz/SDL_QuartzGL.m:158: warning: passing argument 1 of 'setValues:forParameter:' from incompatible pointer type
./src/video/quartz/SDL_QuartzGL.m:180: warning: passing argument 3 of 'CGLSetParameter' from incompatible pointer type
./src/video/quartz/SDL_QuartzGL.m:181: warning: passing argument 3 of 'CGLSetParameter' from incompatible pointer type
./src/video/quartz/SDL_QuartzGL.m: In function 'QZ_GL_GetAttribute':
./src/video/quartz/SDL_QuartzGL.m:275: warning: passing argument 1 of 'getValues:forParameter:' from incompatible pointer type
 /usr/bin/gcc-4.0 -O2 -arch x86_64 -I/Users/sava/Downloads/mports64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/quartz/SDL_QuartzGL.m -o build/SDL_QuartzGL.o >/dev/null 2>&1

comment:147 Changed 11 years ago by tobypeterson

Works for me, are you sure you're running the latest version of the port? (It was adjusted for a stealth update.)

Actually, it looks like you're using gcc-4.0 - if you're on Leopard/Tiger, file a separate ticket.

comment:148 Changed 11 years ago by brian.postow@…

Cc: brian.postow@… removed

Cc Me!

comment:149 Changed 11 years ago by tehcog (tehcog)

Cc: brewerleece@… removed

Cc Me!

comment:150 Changed 11 years ago by macports@…

The current version available from the URL defined in the Portfile does not match the hashes specified in the Portfile. It seems there has been a new release since the Portfile was updated.

comment:151 in reply to:  150 Changed 11 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: closedreopened

Replying to macports@…:

The current version available from the URL defined in the Portfile does not match the hashes specified in the Portfile. It seems there has been a new release since the Portfile was updated.

You can see #21544 for more info about that. I have downgraded the port back to 1.2.13 because 1.2.14 has not been released yet.

comment:152 Changed 11 years ago by tobypeterson

Resolution: fixed
Status: reopenedclosed

closed against in r58181

Note: See TracTickets for help on using tickets.