Author Topic: [SOLVED] Problems w/ Standalone Compilation  (Read 7370 times)

0 Members and 2 Guests are viewing this topic.

Mike Lobanovsky

  • Guest
[SOLVED] Problems w/ Standalone Compilation
« on: November 22, 2014, 04:14:24 PM »
Hi Charles,

Just to keep you on your toes, the current builds of O2 cannot compile OxyScheme to a usable standalone exe; the resultant binary crashes at app start. OTOH "tiny" exes without the runtime module compile and run perfectly well.
« Last Edit: November 23, 2014, 06:56:16 AM by Mike Lobanovsky »

JRS

  • Guest
Re: Problems w/ Standalone Compilation
« Reply #1 on: November 22, 2014, 04:40:52 PM »
It's times like this when you wish the OxygenBasic project had a Git repository to fall back on.  :-[


Mike Lobanovsky

  • Guest
Re: Problems w/ Standalone Compilation
« Reply #2 on: November 22, 2014, 06:31:37 PM »
No, I didn't mean exactly that. There is not yet any O2 build that can compile OxyScheme to a usable standalone exe. (I've checked four of the most recent ones) I suspect this will be an entirely new challenge for Charles.

JRS

  • Guest
Re: Problems w/ Standalone Compilation
« Reply #3 on: November 22, 2014, 07:04:35 PM »
Quote from: Mike
There is not yet any O2 build that can compile OxyScheme to a usable standalone exe.

Oh, I got it. Still wish Charles would consider a Bitbucket version of the WIP ZIP.

Now that you're stuck and waiting for Charles, would you have time to have a peek at BASM? Check out the new forum for where I'm at with things.

Charles Pegge

  • Guest
Re: Problems w/ Standalone Compilation
« Reply #4 on: November 23, 2014, 02:47:58 AM »
Hi Mike,

Can you run it in dependent or JIT mode?

It could be a name clash.

The best way to trace intractable bugs like this, is by successive block elimination / inclusion.

I can have a go if you wish :)


Mike Lobanovsky

  • Guest
Re: Problems w/ Standalone Compilation
« Reply #5 on: November 23, 2014, 05:05:17 AM »
Yes Charles, it runs OK in both JIT-compiled and Oxygen.dll-dependent modes. It also compiles with an "Okay" message box together with the RTL32.inc module but crashes at app start.

Thanks for the tip on possible name clashes. I'll do my best to check my code against the RTL32.inc namespace.

I'm nearing the end of my work with OxyScheme at this project phase. All its intrinsic routines seem to be working well now and I'm just adding some final touches to its numeric functionality within the scope of available numeric data types. I will post the entire code shortly.

Charles Pegge

  • Guest
Re: Problems w/ Standalone Compilation
« Reply #6 on: November 23, 2014, 05:14:01 AM »
Mike,

Just in case..

This is the latest RTL32.inc (15/10/2014)



« Last Edit: November 24, 2014, 01:21:53 AM by Charles Pegge »

Mike Lobanovsky

  • Guest
Re: Problems w/ Standalone Compilation
« Reply #7 on: November 23, 2014, 06:37:42 AM »
Thanks Charles,

I'm using O2 dated November 21 and its RTL32.inc was last modified on October 15 so this must be one and the same file.

You won't believe it but the offending line was a simple debugging print hex(c) cr statement in the following piece of code:

Code: OxygenBasic
  1. ........
  2.       case 0x3B // ';' ==> bypass comments recursively altogether
  3.        c = inchar()
  4.         while ((c != 0xA) && (c != EOF)) ' '\n' or end-of-file
  5.          ' skip comments
  6. print hex(c) cr ' <== the offending statement
  7.          c = inchar()
  8.         wend
  9.         if (c == EOF) then return TOK_EOF
  10.         return token() ' call own self recursively
  11. ........

that is part of Scheme source code tokenizer which is self-recursive when eliminating LISP comments. I think this may be due to different heap or stack reserve/commit settings layout (PE Explorer shows equal settings) in gxo2.exe/exe+Oxygen.dll/standalone exe, but I'm not competent enough to verify this supposition.

Anyway all is well that ends well. :)
« Last Edit: November 23, 2014, 06:55:03 AM by Mike Lobanovsky »

JRS

  • Guest
OT - Oil Rig Floating Hotel
« Reply #8 on: November 24, 2014, 02:32:01 PM »
And you thought working on off-shore oil rigs was a tough life.


.
« Last Edit: November 24, 2014, 03:02:09 PM by John »

Mike Lobanovsky

  • Guest
Re: OT - Oil Rig Floating Hotel
« Reply #9 on: November 24, 2014, 03:22:31 PM »
How is it supposed to help me with my Problems w/ Standalone Compilation?

JRS

  • Guest
Re: OT - Oil Rig Floating Hotel
« Reply #10 on: November 24, 2014, 03:55:50 PM »
Quote
How is it supposed to help me with my Problems w/ Standalone Compilation?

You don't have to drown searching for a solution?  :P There will be a rose on your pillow when you succeed.  :)

Mike Lobanovsky

  • Guest
Re: OT - Oil Rig Floating Hotel
« Reply #11 on: November 24, 2014, 08:45:06 PM »
Exactly!

The solution is here. Now where's my bed of roses? :)

JRS

  • Guest
Re: [SOLVED] Problems w/ Standalone Compilation
« Reply #12 on: November 24, 2014, 08:49:29 PM »
Quote
The solution is here. Now where's my bed of roses?

Charles handles O2 rewards. (roses, bug fixes, encouragement, ...)   ;)

Congrats on the fine job. I'm looking forward to give it a try.

Mike Lobanovsky

  • Guest
Re: [SOLVED] Problems w/ Standalone Compilation
« Reply #13 on: November 24, 2014, 08:53:46 PM »
Charles handles O2 rewards. (roses, bug fixes, ...)

Absolutely. Char* casts in particular. Roses and thorns, that is. :)

And thanks for appreciation. :)