MacOsX Version issues

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderators: Committer, Committer

Message
Author
User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: MacOsX Version issues

#151 Post by .Id » Wed Apr 01, 2009 4:37 pm

jabyrd3 wrote:Have any of you guys bumped into this lib error yet?

dyld: Library not loaded: /usr/lib/libexpat.1.dylib
Referenced from: /Users/.../Desktop/FreeOrion.app/Contents/MacOs/../SharedSupport/libgvc_builtins.dylib
Reason: image not found
Trace/BPT trap


I downloaded the FreeOrion 0.3.11 UB from sourceforge, and I started to get library errors. So I installed X11, and now i'm getting this expat.1.dylib error. I found a libexpat.1.0.dylib on my computer, but i couldn't find 1.0. Anybody mind pointing me to it, or perhaps giving me a hint?

Oh, btw, I'm running an old MBP, first hardware iteration with 10.4.

Update: Just downloaded the last version of the SDK you posted. Couldn't find any libexpat in it. Am I looking in the wrong place, or is this just a lib i should already have had?
I'm guessing 10.4 came with a different version of libexpat. I can probably distribute my library within the app bundle.

But before I change and re-upload, can you try temporarily copying (provided you're not overwriting anything) my version into /usr/lib
http://www.mediafire.com/file/h4zqimxj1 ... at.1.dylib

And tell me if any there's any subsequent errors?

jabyrd3
Space Krill
Posts: 2
Joined: Mon Mar 30, 2009 2:12 am

Re: MacOsX Version issues

#152 Post by jabyrd3 » Thu Apr 02, 2009 8:14 pm

Okay, I'm about to just give up. I'm barely Unix literate, so this proving to be quite difficult. I used "sudo cp usr/users/username/desktop/libexpat.1.dylib/usr/lib" command in the terminal (replacing username with my username obviously), and it keeps responding by saying that there's "no such file or directory.

So I decided to try and drag and drop it. I found usr/lib by using the finder search invisible option, and when i try that, it kept saying that usr/lib cannot be modified, even though i have read/write permissions on it.

Any suggestions are welcome, but for now I'm going to give up. Thanks for trying to help though.

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: MacOsX Version issues

#153 Post by .Id » Thu Apr 02, 2009 10:06 pm

The path to the desktop is usually /Users/$USER/Desktop, so the command syntax to try would be like:

Code: Select all

sudo cp /Users/$USER/Desktop/libexpat.1.dylib /usr/lib
Don't worry much about it, I'll be updating this eventually and upload a new version you can try.

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: MacOsX Version issues

#154 Post by .Id » Tue Apr 07, 2009 7:35 pm

tried to resolve the missing libexpat in the version here
downloading the zip files and running the unpack-FO script will extract everything

Maybe it works now on OS X 10.4 in addition to 10.5 (still maybe not PowerPC's), let me know.

raptor_85
Space Krill
Posts: 4
Joined: Sun Jan 25, 2009 10:33 pm

Re: MacOsX Version issues

#155 Post by raptor_85 » Mon May 04, 2009 8:59 pm

The path to the desktop can be shortened to ~/Desktop for the current user.

So: cd ~ would take you to your user folder (that contains folders: documents, desktop, etc.)

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12485
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: MacOsX Version issues

#156 Post by Geoff the Medio » Wed May 20, 2009 6:38 am

There will probably be a new release of FreeOrion soon, and it'd be nice if we could have a new Mac OSX version around the same time.

The previous page's discussion of putting the XCode project into FreeOrion's SVN repository and patching GG seems to have been forgotten...
.Id wrote:
tzlaine wrote:Thanks for doing this! Ok, here's my take on your GG patch. I changed some formatting-type stuff, and s/NULL/0. Do these changes work for you? If so, I'll be committing these files as they are here, including your copyright. If you approve, I'll take this as written consent to release this code under LGPL.
Anything that's copyright from me, I didn't intend to have there.
I'm not sure if tzlaine saw that, but that's not a very clear response. Do you mean that all code you wrote and submitted in this thread can be released under the LGPL?
.Id wrote:But the aglGetProcAddress files are actually apple's work:
http://developer.apple.com/qa/qa2001/qa1188.html which I should have made clear, sorry
Do you know if it's allowed to release that code under the LGPL? It appears to be standard / boilerplate code that wouldn't be copyright, but the page doesn't seem to specifically say that it's free to use and redistribute.
.Id wrote:I can rewrite that code to get OpenGL entry points if you'd like.
That would probably be the best option.
.Id wrote:
tzlaine wrote:Did you build GG with its SCons build system? It appears you did not, since I found "#ifdef FREEORION_MACOSX" in your changes to GG/Ogre/OgreGUI.h. Before I can accept this patch for GG's trunk, I'll need your assurance that the SCons build works. Otherwise, I'll stick this changeset in a patches directory in the GG repository.
I didn't use SCons. Considering a SCons build wasn't previously supported on a mac platform, I'll take you mean the changes don't break win32 or posix. And I'm fairly certain they don't, since everything would be preprocessed out and the aglGetProcAddress files do not even need to be looked at for those platforms. Would confirming a GG SCons build with this patch on linux suffice?
.Id wrote:Glad, I checked this. There was a bug where I #ifdef instead of #if, use this patch for OgreGUI.cpp instead of what was in previous files:
[...]
These compile with SCons on linux and still in Xcode.
It'd be good to address this (tzlaine...?)

I've mashed together the changes and editing the FreeOrion part slightly for tabs -> spaces, and attached.
Attachments
.ID-OSX-FO-GG-patches.zip
.Id's FreeOrion and GG patches for Mac OSX, including adjustments in subsequent post to replace OgreGUI.cpp and OgreGUI.h changes.
(3.43 KiB) Downloaded 91 times

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: MacOsX Version issues

#157 Post by .Id » Wed May 20, 2009 3:47 pm

Geoff the Medio wrote:
.Id wrote:
tzlaine wrote:Thanks for doing this! Ok, here's my take on your GG patch. I changed some formatting-type stuff, and s/NULL/0. Do these changes work for you? If so, I'll be committing these files as they are here, including your copyright. If you approve, I'll take this as written consent to release this code under LGPL.
Anything that's copyright from me, I didn't intend to have there.
I'm not sure if tzlaine saw that, but that's not a very clear response. Do you mean that all code you wrote and submitted in this thread can be released under the LGPL?
I thought tzlaine was saying he saw that there was an explicit copyright included somewhere in my submission, which would have slipped in there accidentally (you know how IDEs can sometimes put an auto-header with current user's info, including a copyright?). Maybe that's more confusing.

I do mean that everything I submit can be released under LGPL.
Geoff the Medio wrote:
.Id wrote:But the aglGetProcAddress files are actually apple's work:
http://developer.apple.com/qa/qa2001/qa1188.html which I should have made clear, sorry
Do you know if it's allowed to release that code under the LGPL? It appears to be standard / boilerplate code that wouldn't be copyright, but the page doesn't seem to specifically say that it's free to use and redistribute.
.Id wrote:I can rewrite that code to get OpenGL entry points if you'd like.
That would probably be the best option.
Yeah, Apple's not specific about that code but their website seems to indicate that all content is under copyright, requiring written consent for redistribution.
I'll write something to replace it.

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: MacOsX Version issues

#158 Post by .Id » Thu May 21, 2009 2:13 am

Geoff the Medio wrote: I've mashed together the changes and editing the FreeOrion part slightly for tabs -> spaces, and attached.
I think the untabification put in the wrong number of spaces to make things line up pretty.
Also the GG patch got malformed (looks like the context lines got moved to start in the first column).

Think it's best that I just get a complete set of non-tabbed patches with the new OpenGL entry point code?

I think I've already got it done, but just want to check a couple things.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12485
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: MacOsX Version issues

#159 Post by Geoff the Medio » Thu May 21, 2009 2:29 am

.Id wrote:I think the untabification put in the wrong number of spaces to make things line up pretty.
Yeah, I just replaced all tabs with four spaces in the patch, rather than patching my local copy, editing it to make the changes and be pretty, and making a new patch...
Also the GG patch got malformed (looks like the context lines got moved to start in the first column).
I copy and pasted from your forum post, so the forum formatting might have eaten some spaces.
Think it's best that I just get a complete set of non-tabbed patches with the new OpenGL entry point code?
That would be best.

I also stuck the posted XCode project into SVN. It'd be good if you could make sure that's up to date (assuming appropriate FreeOrion and GG patches are applied that it expects).

[edit] Also, the release is probably going to be delayed until the weekend or next week. kroddn is planning to wait until tzlaine puts up the Win32 release to make his linux binaries, to ensure the revision numbers are consistent. You might want to do the same.

Also also, I think one of the reasons for the delay is tzlaine wanting to fix how the the Ogre plugins are loaded. Presently they're shared objects / dlls loaded at run time after the program has started up some of the Ogre machinery, but I think they want to get them loading statically... This might be a slightly complicated fix for you, so I thought a heads up would be good. [/edit]

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: MacOsX Version issues

#160 Post by OndrejR » Thu May 21, 2009 6:15 am

Geoff the Medio wrote:It'd be good if you could make sure that's up to date (assuming appropriate FreeOrion and GG patches are applied that it expects).

kroddn is planning to wait until tzlaine puts up the Win32 release to make his linux binaries, to ensure the revision numbers are consistent. You might want to do the same.
For this problem there is already solution in svn. If we want for example revision 3070(current svn is in revision 3071), then command

Code: Select all

svn update -r 3070
gets revision 3070.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12485
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: MacOsX Version issues

#161 Post by Geoff the Medio » Thu May 21, 2009 6:21 am

OndrejR wrote:For this problem there is already solution in svn. If we want for example revision 3070(current svn is in revision 3071), then command

Code: Select all

svn update -r 3070
gets revision 3070.
The issue isn't how to use subversion... My points was just that kroddn can't make a release that's the same revision as the one tzlaine releases until tzlaine finishes making changes and makes a release.

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: MacOsX Version issues

#162 Post by .Id » Fri May 22, 2009 1:30 am

Here's clean patches. With an extremely simplified rewrite of code necessary to get OpenGL entry points.

One thing that I think needs particular review is the change I made in ShaderProgram::BindInts(). I thought the cast to (GLInt*) was appropriate going off the comment seen above the prototype saying that we're in the realm of GLSL data types, but maybe it's better to change that 3rd parameter to "const std::vector<GLint> &ints" ?
I'll admit - I haven't taken the time to fully understand this part.

Everything seems to be working fine so far with the latest revision.
Attachments
OSX_FreeOrion_patches.zip
GG and FO patches against revision 3076 to get everything working under OS X.
(63.95 KiB) Downloaded 97 times

User avatar
tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: MacOsX Version issues

#163 Post by tzlaine » Sat May 23, 2009 5:43 am

I've only looked at the GG patch so far, and it looks good. I'd apply it, but first it needs to be integrated into the SCons build. I need to add src/Ogre/aglGetProcAddress.cpp to the build only if I detect an OS X build. Can you add a line "print Platform()" to the top of your GG SConstruct file and tell me what it says? I really don't know of another way to get SCons to tell me the platform, so if you find a better way, let me know.

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: MacOsX Version issues

#164 Post by loonycyborg » Sat May 23, 2009 3:35 pm

tzlaine wrote:I really don't know of another way to get SCons to tell me the platform, so if you find a better way, let me know.
You either look for it in env["PLATFORM"] or use python's sys.platform. On Mac env["PLATFORM"] will be 'darwin' AFAIK.
In Soviet Russia, forum posts YOU!!

User avatar
tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: MacOsX Version issues

#165 Post by tzlaine » Sun May 24, 2009 2:01 am

Actually, nevermind. I just added the aglGetProcAddress() function to OgreGUI.cc, and used "#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE" as a guard around compiling it.

Post Reply