3rd Party Mods not running with

BlitzMax Forums/BlitzMax Programming/3rd Party Mods not running with

Richard Betson(Posted 2010) [#1]
I've compiled (makemods aka. Build Modules in IDE) some 3rd party mods and have had some interesting problems.

The demos in Chipmunk and FarSeer will not compile with Threaded Build on in the Build Otions. I get "Can't find Interface for module" error. With Threaded Build off, they compile and execute fine.

When I built these mods I had no errors.

Is it possible I have the wrong Mingw? I'm using the current installer and the latest repository.

Thanks for any help.

Edit- I've tried compiling these mod's via command line with the various flags with no change in the above. Using "Re-Build All Modules" no help either, although all of the BRL Mods seem to still function fine.

Last edited 2010

Last edited 2010


GfK(Posted 2010) [#2]
Turn on threaded mode, rebuild mods.

[edit] At least, that's how I did it in BLIde when I had the same problem.

Last edited 2010


Richard Betson(Posted 2010) [#3]
Well that sorta worked.

I did a fresh install of BMAX 1.41 and then rebuit modules with Build Option - Threaded Build and GUI Build. Now Box2d will compile Threaded Build or not, Chipmonk will now only compile Threaded Build.

It was interesting that on messing with these Build Options that bmk will rebuild all modules.

So my question now is do all modules (brl included) have to match in their build quality, for example all mod's should be compiled as Threaded Build or not. Not mixed, some compiled Threaded Build and some not.

Aside from the above I get compiler warnings on successful compiles likes this:

Warning: .drectve `-aligncomm:_stdin_,2 ' unrecognized
Warning: .drectve `-aligncomm:_stdout_,2 ' unrecognized
Warning: .drectve `-aligncomm:_stderr_,2' unrecognized
Warning: .drectve `-aligncomm:_bbGCStackTop,2 ' unrecognized
Warning: .drectve `-aligncomm:__bbusew,2' unrecognized
Warning: .drectve `-aligncomm:__bbNeedsLock,2 ' unrecognized
Warning: .drectve `-aligncomm:__bbLock,2' unrecognized


Thanks for the help,


xlsior(Posted 2010) [#4]
What happens if you try a force-rebuild from the command line?

bmk makemods -a bah.chipmunk
bmk makemods -a -h bah.chipmunk

or an entire branch:

bmk makemods -a bah
bmk makemods -a -h bah

or all modules:

bmk makemods -a
bmk makemods -a -h

The -a forces the module to recompile whether or not it thinks its necessary, the -h does the threaded build.


Richard Betson(Posted 2010) [#5]
Xlsior,

Some will compile, but ...

How do you do mods in sub-folders like Brusey's mods which are in a folder called bah.mod ? I can not remember how to do it and I've tried adding the path to the commandline (bmk -a -h c:\bmax\mod\bah.mod\chipmunk) with no compile.

@-All,

Anyone get maxmod2.mod to compile?

Thanks,

Last edited 2010


Muttley(Posted 2010) [#6]
@Richard: You do it exactly as xlsior says in his post:

bmk makemods -a bah.chipmunk
bmk makemods -a -h bah.chipmunk


Richard Betson(Posted 2010) [#7]
Muttley

edit - ok compiling... lets see what happens:)

Ok, That seems to have worked. Compiling Chipmunk Threaded Build only allows it to compile a Chipmunk demo in Threaded Build. Compiling the Chipmunk mod No Build Options (bmk makemods -a) let Chipmunk demos compile either way, Threaded Build or Non-Threaded Build.

I still get compiler warnings when compiling a demo for Chipmunk (Box2d and others even brl) in either Threaded or Non-Threaded Build. Here is the warnings for Non-Threaded Build:

Warning: .drectve `-aligncomm:_stdin_,2 ' unrecognized
Warning: .drectve `-aligncomm:_stdout_,2 ' unrecognized
Warning: .drectve `-aligncomm:_stderr_,2' unrecognized
Warning: .drectve `-aligncomm:_bbGCStackTop,2 ' unrecognized
Warning: .drectve `-aligncomm:__bbusew,2' unrecognized
Warning: .drectve `-aligncomm:__bbNeedsLock,2 ' unrecognized
Warning: .drectve `-aligncomm:__bbLock,2' unrecognized


Whats all that about?

I will try reinstalling Bmax and then recompile my third party mod's using command line and see if the errors go away.

Thanks.

Last edited 2010

Last edited 2010


ima747(Posted 2010) [#8]
You need the modules you are using compiled with threading enabled or disabled to match what you are building (threading enabled or disabled. Don't know about your environment but ind the default and CE ides you can build both threaded and non threaded and have them both available. Be sure you're rebuilding all modules as sometimes things can get out of sync if you build some threaded, some non and then try to mix or rebuild the rest...

Personally I use CE with brucy's bmk2 so I build everything threaded and non threaded for Mac(intel and ppc) and windows every time I install or modify anything (just so I won't forget later).


Richard Betson(Posted 2010) [#9]
Looks like I have it all running now with no more compiler warnings. I found it interesting that when I rebuilt all of the the BRL mod's, compiled code generated compiler warnings. It would be neat to know why this happens.

So as I understand it I need to keep the Mod's compiled as Threaded or Non-Tread . No mixing Build options within a project.

Thanks for all your help; it's been a while and BMax has grown up. :)


xlsior(Posted 2010) [#10]
So as I understand it I need to keep the Mod's compiled as Threaded or Non-Tread . No mixing Build options within a project.


IIRC that's due to the different garbage collectors used in threaded and non-threaded modes.


ima747(Posted 2010) [#11]
They do run with different GC's, there may be more internal differences as well.

You need ALL modules compiled for whatever build method (threaded or non threaded) you're using for a given project. You should be able to have all modules however compiled for both so you can switch as needed.

Assuming default IDE, I think this is what you need to do (haven't used standard in a while):
Rebuild ALL modules
Toggle threading (from on to off, or off to on)
Rebuild ALL modules
rebuild documentation (just to be sure everything is updated while you're at it)
Maybe quit and re-launch IDE if you're paranoid but it shouldn't matter.

You should then be able to build threaded or non threaded. Just remember if you change/add/possibly remove any mods you will have to rebuild modules both threaded and non threaded... and I would recommen unless you're working on the module yourself always favor rebuild all over just rebuilding the differences. I've had some really strange compiler errors or crashes etc. if modules get out of sync with each other some times.


Richard Betson(Posted 2010) [#12]
ima747,

So BMAX does not include both builds?

I will try what you have suggested.

Thanks