[Ohrrpgce] FreeBASIC Mac OS X build

Ralph Versteegen teeemcee at gmail.com
Thu Oct 7 20:37:18 PDT 2010


On 8 October 2010 04:43, James Paige <Bob at hamsterrepublic.com> wrote:
> On Fri, Oct 08, 2010 at 01:39:54AM +1300, Ralph Versteegen wrote:
>> On 6 October 2010 19:34, Ralph Versteegen <teeemcee at gmail.com> wrote:
>> > On 6 October 2010 10:20, James Paige <Bob at hamsterrepublic.com> wrote:
>> >> On Wed, Oct 06, 2010 at 02:48:17AM +1300, Ralph Versteegen wrote:
>> >>> OK, I finally have an fbc build that can compile itself and the OHR.
>> >>> James (and anyone else who's interested), let me know if you can get
>> >>> it working. To compile, stick the SDL and SDL_mixer frameworks
>> >>> somewhere (preferably use at least the SDL_mixer build below), stick
>> >>> fbc in PATH (it's a standalone build), make sure SDLmain.a is in
>> >>> $(libpaths) if needed, edit $(FRAMEWORKS_PATH) if needed, and build
>> >>> with make.
>> >>
>> >> Okay, I figured out FRAMEWORKS_PATH (doy, I don't know how I missed it
>> >> the first time!)
>> >>
>> >> but I am still stumpled on this libintl thing. If i just simply try to
>> >> compile verprint...
>> >>
>> >> broaste:~/src/ohr/wip james$ fbc -lang deprecated verprint.bas
>> >> dyld: Library not loaded: /usr/local/lib/libintl.3.dylib
>> >>  Referenced from: /Users/james/misc/fbc-mac/bin/darwin/as
>> >>  Reason: image not found
>> >>
>> >> On my system /usr/local/lib is almost completely empty. All it has is
>> >> just a handful of dylib files for macfuse.
>> >>
>> >> I searched my whole filesystem for limintl and I found
>> >> /opt/local/lib/libintl.8.dylib
>> >>
>> >> But adding /opt/local/lib to libpaths doesn't help.
>> >>
>> >> Just as an experiment I tried symlinking from
>> >> /opt/local/lib/libintl.8.dylib to /usr/local/lib/libintl.8.dylib but
>> >> then it informed me that the archetecture was wrong.
>> >>
>> >> broaste:~/src/ohr/wip james$ fbc -lang deprecated verprint.bas
>> >> dyld: Library not loaded: /usr/local/lib/libintl.3.dylib
>> >>  Referenced from: /Users/james/misc/fbc-mac/bin/darwin/as
>> >>  Reason: no suitable image found.  Did find:
>> >>        /usr/local/lib/libintl.3.dylib: mach-o, but wrong architecture
>> >>        /usr/local/lib/libintl.3.dylib: mach-o, but wrong architecture
>> >
>> > Bizarre, I wonder what architecture they are? ("file" will tell)
>> >
>> >> Which caused me to decide I was barking up the wrong tree, and I hastily
>> >> deleted the errant symlink, lest it cause my mac to catch fire as a
>> >> single teardrop escapes from the eye of Steve Jobs.
>> >>
>> >> ---
>> >> James
>> >
>> > OK, I recompiled as, statically linking in libintl. Bizarrely, in
>> > order to do so, I had to add Cocoa and CoreFoundation as dependencies!
>> > Other than that, fbc should run on a real darwin system, so I'll leave
>> > the old download up. All other dependencies appear to come standard on
>> > OS 10.4 and later.
>> > http://tmc.castleparadox.com/freebasic/fbc-mac-20101006-2.tar.bz2
>> >
>>
>> OK James, I've sorted out .app bundling. Now I'm just impatiently
>> waiting to hear whether you can compile, and commence nightly builds
>> :)
>
> Unfortunately I am still getting:
>
> fbc -lang deprecated -m verprint verprint.bas -g
> dyld: Library not loaded: /usr/local/lib/libintl.3.dylib
>  Referenced from: /Users/james/misc/fbc-mac/bin/darwin/as
>  Reason: image not found
> make[1]: *** [verprint] Error 1

What the devil?! I'm sure that I checked the new as didn't depend on
libintl. Are you sure you downloaded the new
fbc-mac-20101006-2.tar.bz2? bin/darwin/as should be 1463572 bytes.
That appears to be the version I most recently built.

Well, if you can't build it, I'll put up another build, but the only
new thing will be bundling (I can't even run svn update because the
version of svn on those machines is ancient)

> I also tried symlinking from ~/misc/fbc-mac/bin/darwin/as -> my system
> as at /usr/bin/as but that caused different and interesting freakouts

That won't work, as not only is it a cross compiling build to linux,
but it's actually a completely different program: apple and gnu gas
forked something like 20 years ago.

> fbc -lang deprecated -m verprint verprint.bas -g
> FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand '-'
> flag!
> make[1]: *** [verprint] Error 1
>
>> Today I also spent some time trying to build hspeak, but failed. The
>> Euphoria build system is really flimsy, so I tried to cross compile
>> just hspeak. (The solution to my problem should be pretty easy, but I
>> didn't have enough time tonight.) I have Fridays off, so I probably
>> won't see a Mac for 3 days; I'm hoping there are no more problems.
>>
>> oggenc and madplay are still missing. A universal build of oggenc is
>> available, but it's 14 MB!! I've heard vorbis-tools come with an
>
> So that would be okay for separate installation, but not for bundling...
>
>> Xcodes project, so it shouldn't be too hard to rebuild... however I
>> had the most horrible time trying to remove smpeg from SDL_mixer. I
>> hate Xcode now, I had to spend half an hour hand editing the project
>> file to get rid of it because it's apparently impossible from within
>> Xcode. Also since I've already built libmad, I would grudgingly agree
>> to building madplay.
>>
>> I also tried out creating a new RPG file and ran into exactly the same
>> problem that ShakeyAir reported, appears it always happens. It seems
>> that game$ is mysteriously being blanked out at some point. Shouldn't
>> be hard to fix.
>
> Interesting. What is your theory on it?

No idea, haven't looked too closely. Customs unlumping/relumping/init
code is a tangled mess, it's surprisingly hard to follow the program
flow.

>> I also noticed that temporary directories for games in
>> .ohrrpgce are being cleaned out but not deleted (which I think happens
>> on all platforms).
>
> On my box, they only get left behind if game crashes. If it exists
> without a crash, they do get cleaned up and removed okay.

Well, I hadn't had any crashes on the Mac yet. I know that lots of
empty directories get left behind on Windows, can't actually remember
what happens under Linux.

> ---
> James
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>


More information about the Ohrrpgce mailing list