Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Trying to get Jabbernaut to compile in CodeWarrior 6  (Read 7952 times)

Knezzen

  • Staff Member
  • 1024 MB
  • ******
  • Posts: 1264
  • Pro Tools Addict!
    • Macintosh Garden
Trying to get Jabbernaut to compile in CodeWarrior 6
« on: April 06, 2022, 03:38:00 AM »

Hi!

I'm stuck with this project. Instead of trying to build my own Jabber/XMPP client using Realbasic, I thought I'd try to resurrect Jabbernaut (http://jabbernaut.sourceforge.net/) from the dead. Got the sources from the original developer, but I can't seem to get them to compile using CW6. I'm probably doing something odd configuration wise in the project.

Would anyone with a bit more CodeWarrior experience want to give it a go to try to see where the problem lays?
Sources can be found here: http://cornica.org/Jabbernaut.zip

Thanks a lot!
Logged
Pro Tools addict and staff member at Mac OS 9 Lives!, System 7 Today and Macintosh Garden.

Bolkonskij

  • Staff Member
  • 256 MB
  • *****
  • Posts: 298
    • Cornica.org
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #1 on: April 06, 2022, 09:10:08 AM »

Getting an enhanced Jabbernaut Jabber client for Mac OS 9 would be plain awesome. Modern Instant Messaging meeting Mac OS :-)

I hope someone with good Code Warrior know how can help Knezzen out and get this project going?
Logged

Knezzen

  • Staff Member
  • 1024 MB
  • ******
  • Posts: 1264
  • Pro Tools Addict!
    • Macintosh Garden
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #2 on: April 06, 2022, 09:12:48 AM »

Indeed! Would be awesome to be able to use Jabbernaut together with the Macintosh Garden IM Gateway!
http://macintoshgarden.org/forum/official-im-gateway-classic-macs
Logged
Pro Tools addict and staff member at Mac OS 9 Lives!, System 7 Today and Macintosh Garden.

cluster_fsck

  • 8 MB
  • **
  • Posts: 9
  • New Member
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #3 on: May 31, 2022, 05:05:21 AM »

I’ve been diving deep back into classic Mac OS development, so will download the source and give it a go this week. My current project is attempting a fix at a thorny timing bug in SheepShaver’s Time Manager patches, so if I can make some positive progress on that I’ll bop over to this. Sounds like a fun challenge! I may try to bring it up in CW 8.3 tho.
Logged

Jubadub

  • 256 MB
  • *****
  • Posts: 452
  • There is no Mac in OS X
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #4 on: February 29, 2024, 12:02:55 AM »

Bumping this, sounds really cool. I assume this hasn't moved forward since April 2022?

If so, I will try to keep this one in mind, and give my copy of CW 6 a spin sometime. Although if Knez couldn't do it then, probably neither will I, since I'm also not all that used to CW myself either.

Maybe someone else with actual experience can also try?
Logged

Jubadub

  • 256 MB
  • *****
  • Posts: 452
  • There is no Mac in OS X
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #5 on: March 03, 2024, 06:55:49 AM »

OK, now I saw the equivalent System 7 Today thread: http://system7today.com/forums/index.php?topic=3532.0

Nick Lauland's journey reports are fascinating to read!
Logged

Knezzen

  • Staff Member
  • 1024 MB
  • ******
  • Posts: 1264
  • Pro Tools Addict!
    • Macintosh Garden
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #6 on: March 03, 2024, 07:43:06 AM »

Yes indeed they are! He seems to be moving along quite nicely. I hope he doesn't give up though :D
Logged
Pro Tools addict and staff member at Mac OS 9 Lives!, System 7 Today and Macintosh Garden.

laulandn

  • 4 MB
  • **
  • Posts: 5
  • New Member
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #7 on: April 22, 2024, 10:43:28 PM »

"Jabbernaut for m68k new attempts"
https://system7today.com/forums/index.php?topic=3802.msg16829;topicseen#msg16829

I plan to add notes about all the mistakes I made in the first attempt, and how I, in many cases very haphazardly, solved them...at some point...

----

The main key was the fact that CodeWarrior, like pretty much all Mac compilers, has a feature that compilers on pretty much every other platform don't have: Recursive include file directories.

Open any project in CodeWarrior and go to the project settings and then "Access Paths".  Look at the directories and for each line you'll see a checkmark, a little folder kinda icon, what it is relative to ("Project", "Compiler", etc) and finally the actual path.

I had absolutely no idea that the little folder kinda icon was a button!  And what it does is toggle if that particular directory is searched recursively or not.  I've used CodeWarrior since it came out and I never knew that.  I'd never ever clicked on it.  I thought it was just saying "This is a folder" or "This folder exists", etc.

----

This very rarely has any effect...in fact, it only does when you have two include files with the same name...in different directories...and one (or both) of them is (are) in subdirectories inside that folder.  If you're coding right, you have unique filenames for each include file whenever humanly possible.

...but...it can happen...and it does happen with GUSI.  (Grand Unified Socket Interface...I think).  It is a package of functions for Macs that implements something closely resembling the standard Berkley Unix socket api...and other functions that are needed to do this.  This was extremely useful for porting software for the Mac.

The thing that had me pulling my hair out, and barking up many wrong trees, were two (or more?) files named "time.h".  Most Mac C libraries do NOT include a "sys" folder with, among other things, "sys/time.h".  Look in the source of a lot of software that originated on *nix and you'll see #include <sys/time.h>

Many Mac compilers DO have a time.h, they just don't put it in a subdirectory called "sys".

I was getting very strange compiler errors revolving around GUSI's sys/time.h and CodeWarrior's time.h...in fact, sys/time.h INCLUDES time.h!  So...cutting to the chase, if you use GUSI in a CodeWarrior project and you have that little "recursive include file directory" icon turned on for the GUSI headers, just about no matter what you do, you end up with a circular reference. 

Most well written headers have something like #ifndef MYNAME_H" "#define MYNAME_H", then their actual content, and finally an "#endif".  By doing this, they ensure their content is only included once, regardless of how many times they are included.

So...with the "recursive include file directory" trick, if you have something like that, you'll see it saying it can't find definitions...if the header DOESN'T have the "#ifndef MYNAME_H", you instead get warnings/errors that things are being redefined.  Either way, if you don't know that somehow something like sys/foo.h, if it has #include <foo.h> in it, ends up including ITSELF, you will go crazy like I did.

----

The other key, and less irritating, is that CodeWarrior will ignore the path files had when you added them to a project the first time...and find them AGAIN, going just by the name (ignoring the path), every time you make changes to the "Access Paths".  So if you carefully dragged "time.h" from the GUSI folder to the project...then removed the GUSI folder from your "Access Paths" (or reordered things), the "time.h" you see in the project will be SOME OTHER file with that name...the first one CodeWarrior can find looking through all the directories...blah blah blah blah.  You can imagine how this bit me, before I saw it doing it, and my carefully constructed project file contents changing before my eyes...

With Jabbernaut, this was happening because the "Zoop" folder contained several different versions of the MacZoop framework.  They were all there because it wasn't clear which one was needed for which Jabbernaut project file.  So, when trying to build it, you could end up having a source file that is part of one version of Zoop including a Zoop header from a different version, etc etc.  Until I figured out that the only Jabbernaut build that actually worked used Zoop 2.5, and removed all the other versions and optional add ons from the "Zoop" folder, things were very confusing.

----

I will spare you how I FINALLY completely accidentally figured those out, because, as you can plainly see, I am EXTREMELY VERBOSE. 

I planned on posting the above explanation to system7today, but am trying to pace myself because I know, when I am in the right mood, I can end up completely dominating conversations, and driving everyone slightly(?) crazy.  And the last thing I want is to make system7today (or anywhere else) into a "laulandtoday" ego echo chamber.

I probably shouldn't speak unless spoken to...eh?

I'm going to shut up now!

« Last Edit: April 22, 2024, 10:54:13 PM by laulandn »
Logged

laulandn

  • 4 MB
  • **
  • Posts: 5
  • New Member
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #8 on: April 23, 2024, 07:32:13 AM »

I think I need to cut down on the caffeine.
Logged

Knezzen

  • Staff Member
  • 1024 MB
  • ******
  • Posts: 1264
  • Pro Tools Addict!
    • Macintosh Garden
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #9 on: April 23, 2024, 08:51:51 AM »

I think I need to cut down on the caffeine.

Never! Great write up, lauland! :)
Logged
Pro Tools addict and staff member at Mac OS 9 Lives!, System 7 Today and Macintosh Garden.

Jubadub

  • 256 MB
  • *****
  • Posts: 452
  • There is no Mac in OS X
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #10 on: April 24, 2024, 10:37:45 PM »

It's great to have you here in Mac OS 9 Lives, as well, @laulandn! :D
Logged

Phlogios

  • 16 MB
  • ***
  • Posts: 17
  • New Member
Re: Trying to get Jabbernaut to compile in CodeWarrior 6
« Reply #11 on: April 25, 2024, 10:26:10 PM »

Thank you for the explanation, laulandn! Do not try to pace yourself, let loose your chaotic brain on the forum. If people are not interested they will just read other threads. There are many nerds that share your interests here.
Logged
Pages: [1]   Go Up

Recent Topics