FrobTADS macos

sure, thx. i’m willing to try anything at this point.

feel free to IM me.

Ah. Right, the OP says Apple silicon. I just got a MacOS x86_64 instance set up.

Ah, well. If you don’t make any headway with copying an install from an existing arm setup I can look at it some more; even though MacOS/x86 and MacOS/arm won’t be binary compatible, the build process for each is probably the same.

1 Like

i can get it to build now. i can ‘frob’ stuff, that is.
but when i try to compile the test game i get this error:

TADS Compiler 3.1.3  Copyright 1999, 2012 Michael J. Roberts
	Files to build: 3
	symbol_export /usr/local/share/frobtads/tads3/lib/_main.t -> _main.t3s
	compile /usr/local/share/frobtads/tads3/lib/_main.t -> _main.t3o
	link ->
error: unresolved external reference "main"
Errors:   1
Warnings: 0

which i think is a screw-up in the C++ linker doohickey thingie?

i thought about filing an issue on the frobtads github but the last update was four years ago so it looks like abandonware at this point.

so, anyway. yeah. i’ll try a prebuilt compiler binary and if that doesn’t work i won’t waste anymore of my own or anyone else’s time.

1 Like

I’ll send those files later this evening…

1 Like

The unresolved external reference "main" sounds like you’re just not including one of the libraries—adv3 or adv3lite—and your source doesn’t contain a replacement for all the stuff they supply (like a main()).

What’s the source file you’re trying to compile, and what’s the command you’re using to compile it?

Here’s a simple “game” that should compile if you have adv3 installed:

#charset "us-ascii"
#include <adv3.h>
#include <en_us.h>

startRoom: Room 'Void' "This is a featureless void. ";
+me: Person;
+pebble: Thing 'small round pebble' 'pebble' "A small, round pebble. ";

versionInfo: GameID;
gameMain: GameMainDef initialPlayerChar = me;

Save that to a file. Here I’ll assume it’s sample.t. Then you can compile it via:

# t3make -D LANGUAGE=en_us -D MESSAGESTYLE=neu -Fy obj -Fo obj -o game.t3 -lib system -lib adv3/adv3 -source sample.t

If that complains about not finding some system libraries (system.tl and/or adv3/adv3.tl), then you can add -FL [path to the frobTADS tads3/lib directory]. If you had to do that, then you’ll probably also have to do the same thing for includes via -FI [path to the frobTADS tads/include directory]. Example:

# t3make -D LANGUAGE=en_us -D MESSAGESTYLE=neu -Fy obj -Fo obj -o game.t3 -FL /usr/local/share/frobtads/tads3/lib -FI /usr/local/share/frobtads/tads3/include -lib system -lib adv3/adv3 -source sample.t

That’s obviously a bit of a mess, so you might want to stick most/all of these options into a makefile. For example:

-D LANGUAGE=en_us
-D MESSAGESTYLE=neu
-Fy obj -Fo obj
-o game.t3
-lib system
-lib adv3/adv3
-source sample

Save that as makefile.t3m, then you can compile via:

# t3make -f makefile.t3m
3 Likes

holy crap that worked.

i don’t know what’s different now from all the other times when i copied VERBATIM everything from the “getting started” manual. but i now have a functioning t3 executable.

i won’t argue with the how, though.

many thanks to everyone!!!

3 Likes

So glad you got it worked out. Did you leave the adv3 files in a subdirectory of your home folder? If not, I would be very curious to know if you were able to locate the files in /usr/local/share and not have to deal with the whole library getting recompiled each time.

By default the compiler will only recompile files that changed, regardless of where the source files are. You can add the -a arg to the t3make command line to force everything to be recompiled, but by default it shouldn’t.

An example. Starting with nothing compiled:

# t3make -f makefile.t3m
TADS Compiler 3.1.3  Copyright 1999, 2012 Michael J. Roberts
        Files to build: 88
        symbol_export /usr/local/share/frobtads/tads3/lib/_main.t -> obj/_main.t3s
        symbol_export /usr/local/share/frobtads/tads3/lib/file.t -> obj/file.t3s

[...about 90 lines deleted...]

        compile /usr/local/share/frobtads/tads3/lib/adv3/en_us/msg_neu.t -> obj/msg_neu.t3o
        compile sample.t -> obj/sample.t3o
        link -> game.t3p
        preinit -> game.t3
# touch sample.t
# t3make -f makefile.t3m
TADS Compiler 3.1.3  Copyright 1999, 2012 Michael J. Roberts
        Files to build: 4
        symbol_export sample.t -> obj/sample.t3s
        compile sample.t -> obj/sample.t3o
        link -> game.t3p
        preinit -> game.t3
1 Like

it looks like everything is in /share. i didn’t change anything when i built it, i just did what it said in the install instructions. i don’t know why it apparently wasn’t finding the adv3 files before. i didn’t move anything.

but it seems to be working so i’m just going to slowly back away and hope i don’t spook it!

1 Like

The compiler always has a default path for the library and header files, set at (the compiler’s) compile time. If t3make is finding things in /share/ without having to specify -FL /share then that tells you that’s the default path.

On linux and the BSDs the default location is /usr/local/share, which is a pretty common unix-like place to put that kind of thing. Presumably /share is a mac-ism.

1 Like

No, it installs to /usr/local/share.

That is what is supposed to happen, but that was not the case for the first year+ that I developed in TADS3 until @Tomas suggested that I move my adv3 files from /usr/local/share to a folder (such as a subdir of ~) that doesn’t have any permissions issues. It fixed the problem immediately and revolutionized my development environment, having to only wait 2-4 seconds for a recompile instead of 10-15.

@cfmoorz2 can you confirm that when you make changes to your (mygame).t file(s), a recompile does not have to build all the adv3 files? Like @jbg said, it’s not supposed to, but no one on the forum was able to answer why that was happening on my (Intel, Mojave) Mac until Tomas had me move the files.

i think it’s re-doing everything every time? it keeps compiling 88 files every time when i’m only changing one file. this is the (complete output):

charlesmoore@Charless-MacBook-Pro TADS_Fat_Bear % t3make -f makefile.t3m
TADS Compiler 3.1.3  Copyright 1999, 2012 Michael J. Roberts
	Files to build: 88
	symbol_export /usr/local/share/frobtads/tads3/lib/_main.t -> obj/_main.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/file.t -> obj/file.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/tok.t -> obj/tok.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/gramprod.t -> obj/gramprod.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/multmeth.t -> obj/multmeth.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/action.t -> obj/action.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/actions.t -> obj/actions.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/actor.t -> obj/actor.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/banner.t -> obj/banner.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/console.t -> obj/console.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/disambig.t -> obj/disambig.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/events.t -> obj/events.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/exec.t -> obj/exec.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/exits.t -> obj/exits.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/extras.t -> obj/extras.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/footnote.t -> obj/footnote.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/hintsys.t -> obj/hintsys.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/input.t -> obj/input.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/lister.t -> obj/lister.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/menusys.t -> obj/menusys.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/menucon.t -> obj/menucon.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/misc.t -> obj/misc.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/modid.t -> obj/modid.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/numbers.t -> obj/numbers.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/objects.t -> obj/objects.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/output.t -> obj/output.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/parser.t -> obj/parser.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/pov.t -> obj/pov.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/precond.t -> obj/precond.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/report.t -> obj/report.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/resolver.t -> obj/resolver.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/score.t -> obj/score.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/sense.t -> obj/sense.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/settings.t -> obj/settings.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/status.t -> obj/status.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/tips.t -> obj/tips.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/thing.t -> obj/thing.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/travel.t -> obj/travel.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/verify.t -> obj/verify.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/en_us/en_us.t -> obj/en_us.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/en_us/instruct.t -> obj/instruct.t3s
	symbol_export /usr/local/share/frobtads/tads3/lib/adv3/en_us/msg_neu.t -> obj/msg_neu.t3s
	symbol_export fat_bear.t -> obj/fat_bear.t3s
	compile /usr/local/share/frobtads/tads3/lib/_main.t -> obj/_main.t3o
	compile /usr/local/share/frobtads/tads3/lib/file.t -> obj/file.t3o
	compile /usr/local/share/frobtads/tads3/lib/tok.t -> obj/tok.t3o
	compile /usr/local/share/frobtads/tads3/lib/gramprod.t -> obj/gramprod.t3o
	compile /usr/local/share/frobtads/tads3/lib/multmeth.t -> obj/multmeth.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/action.t -> obj/action.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/actions.t -> obj/actions.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/actor.t -> obj/actor.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/banner.t -> obj/banner.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/console.t -> obj/console.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/disambig.t -> obj/disambig.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/events.t -> obj/events.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/exec.t -> obj/exec.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/exits.t -> obj/exits.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/extras.t -> obj/extras.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/footnote.t -> obj/footnote.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/hintsys.t -> obj/hintsys.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/input.t -> obj/input.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/lister.t -> obj/lister.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/menusys.t -> obj/menusys.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/menucon.t -> obj/menucon.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/misc.t -> obj/misc.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/modid.t -> obj/modid.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/numbers.t -> obj/numbers.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/objects.t -> obj/objects.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/output.t -> obj/output.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/parser.t -> obj/parser.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/pov.t -> obj/pov.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/precond.t -> obj/precond.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/report.t -> obj/report.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/resolver.t -> obj/resolver.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/score.t -> obj/score.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/sense.t -> obj/sense.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/settings.t -> obj/settings.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/status.t -> obj/status.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/tips.t -> obj/tips.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/thing.t -> obj/thing.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/travel.t -> obj/travel.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/verify.t -> obj/verify.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/en_us/en_us.t -> obj/en_us.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/en_us/instruct.t -> obj/instruct.t3o
	compile /usr/local/share/frobtads/tads3/lib/adv3/en_us/msg_neu.t -> obj/msg_neu.t3o
	compile fat_bear.t -> obj/fat_bear.t3o
	link -> fat_bear.t3p
	preinit -> fat_bear.t3

Huh. That sounds like a reportable bug.

Is there some sort of filesystem permission setting that would prevent the compiler from accessing the modify time for the files in /usr/local/share?

1 Like

I suspected it was something quirky like that, but I’m know enough of an OS guru to know for sure why it can’t determine that those files haven’t been modified.

@cfmoorz2 , you’re going to want to do yourself a favor and do what I described in the PM. You don’t necessarily have to pitch the tads3/adv3 folder in /usr/local/share, but I would definitely copy it, and store it in e.g. /Users/cfmoorz/IFStuff. Then change your .t3m file like I mentioned so that the -lib and -I (include) options point to /Users/cfmoorz/IFStuff/tads3/...

You will thank yourself, if your project is destined to be anything more than trivial!!

yeah, i’ll probably try that. it’s not really an issue re: compile time (although, yes it may become an issue) but it already is a pain how all the changes crowd my github history and make it essentially unreadable.

1 Like