November 12, 2019, 11:58:58 AM

Author Topic: I am looking for complete guide how to compile wxMax  (Read 2203 times)

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #15 on: July 20, 2019, 10:34:55 AM »
Quote
Then try one of the i686-sjlj versions of MinGW-w64 from here.

The link is not working and I tried to find it manually but there are many i686-sjlj versions.
https://sourceforge.net/projects/mingw-w64/files/Multilib%20Toolchains%28Targetting%20Win32%20and%20Win64%29/vityan/

This is the problem I was discussed before. There are so many flavors of Gcc and MinGW and the instructions are so generic and not pinpoint specific.
For example you are saying to try one of the i686-sjlj which one. The site have:

MinGW-W64 GCC-8.1.0
If we assume we need only the i686 there are:
  • i686-posix-sjlj
  • i686-win32-sjlj

MinGW-W64 GCC-7.3.0
  • i686-posix-sjlj
  • i686-win32-sjlj

The same for the versions
MinGW-W64 GCC-6.4.0
MinGW-W64 GCC-5.4.0

Which among?
I tried to download and compile BlitzMax 1.52 do I will need BlitzMax 1.50?

Quote
If you have trouble with any MinGW and BMX1.50, remove all traces of MinGW from your system. This includes any paths that have been added to your Windows PATH environment variable.
So I will need to delete the BlitzMax 1.52 I compiled and Install the 1.50 and uninstall the TDM-GCC-64 version 5.1.0.

And something else:
Quote
Note that these versions will require the distribution of winpthread-1.dll, libstdc++-6.dll and libgcc_sjlj-1.dll if the GCC link option -static hasn't been passed to the compiler. You can circumvent this by adding the option -static to the g++ command line found in the LinkApp function in the file bmk_util, then recompiling BMK.
Where do I will find these dlls and there is one source file with name bmk_util.bmx it seems the option static is already set.

In the ?win32 section
Code: [Select]
?Win32

cmd=CQuote(BlitzMaxPath()+"/bin/ld.exe")

If FileType( cmd )<>FILETYPE_FILE

'New style link using g++

cmd="g++ -m32 -static -s " '<==============THIS ONE===============================

If opt_apptype="gui" cmd:+" -mwindows"

cmd:+" -o "+CQuote( path )
cmd:+" "+CQuote( "-L"+CQuote( BlitzMaxPath()+"/lib" ) )

Local xpmanifest$
For Local f$=EachIn lnk_files
Local t$=CQuote( f )
If opt_dumpbuild Or (t[..1]="-" And t[..2]<>"-l")
cmd:+" "+t
Else
If f.EndsWith( "/win32maxguiex.mod/xpmanifest.o" )
xpmanifest=t
Else
files:+" "+t
EndIf
EndIf
Next

If xpmanifest files:+" "+xpmanifest

files:+"~n-lgdi32 -lwsock32 -lwinmm -ladvapi32"
files:+" -lstdc++ -lpthread -lgcc -lmingwex -lmingw32 -lmoldname -lmsvcrt -luser32 -lkernel32"

cmd:+" @"+CQuote( tmpfile )

Else

'Old style link using bin/ld.exe

cmd:+" --oformat pei-i386"

cmd:+" -s -stack 4194304" 'symbol stripping enabled

If opt_apptype="gui" cmd:+" -subsystem windows"

If makelib cmd:+" -shared"

cmd:+" -o "+CQuote( path )
cmd:+" "+CQuote( "-L"+CQuote( BlitzMaxPath()+"/lib" ) )

If makelib
Local imp$=StripExt(path)+".a"
Local def$=StripExt(path)+".def"
If FileType( def )<>FILETYPE_FILE Throw "Cannot locate .def file"
cmd:+" "+def
cmd:+" --out-implib "+imp
files:+"~n"+CQuote( BlitzMaxPath()+"/lib/dllcrt2.o" )
Else
files:+"~n"+CQuote( BlitzMaxPath()+"/lib/crtbegin.o" )
files:+"~n"+CQuote( BlitzMaxPath()+"/lib/crt2.o" )
EndIf

'Unholy!!!!!
Local xpmanifest$
For Local f$=EachIn lnk_files
Local t$=CQuote( f )
If opt_dumpbuild Or (t[..1]="-" And t[..2]<>"-l")
cmd:+" "+t
Else
If f.EndsWith( "/win32maxguiex.mod/xpmanifest.o" )
xpmanifest=t
Else
files:+"~n"+t
EndIf
EndIf
Next

If xpmanifest files:+"~n"+xpmanifest

cmd:+" "+CQuote( tmpfile )

files:+"~n-lgdi32 -lwsock32 -lwinmm -ladvapi32"
files:+" -lstdc++ -lpthread -lgcc -lmingwex -lmingw32 -lmoldname -lmsvcrt -luser32 -lkernel32"

If Not makelib
files:+" "+CQuote( BlitzMaxPath()+"/lib/crtend.o" )
EndIf

files="INPUT("+files+")"

EndIf


Offline dawlane

  • Full Member
  • ***
  • Posts: 111
Re: I am looking for complete guide how to compile wxMax
« Reply #16 on: July 20, 2019, 10:49:22 AM »
Quote
So I will need to delete the BlitzMax 1.52 I compiled and Install the 1.50 and uninstall the TDM-GCC-64 version 5.1.0.
You should only need to remove MinGW installs.

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #17 on: July 20, 2019, 11:00:52 AM »
Ok. I will remove all my current MinGw TDM which I have including and all environment variables (Do I will need to add new environment variables?)
And I will install one random version for example the mosr recent then MinGW-W64 GCC-8.1.0
And I will download the file: i686-win32-sjlj

The first step will be just to compile the BlitzMax 1.52 the most recent with the default Pub & Brl it already have in.
I will report when the basic Language will compile and then I will add the modules. (I mean and othe modules except the wxMax only but the Koriolis, Gman zip Engine, Srs, shader framwork , ifsogui).
For now I will compile the BlitzMax only.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2567
Re: I am looking for complete guide how to compile wxMax
« Reply #18 on: July 20, 2019, 11:03:33 AM »
@ maxmods
If you use
https://github.com/maxmods/wx.mod
then your brl.mod and pub.mod should better be from
https://github.com/maxmods/pub.mod
https://github.com/maxmods/brl.mod
too.

Yes, replace the ones in "BlitzMax/mod" with them (replace! not "copy over". So remove the old brl.mod/pub.mod folders and so on).


@ MinGW
It might be a good idea to use the updated BMK
https://github.com/bmx-ng/bmk
Compile it and copy the bmk.exe (and the make.bmk, custom.bmk, core.bmk files) to your "BlitzMax/bin".

Why? Newer bmk[.exe] do not need the "PATH" to a MinGW but just search it along "BlitzMax/MinGW32" (or /MinGWx86 or /MinGWx64).
This means you also do not need to update the "BlitzMax/lib" folder (you should no longer need it afterwards) which else contains files you need to override with some MinGW-provided files (if differing of course).


Working with "BlitzMax legacy" and MinGW is a bit more of a hassle then working with "BlitzMax NG" and MinGW (especially if there is one already provided).



@ Takis
Did you even try to get the "105"-version of NG to build wx.mod (most current revision)?
Once you got this working we could try to get the other mods working.
Some 3rd party mods are already updated for NG:
https://github.com/bmx-ng

Bruceys updated modules can be found there
https://github.com/maxmods


If one fails with NG while it was updated for NG some years ago, then this is most probably a module which was not used anymore and needs some care. Same to say for wx.mod - some stuff of wxwidgets is not implemented, some stuff might not work as it looks OK codewise but has a little bug hidden or similar stuff. So while I developed a wx-application (controlling/displaying info of some pretty 5digit-expensive devices) I had some stuff not working and either I asked Brucey for help or supplied little fixes here and there on my own.
Means you _will_ see stuff not working - and _then_ you can raise an issue.

Yet you will have to try if it works.
I personally would not try to fiddle with BlitzMax legacy and wx.mod. Once you want to compile it for Linux/Mac you need a 64bit compiler anyway - else you need eg a 32bit-Linux-distro as the dependencies will bring you to sweat :)


Also "legacy" is no longer maintained by anyone. I fixed/backported some stuff we (or mostly Brucey) changed in brl.mod/pub.mod for NG but just because I compile my game (TVTower) with legacy too (just in case NG has some hidden bugs). Sooner or later nobody will care for "legacy" anymore and then you will be left alone even more than now (with our 2-3 handsful of "publically active" BlitzMax-developers).



@ dawlane
Just read your name here and there in the cerberus forums the last months but this toolkit lacks of some stuff too (least common denominator functionality) ...and case-sensitivity and IDE support and ... just the same stuff like with M2, BlitzMax ...
What are you using now?

PS: nice to see you still lurking around from time to time. And a pity you left the seemingly sinking but yet sailing around BlitzMax-ship. The more did so the less contributors are helping out in the project. Hope you still follow the activities around NG and are knowing about the newly introduced features (structs, enums, overloading, ...) and up-to-come features (like an overhauled thread-friendly reflection). Yes it need some more tools in the chain (to update stuff, to build .deb out of the project, to deploy .apk to devices ...) but without need nobody will do it. So I always try to raise interest amongst the crowd of old and experienced users who coded with BlitzMax for a reason (language/syntax, ...).


bye
Ron

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #19 on: July 20, 2019, 11:27:50 AM »
Quote
Yes, replace the ones in "BlitzMax/mod" with them (replace! not "copy over". So remove the old brl.mod/pub.mod folders and so on).

You mean, I will not delete the Brl & Pub folders completely I will just replace the the files from the new Brl & Pub over the old ones.
The new Brl & Pub files are fewer than the old one.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2567
Re: I am looking for complete guide how to compile wxMax
« Reply #20 on: July 20, 2019, 11:35:27 AM »
No - exact opposite!

remove mods/brl.mod
remove mods/pub.mod

download maxmod/pub.mod (and brl.mod), extract them to
mods/brl.mod
mods/pub.mod

this ensures that there are no "module precompilates left" leading to a mix of new and old module code.


bye
Ron

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #21 on: July 20, 2019, 11:39:24 AM »
Quote
Did you even try to get the "105"-version of NG to build wx.mod (most current revision)?
Once you got this working we could try to get the other mods working.
Some 3rd party mods are already updated for NG:
https://github.com/bmx-ng

Don't I use the BlitzMax 1.52?
I begun to compile the BlitzMax 1.52 with the i686-8.1.0-release-win32-sjlj-rt_v6-rev0

Also don't know how to compile the new BMK.
If I compile the new BlitzMax from the source (BlitMax 1.52) It presents these errors.
There are no MinGw Environment Varables was set as you said.
Type install inside the folder: C:\Blitzmax1.52\_src\win32_x86



Code: [Select]
***********************
***** STARTING UP *****
***********************
bin\bcc.exe
bin\bmk.exe
bin\docmods.exe
bin\FASM.EXE
bin\makedocs.exe
        5 file(s) copied.
lib\libunicows.a
        1 file(s) copied.
****************************
***** BUILDING MODULES *****
****************************
Compiling:blitz_app.c
Build Error: failed to compile C:/Blitzmax1.52/mod/brl.mod/blitz.mod/blitz_app.c
Compiling:blitz_app.c
Build Error: failed to compile C:/Blitzmax1.52/mod/brl.mod/blitz.mod/blitz_app.c
***************************
***** BUILDING MAXIDE *****
***************************
Compiling:maxide.bmx
Compile Error: Can't find interface for module 'brl.blitz'
[C:/Blitzmax1.52/mod/brl.mod/blitz.mod/blitz_classes.i;73;1]
Build Error: failed to compile C:/Blitzmax1.52/src/maxide/maxide.bmx************
************
***** BUILDING BMK *****
************************
        1 file(s) copied.
Compiling:bmk_config.bmx
Compile Error: Can't find interface for module 'brl.blitz'
[C:/Blitzmax1.52/mod/brl.mod/blitz.mod/blitz_classes.i;73;1]
Build Error: failed to compile C:/Blitzmax1.52/src/bmk/bmk_config.bmx***********
*************
***** BUILDING BCC *****
************************
Compiling:stdutil.cpp
Build Error: failed to compile C:/Blitzmax1.52/_src/compiler/stdutil.cpp********
*********************
***** BUILDING MAKEDOCS *****
*****************************
Compiling:docnode.bmx
Compile Error: Can't find interface for module 'brl.blitz'
[C:/Blitzmax1.52/mod/brl.mod/blitz.mod/blitz_classes.i;73;1]
Build Error: failed to compile C:/Blitzmax1.52/src/makedocs/docnode.bmx
C:\Blitzmax1.52\_src\win32_x86>

Maybe there is problem with the Pub & Brl. I replaced the new one over the old ones.



Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #22 on: July 20, 2019, 11:48:26 AM »
Quote
Did you even try to get the "105"-version of NG to build wx.mod (most current revision)?

I will try to compile the NG version of BlitzMax no 1.52
With the i686-8.1.0-release-win32-sjlj-rt_v6-rev0

Does the new BMK included?


Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #23 on: July 20, 2019, 11:56:25 AM »
Ok. Before to install the NG version of BlitzMax I will try the 1.52 with the i686-8.1.0-release-win32-sjlj-rt_v6-rev0 version of MinGw32.
I added the path of MinGw32 in my system.

I deleted the old Pub & Brl and copied the new ones.
I entered in the C:\Blitzmax1.52\_src\win32_x86\ and I typed install.
Now it compiles without errors so far.

How do I will compile the new BMK? (Or some precompiled version already exist). Is better to learn how to compile it manually.

I didn't updated the BMK I left the original one and adding the MinGw32 in the system path it compiled Pub , Brl and MaxGui.

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #24 on: July 20, 2019, 12:18:42 PM »
Step 2:
Koriolis ZipStream and IfsoGUI modules compiled.

Step 3:
Gman ZipEngine and Muttley Inifilehandler compiled.

Step 4:
Davecamp srs module compiled.

Step 5:
Shader Framework compiled.

Now is time for the wxMax
Haha the wxMax is not compiling.

Code: [Select]
►wx.wxacceleratortable was scheduled to next iteration
In file included from C:/Blitzmax1.52/mod/wx.mod/wxacceleratortable.mod/glue.cpp:23:
C:/Blitzmax1.52/mod/wx.mod/wxacceleratortable.mod/glue.h:32:10: fatal error: blitz.h: No such file or directory
 #include <blitz.h>
          ^~~~~~~~~
compilation terminated.
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxacceleratortable.mod/glue.cpp
►wx.wxactivityindicator was scheduled to next iteration
In file included from C:/Blitzmax1.52/mod/wx.mod/wxactivityindicator.mod/glue.cpp:23:
C:/Blitzmax1.52/mod/wx.mod/wxactivityindicator.mod/glue.h:31:10: fatal error: blitz.h: No such file or directory
 #include <blitz.h>
          ^~~~~~~~~
compilation terminated.
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxactivityindicator.mod/glue.cpp
►►►►wx.wxacceleratortable was not built. See error information on latest attempt.
►►►►wx.wxactivityindicator was not built. See error information on latest attempt.
.
.
.

The same error with all sub modules. So I will start over with the BlitzMax_win32_x64_0.105.3.35 with the same MinGw.



Offline Derron

  • Hero Member
  • *****
  • Posts: 2567
Re: I am looking for complete guide how to compile wxMax
« Reply #25 on: July 20, 2019, 12:53:14 PM »
replace
#include <blitz.h>

with
#include <brl.mod/blitz.mod/blitz.h>


and check if that fixes the issue.


bye
Ron

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #26 on: July 20, 2019, 01:15:37 PM »
It seems I will need to open all files one by one and fix the path of the "blitz.h" file.
This will take very long time.

Offline dawlane

  • Full Member
  • ***
  • Posts: 111
Re: I am looking for complete guide how to compile wxMax
« Reply #27 on: July 20, 2019, 01:45:53 PM »
Quote
replace
#include <blitz.h>

with
#include <brl.mod/blitz.mod/blitz.h>


and check if that fixes the issue.


bye
Ron
There are round 229 files to change.

But with a little bit of file manipulation.

Quote
It seems I will need to open all files one by one and fix the path of the "blitz.h" file.
This will take very long time.

In wx.mod/wx.mod create an empty blitz.h file and paste #include <brl.mod/blitz.mod/blitz.h> into it.
You should then be able to build the modules with having to go though editing every file.


Quote
@ dawlane
Just read your name here and there in the cerberus forums the last months but this toolkit lacks of some stuff too (least common denominator functionality) ...and case-sensitivity and IDE support and ... just the same stuff like with M2, BlitzMax ...
What are you using now?

PS: nice to see you still lurking around from time to time. And a pity you left the seemingly sinking but yet sailing around BlitzMax-ship. The more did so the less contributors are helping out in the project. Hope you still follow the activities around NG and are knowing about the newly introduced features (structs, enums, overloading, ...) and up-to-come features (like an overhauled thread-friendly reflection). Yes it need some more tools in the chain (to update stuff, to build .deb out of the project, to deploy .apk to devices ...) but without need nobody will do it. So I always try to raise interest amongst the crowd of old and experienced users who coded with BlitzMax for a reason (language/syntax, ...).

@Cerberus
I was in the process of adding some major changes to the build system, but issues with MinGW, not having an up to date Mac, having to integrate updates and trying to get a smooth working build tool working cross platform was causing me a few headaches.

@BlitzMax
There are a few things that could do with a makeover, like make methods act like properties and being able to pass parameters in a constructor.
BlitzMax may be one of those languages the could be moved over to output llvm assembler.

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #28 on: July 20, 2019, 02:08:28 PM »
I stayed and changed 229 files one by one but new error presents now :(

Code: [Select]
Secondary build iteration launched with 4 pending modules
►wx.wxaboutbox was scheduled to next iteration
Can't find inteCompile Error: Can't find interface for module 'wx.wxicon'
[C:/Blitzmax1.52/mod/wx.mod/wxaboutbox.mod/common.bmx;24;1]
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxaboutbox.mod/common.bmx
►wx.wxacceleratortable was scheduled to next iteration
Compile Error: Can't find interface for module 'wx.wxmenu'
[C:/Blitzmax1.52/mod/wx.mod/wxacceleratortable.mod/common.bmx;24;1]
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxacceleratortable.mod/common.bmx
►wx.wxactivityindicator was scheduled to next iteration
Compile Error: Can't find interface for module 'wx.wxcontrol'
[C:/Blitzmax1.52/mod/wx.mod/wxactivityindicator.mod/common.bmx;24;1]
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxactivityindicator.mod/common.bmx
►wx.wxanimation was scheduled to next iteration
Compile Error: Can't find interface for module 'wx.wximage'
[C:/Blitzmax1.52/mod/wx.mod/wxanimation.mod/common.bmx;24;1]
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxanimation.mod/common.bmx

This error appeared in all sub modules. What is missing now?


Offline Derron

  • Hero Member
  • *****
  • Posts: 2567
Re: I am looking for complete guide how to compile wxMax
« Reply #29 on: July 20, 2019, 04:22:09 PM »
@ dawlane
>and being able to pass parameters in a constructor.

This is possible with NG now

Method New(param1:int, param2:int, param3:string)

So no longer a need for "function Create:TMyType(param1:int, param2:int, param3:string)" or "method Init:TMyType(param1:int, param2:int, param3:string)".
As said, NG now supports overloading and other nifty things. Closures are still "todo".


The build tools of Cerberus/Monkey ...yes, the whole chain needs to help you when creating stuff - same to say for BlitzMax. A bit of a vicious circle (nobody does write a tool so others wont use the toolchain as it misses conveniences ... nobody out there to write tools...).



@ takis
Recompile all modules ("bmk makemods -a wx") else some cached stuff might lead to issues with not found modules while they exist. Of course make sure that eg. "wx.mod/wxicon.mod" (and the other reported ones) exist.
Also make sure not to copy new files over an existing wx.mod but replacing the whole directory.


bye
Ron