wxMax help

BlitzMax Forums/Brucey's Modules/wxMax help

TaskMaster(Posted 2013) [#1]
I can't seem to get any of the wxMax apps to compile.

I get errors pertaining to sjlj, but I do not know how to correct it. I realize after reading here that it has something to do with MingW.

I am running Windows XP, MingW 5.1.3, the latest Blitzmax, and I grabbed the latest wxMax from your googlecodes repository.

Thanks for any help.


xlsior(Posted 2013) [#2]
Couple of things to check:

1) Did you overwrite the ar.exe and ld.exe in the blitzmax\bin folder with those that came with your MinGW install?
2) In the blitzmax\lib folder you'll find a bunch of libraries. Overwrite these with the identical libraries from your minGW/lib installation
3) Recompile all of the blitzmax modules: you can't mix & match different MinGW versions, and it's likely that some of the existing mods where compiled with a different version than the one you are using right now.


Brucey(Posted 2013) [#3]
Any time you see sjlj errors, it's because one thing has been compiled with MinGW A, and another with MinGW B.

The current binaries in wxMax SVN were built with TDM's GCC 4.7.0 MinGW, because it was one version of MinGW I found to work okay with all of my modules. (you would think all the different versions of MinGW get you the same final product, but surprisingly they each appear to have different quirks :-( ... )

http://tdm-gcc.tdragon.net/

In theory TDM 4.7.1 should would work correctly too (being of the same main version number), but I haven't tried it yet.


TaskMaster(Posted 2013) [#4]
Brucey,

Do you happen to have a script that builds the individual mods in the right order? The dependencies have to be built in order. I use BLIde to build, so I select them all, and most of them fail the first pass, then hit build again, and more of them compile, the again, etc. It takes like 5 passes to get them all.

Thanks.


Brucey(Posted 2013) [#5]
Which mods? The wx.mod mods?

BMK knows how to build them in the correct order. It has a basic dependencies understanding, so always builds the required modules first.

Blide should really know how to do this too?


xlsior(Posted 2013) [#6]
I normally start with brl.mod and pub.mod, and then do the rest alphabetically...


Brucey(Posted 2013) [#7]
I have to say I've never bothered about order, as the build system has always managed it for me - which is what I expect.

For example, I might do this :
bmk makemods -a wx

which will re-build all of the wxMax modules. It will also build any other dependent modules (brl, pub etc) if it thinks it needs to.


TaskMaster(Posted 2013) [#8]
So, bmk chases down the dependencies and builds them in order? If that is the case, I will start using that instead of ziggy's module builder in BLIde.

I followed xlsior's instructions in his first post:

Copied over the ar.exe and ld.exe from Mingw\bin.
Copied over the libs from Mingw/lib
Recompiled everything

I wiped out my wxMax directory and rechecked out the source code, so that I know I recompiled it all with the same MingW version.

Now, when I tried to compile one of the samples I got an error that says:

C:\BlitzMax\mod\wx.mod\samples\help>c:\blitzmax\bin\bmk makeapp help.bmx
Compiling:help.bmx
flat assembler version 1.69.14 (1444077 kilobytes memory)
4 passes, 46924 bytes.
Linking:help.exe
c:/blitzmax/bin/ld.exe: cannot find -lgcc
Build Error: Failed to link C:/BlitzMax/mod/wx.mod/samples/help/help.exe


What is -lgcc? Do I have some sort of version problem still?


TaskMaster(Posted 2013) [#9]
Double post...


xlsior(Posted 2013) [#10]
It doesn't always work though -- I've come across instances where if I leave BMK to its own resources it will fail, but if you manually compile them in a different order everything works fine. :-?


TaskMaster(Posted 2013) [#11]
But should it work?

Brucey, in your opinion, should this work?

1> Fresh Install of BlitzMax
2> Fresh install of MingW 5.1.3
3> Fresh checkout of the latest wxMax
4> Compile all modules

I am wondering if there is some special bmk needed, or do those ld.exe amd ar.exe need to be copied? The libs xlsior pointed out?

What is a proper fresh install of an environment that should be able to compile wxMax look like?

I wrote an app here at work that I have found a bug in and know how to fix it, but I cannot recompile my wxMax app. Just need help getting past this, it is driving me crazy.


Brucey(Posted 2013) [#12]
I would recommend this :

1> Fresh Install of BlitzMax
2> Fresh install of (http://tdm-gcc.tdragon.net/download) tdm-gcc-4.7.1-2 sjlj exe
3> Fresh checkout of the latest wxMax
4> Compile all modules

Note that the latest wxMax has a couple of API changes concerning sub menus, and item texts in various places. This is in line with wxWidgets API changes from wx 2.9.1 to current.

Also, it might be a good idea to try out xlsior's batch file for overwriting files with the compatible release :
@echo off
copy c:\mingw\bin\ar.exe c:\code\blitzmax\bin /Y
copy c:\mingw\bin\ld.exe c:\code\blitzmax\bin /Y
dir c:\code\blitzmax\lib /b | awk "{print \"copy \\\"c:\\mingw\\lib\\\\\"$0 \"\\\" c:\\code\\blitzmax\\lib\"}" > copylibs.bat
dir c:\code\blitzmax\lib /b | awk "{print \"copy \\\"c:\\mingw\\lib\\gcc\\mingw32\\4.7.1\\\\\"$0 \"\\\" c:\\code\\blitzmax\\lib\"}" >> copylibs.bat
call copylibs.bat

Note you will need to change paths to suit. So, wherever you see C:\mingw should be the path to the MinGW you are using. And also the path to BlitzMax needs to match for your installation too. And the gcc numbered folder (4.7.1 in the above text) should match whichever number is in your actual mingw install.

You'll also need an "awk" derivative of some kind. From somewhere such as http://gnuwin32.sourceforge.net/packages/gawk.htm
AWK is a rather cool script language :-)


Derron(Posted 2013) [#13]
Just to hop in...

@echo off
@set dirMinGW=c:\mingw
@set minGWVersionString=4.4.1
@set dirBlitzmax=c:\coding\BlitzMax

copy %dirMinGW%\bin\ar.exe %dirBlitzmax%\bin /Y
copy %dirMinGW%\bin\ld.exe %dirBlitzmax%\bin /Y

for /f "delims=" %%i in ('dir %dirBlitzmax%\lib /b') do (
copy "%dirMinGW%\lib\%%i" "%dirBlitzmax%\lib\%%i" /z /y
copy "%dirMinGW%\lib\gcc\mingw32\%minGWVersionString%\%%i" "%dirBlitzmax%\lib\%%i" /z /y
)


Will do the same: without the temporary file "copylibs.bat" (although you could pipe the "copy..."-lines to such a file ("> copylibs.bat").
Hey - and it does not need awk.
You could also use "for /R" or other params to directly loop through file lists.
Another advantage is: you will only config the mingw/blitzmax paths once.
edit: the params (/z and /y) are used to remove confirmation and add the possibility to copy over network shares with less hassles.

bye
Ron.


Henri(Posted 2013) [#14]
Hello all,

I just had little experimentation with different MinGW-versions and found out that Nuwen release works well with default modules and many Bruceys modules, except with those that contain library files (compiled with SILJ-version I presume ?) like WXMax. So to get them working you need SILJ-version so that library files inside module folder don't clash with the ones inside MinGW-folder.
Just for fun I also wrote a little program to get those needed files (and only those files) from MinGW-folder -link-.

-Henri


Derron(Posted 2013) [#15]
@Henri: in the case of only working with the mingw directory you could skip "fileType"-checks and use filenames for dots - but only in the case you like performance (filetype has an huge impact on windows OS... had some directories (with about 100k files) and loading took way too much seconds while linux did it in 90ms... replacing filetype with a pattern based approach (i know the structure of the directory) reduced windows loading time to ~2-300ms for 100k files).

Also a "bat"-file will be easier to adjust for different versions. But as we all did that things as programming excercise it wont matter at all :D


bye
Ron.


Henri(Posted 2013) [#16]
Hello Derron,

thanks for input. Did not know that filetype would cause performance hit, although in this case it does not matter really. What I wrote has some intelligence behind it as it scans your Blitzmax lib folder to get a list of those files that are only needed and also it does not matter where or what version MinGW you have. And I think bat-files are bit cold:-)

-Henri


Derron(Posted 2013) [#17]
Bat files wont trigger your antivirus-tool in special cases :D
Bat files are easier to adjust.

Exe files are hmm exe files which are doing things an external user just have to find out with running the app.

The "intelligence" behind it could be also achieved using methods for batch files (so check listA for existence of items in listB and only copy the resulting list, get the version string using a dir-command and a pipe). But we better keep that thread free of a "bat vs exe" war.

For your exe: you could even integrate a run of "bmk -makemods -a" so it rebuilds all modules after such a "lib synchronization". Just for convenience :D.


bye
Ron


Henri(Posted 2013) [#18]
You are right of course. No war here :-)

-Henri


TaskMaster(Posted 2013) [#19]
Thanks guys.

Stepping through this now. Recompiling wxMax will take a while, but I will report the results when I finish.

I appreciate all of the responses.


ziggy(Posted 2013) [#20]
Just to let you know next BLIde version will be able to build the selected modules in the right order, the same as you would do with bmk.


Brucey(Posted 2013) [#21]
next BLIde version will be able to build the selected modules in the right order, the same as you would do with bmk.

Yay! ;-)


TaskMaster(Posted 2013) [#22]
Finally back and compiling.

I used the mingw link from this thread, and the batch file posted for moving the libs and ar.exe and ld.exe around. Recompiled everything and finally got back up and running. I am sure the issue was mingw incompatibilities.

I appreciate all of the help.


Brucey(Posted 2013) [#23]
I am sure the issue was mingw incompatibilities.

It usually is, unfortunately...


Russell(Posted 2013) [#24]
Well, I guess I'm just destined to never use wx, because I followed Brucey's recommended steps above, recompiled all modules (they all compiled with no errors) but the 'Aboutbox.bmx' example gives the usual (for me) 8 trillion lines of errors:
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.text+0x20): undefined reference to `__gxx_personality_sj0'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.text+0x48): undefined reference to `_Unwind_SjLj_Register'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_frame.o):xh_frame.cpp:(.text+0xe0): undefined reference to `_Unwind_SjLj_Unregister'
. . . etc.

Just a comment: Is these error messages supposed to actually make any sense to anyone other than the original programmers? I mean, 'undefined reference to '_Unwind_SjLj_Unregister'? Seriously? Come on, brainiacs, we're not all quantum physicists!

Well, I think I'm done with wx. More trouble than it's worth to get working. Sorry. Thanks for the contribution, though, Brucey.

Russell


Derron(Posted 2013) [#25]
It just says:

It does not know a certain function. In this case it also mentions, that it wants "SjLj"-Debuggingstyle (ShortJumpLongJump).

Maybe you have chosen the wrong GCC-compilation (with Dwarf-Debugging).


bye
Ron


Brucey(Posted 2013) [#26]
Well, when(ever) 2.9.5 is released, I may do library builds using the two varieties of MinGW, which would cover both camps.


Russell(Posted 2013) [#27]
Sorry for the overall tone of my post above: I had just spent over an hour trying to get it to work to no avail, and I was just irked that it should even *BE* that much of a pain to get to work properly. (Although getting it to work on Linux, for me, is even worse).

Why can't the BMax distro just include ALL of the GCC etc files it needs so that these sorts of problems will go away? I'm pretty sure the license allows this. And/Or why not facilitate - within BMax - the download and installation of the correct files for module compiling? Seems like this would solve a lot of problems!

@Derron: "It does not know a certain function. In this case it also mentions, that it wants "SjLj"-Debuggingstyle (ShortJumpLongJump)."
I was hoping for a more useful error message, like: "You must use version XX.XX or later to compile this". etc.
I guess it's better than the old DOS days, when an error message would be something like "Error 422. Please Reboot". But it still leaves a lot to be desired...

Russell


Russell(Posted 2013) [#28]
Well, with a calm head and fresh start I decided to give it another go, only this time I downloaded gawk and ran Brucey's script to move all of the files necessary (instead of doing it by hand) and, lo and behold... IT WORKED! I rebuilt all modules BEFORE running the script, but didn't run it after (didn't dare mess up a working installation). Would this mess things up or what? It shouldn't, I know, but the way things have gone in the past...who knows?

Russell


Russell(Posted 2013) [#29]
Ok, so I thought "Hey, wx seems to work, why not try some other Brucey modules?"

All of them compiled except:
raptor.mod
flickcurl.mod
magick.mod (I've NEVER successfully compiled this one)
raknet

Tried some examples: Box2d examples all work! Cairo module compiles, but pretty much all of the examples error with something like:
C:/BlitzMax/mod/bah.mod/cairo.mod/cairo.debug.win32.x86.a(cairo-traps-compositor.c.debug.win32.x86.o):cairo-traps-compositor.c:(.text+0x2db2): undefined reference to `_cairo_tristrip_extents'

CEGUI mostly works, although the 'test01' example has an unhandled exception, saying it can't find the dejaVu10 font (although I can see it in the source folder, so don't know what's wrong there).

All of the freeimage examples work. YAY!

The libtcod example reports:
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x44b): undefined reference to `__umoddi3'
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x46f): undefined reference to `__udivdi3'

No hurry on getting this one to work, though.

LibTheora works! Yahoo!

So, anyway, I can breath a (for the time being!) sigh of relief. The mods that don't work are no big deal for me (although getting the cairo examples to work would be nice).

Thanks all!

Russell


xlsior(Posted 2013) [#30]
Ok, so I thought "Hey, wx seems to work, why not try some other Brucey modules?"

All of them compiled except:
raptor.mod
flickcurl.mod
magick.mod (I've NEVER successfully compiled this one)
raknet



raptor.mod and flickcurl.mod compile without errors for me, but magick.mod and raknet.mod have both been broken for a long time (unfortunately). Windows 7 x64, gcc version 4.7.1 (tdm-1).


Brucey(Posted 2013) [#31]
undefined reference to `_cairo_tristrip_extents'

Crumbs! A missing import. Funny I didn't get the error when running the examples... meh.


Russell(Posted 2013) [#32]
Only a guru like Brucey could make any sense out of `_cairo_tristrip_extents'... ;)

Hopefully it's not too difficult to remedy?

Russell

p.s. Thanks, everyone, for the help getting this to (mostly) work. To be honest, I'm not even sure what some of those bah.mods even do (raptor, sparkle, curses, just to name a few). But it's still nice to know they're there just in case.


Brucey(Posted 2013) [#33]
I'm not even sure what some of those bah.mods even do

Me neither! I'm just a mod-generating robot! :-p

[/quote]Hopefully it's not too difficult to remedy?[/quote]
No worries. Had to add one Import line. Should be good to go (from SVN) now.


FYI, "undefined reference to" means that something in a program is expecting to find a function of a particular name, but it doesn't exist once all of the binary parts of the program are linked together (whether it be from bmx, C, or shared libraries). Then it's just a case of working out where it is, and how to get it into the final program build.


Derron(Posted 2013) [#34]

Me neither! I'm just a mod-generating robot! :-p

[./quote]Hopefully it's not too difficult to remedy?[./quote]



Liar!1!!1 Robots won't make quoting mistakes :D.

So as we have recognized you as a human being I kindly ask for further help. Concerning compilation of the whole library on my 64bit debian based linux.

Compiling:wxfilehistory.bmx
flat assembler  version 1.68  (32768 kilobytes memory)
3 passes, 11460 bytes.
Archiving:wxfilehistory.debug.linux.x86.a
ar: creating /BLITZMAXPATH/mod/wx.mod/wxfilehistory.mod/wxfilehistory.debug.linux.x86.a
Compiling:glue.cpp
In file included from /BLITZMAXPATH/mod/wx.mod/include/wx/chartype.h:69:0,
                 from /BLITZMAXPATH/mod/wx.mod/include/wx/debug.h:20,
                 from /BLITZMAXPATH/mod/wx.mod/include/wx/defs.h:628,
                 from /BLITZMAXPATH/mod/wx.mod/include/wx/wx.h:15,
                 from /BLITZMAXPATH/mod/wx.mod/wx.mod/wxglue.h:26,
                 from /BLITZMAXPATH/mod/wx.mod/wxfontpickerctrl.mod/glue.h:23,
                 from /BLITZMAXPATH/mod/wx.mod/wxfontpickerctrl.mod/glue.cpp:23:
/usr/include/wchar.h: In function ‘wint_t btowc(int)’:
/usr/include/wchar.h:387:15: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccQbPiBd.out file, please attach this to your bugreport.
Build Error: failed to compile /BLITZMAXPATH/mod/wx.mod/wxfontpickerctrl.mod/glue.cpp

And other presents I got nicely packaged from my console when trying to compile the wxmax.mod folder (current svn revision as of yesterday).

Seems my gcc-libs are not the way bmk makemods wxmax.mod wants it.

Ideas?

bye
Ron

PS: sorry for kidnapping the thread, but the title "wxmax help" was general enough for me to jump in.


Brucey(Posted 2013) [#35]
That looks like a bug with gcc :-)

btw, do you really have a dir in root called BLITZMAXPATH?


Russell(Posted 2013) [#36]
btw, do you really have a dir in root called BLITZMAXPATH?

I was thinking the same thing!

Cairo's working great again! Thanks, for all of your help with EVERYTHING, Brucey. Where would this community be without superstars like you and Simon and others (you know who you are!)? I only wish I could contribute something useful, but, alas, my C/C++ programming skills are virtually nil (or Null, as some might say ;)). I was a wiz at Simon's Basic back in the good old C-64 days, though, I swear!

Anyway, thanks again.

Russell

p.s. Magick.mod looks like it could be very useful, especially when used in conjunction with FreeImage.mod and Cairo.mod. Is this still being actively developed? Can it be made to compile with the latest version of MinGW?


Derron(Posted 2013) [#37]
No, I just shortened the path as I wanted to avoid too long lines in the code-panel (which would look ugly on lower desktop resolutions)


@Bug:
So what to do? Weeks ago, I had other compile errors with wxmax (some of them - like unknown references to function calls I got rid of) but this one is new to me.

Edit: ok, did a
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7

-> so gcc -v is now "4.6.4" (was "4.6.3" before).

./bmk makemods -a wx
run without errors.

Samples compilation now blames the "default" things: missing libraries.
./bmk makeapp -t gui -r -x "/BLITZMAXPATH/mod/wx.mod/samples/aui.bmx" (im Verzeichnis: /BLITZMAXPATH/bin)
Compiling:aui.bmx
flat assembler  version 1.68  (32768 kilobytes memory)
4 passes, 71686 bytes.
Linking:aui
/usr/bin/ld: cannot find -lgdk-x11-2.0
/usr/bin/ld: cannot find -latk-1.0
/usr/bin/ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/ld: cannot find -lpango-1.0
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lgmodule-2.0
/usr/bin/ld: cannot find -lgthread-2.0
/usr/bin/ld: cannot find -lglib-2.0
/usr/bin/ld: cannot find -lSM
/usr/bin/ld: cannot find -lgtk-x11-2.0
/usr/bin/ld: cannot find -lwebkitgtk-1.0
/usr/bin/ld: cannot find -ltiff
/usr/bin/ld: cannot find -ljpeg
/usr/bin/ld: cannot find -lpangocairo-1.0
/usr/bin/ld: cannot find -lcairo
/usr/bin/ld: cannot find -lexpat
collect2: ld returned 1 exit status
Build Error: Failed to link /BLITZMAXPATH/mod/wx.mod/samples/aui
Kompilierung fehlgeschlagen.


Some of them can get installed with multiarch/:i386-param, others need work I did not get in my head yet.

@Brucey: some "ln -s"-magic ideas?
What about the libwebkit-thingy? (see the "new IDE"-thread), it is externally referenced by compilations, so if you send your app to another 64bit-user, they will have to do the same things like you to make it run.


edit 2:
Ok, this time i got all files softlinked
su
ln -s /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0 /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so
ln -s /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0 /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so
ln -s /usr/lib/i386-linux-gnu/libatk-1.0.so.0 /usr/lib/i386-linux-gnu/libatk-1.0.so
ln -s /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0 /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so
ln -s /usr/lib/i386-linux-gnu/libpango-1.0.so.0 /usr/lib/i386-linux-gnu/libpango-1.0.so
ln -s /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 /usr/lib/i386-linux-gnu/libgobject-2.0.so

ln -s /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0 /usr/lib/i386-linux-gnu/libgmodule-2.0.so
ln -s /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 /usr/lib/i386-linux-gnu/libgthread-2.0.so
ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /lib/i386-linux-gnu/libglib-2.0.so
ln -s /usr/lib/i386-linux-gnu/libSM.so.6 /usr/lib/i386-linux-gnu/libSM.so
ln -s /usr/lib/libwebkitgtk-1.0.so.0 /usr/lib/libwebkitgtk-1.0.so
ln -s /usr/lib/i386-linux-gnu/libtiff.so.4 /usr/lib/i386-linux-gnu/libtiff.so
ln -s /usr/lib/i386-linux-gnu/libjpeg.so.8 /usr/lib/i386-linux-gnu/libjpeg.so
ln -s /usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0 /usr/lib/i386-linux-gnu/libpangocairo-1.0.so
ln -s /usr/lib/i386-linux-gnu/libcairo.so.2 /usr/lib/i386-linux-gnu/libcairo.so
ln -s /lib/i386-linux-gnu/libexpat.so.1 /lib/i386-linux-gnu/libexpat.so
exit


But one error stays even if the most simple sample app:
./bmk makeapp -t gui -r -x "/BLITZMAXPATH/mod/wx.mod/samples/aboutbox.bmx" (im Verzeichnis: /BLITZMAXPATH/bin)
Compiling:aboutbox.bmx
flat assembler  version 1.68  (32768 kilobytes memory)
3 passes, 20644 bytes.
Linking:aboutbox
/usr/bin/ld: skipping incompatible /usr/lib/libwebkitgtk-1.0.so when searching for -lwebkitgtk-1.0
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libwebkitgtk-1.0.so when searching for -lwebkitgtk-1.0
/usr/bin/ld: skipping incompatible /usr/lib/libwebkitgtk-1.0.so when searching for -lwebkitgtk-1.0
/usr/bin/ld: cannot find -lwebkitgtk-1.0
collect2: ld returned 1 exit status
Build Error: Failed to link /BLITZMAXPATH/mod/wx.mod/samples/aboutbox
Kompilierung fehlgeschlagen.


Why does wxFrame/wxAboutBox need webkitgtk?

Edit3:
Question about libwebkitgtk stays but i got rid of it:
1.) Download libwebkitgtk-1.0-0_1.10.2-0ubuntu0.12.10.1_i386.deb
2.) Extract that file and change into the directory
3.) copy the files:
sudo cp libwebkitgtk-1.0.so.0* /usr/lib/i386-linux-gnu/

4.) generate the symbolic link:
sudo ln -s /usr/lib/i386-linux-gnu/libwebkitgtk-1.0.so.0 /usr/lib/i386-linux-gnu/libwebkitgtk-1.0.so

Afterwards wx-applications were compileable. But... the libwebkitgtk-1.0.so relies on other libs which are not existing, that is why "indevIDE" (prebuilt) is not runnable:
./indevIDE
./indevIDE: error while loading shared libraries: libjavascriptcoregtk-1.0.so.0: wrong ELF class: ELFCLASS64


Which means - other libraries would have to get included too.

This left me kind of puzzled - I am not able to use "libwebgtk" (errors about missing libs/unknown functions) but able to compile things which do not implicitely use libwebgtk but require it for compilation...

bye
Ron


Armitage 1982(Posted 2013) [#38]
Just popping in to say that latest svn wxMax (05-06-2013) with fresh install of BlitzMax 1.48 (Windows) and TDM MinGW (tdm64-gcc-4.7.1-3) with the help of Derron's bat file on Windows 8 64bits is working great :)

I also rebuild my first game Metagolf ( http://www.metagolf.net ) with that MinGW and everything seems to work fine.
As a reminder the game was using several of your modules (box2d, cegui, freeimage, libxml, locale, regex) as well as some others like Odd2d.
I simply make sure to exclude the official brl\jpgloader.mod & brl\pngloader.mod modules to avoid conflict with bah.freeimage.

Hope all this can help someone ;)


sebas76(Posted 2013) [#39]
I have just tried to move to last svn wxmax (rev 808) but i can't compile example or my own project.

I have made all right (i hope) :
- fresh install of TDM MinGW (4.7.1-3),
- fresh bmax install
- copying the all libs in right folder, rebuild all modules.

All modules are built fine but when I try to compile "xrcdemo.bmx", I get a lot of linking error like this :
...
Linking:xrcdemo.debug.exe
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_collpane.o):xh_collpane.cpp:(.text+0x20): undefined reference to `__gxx_personality_sj0'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_collpane.o):xh_collpane.cpp:(.text+0x48): undefined reference to `_Unwind_SjLj_Register'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_collpane.o):xh_collpane.cpp:(.text+0x103): undefined reference to `_Unwind_SjLj_Unregister'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_collpane.o):xh_collpane.cpp:(.text+0x23a): undefined reference to `_Unwind_SjLj_Resume'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_collpane.o):xh_collpane.cpp:(.text+0x24c): undefined reference to `__gxx_personality_sj0'
C:/BlitzMax/mod/wx.mod/wx.mod/../lib/win32/libwxmsw29u_xrc.a(xrclib_xh_collpane.o):xh_collpane.cpp:(.text+0x26e): undefined reference to `_Unwind_SjLj_Register
....

With a previous version of wxmax and mingw all works fine...
I haven't found any solution for the moment.
Thanks for your help.


Brucey(Posted 2013) [#40]
The libs haven't changed for a while.

The only reason you'll get that error is if :
1) you aren't using an sjlj MinGW
2) you are using an sjlj MinGW, but you didn't copy the libs, ar.exe and ld.exe into the BlitzMax folders.
3) either of the 1 or 2.


sebas76(Posted 2013) [#41]
Thank Brucey, in fact i'm not installing the sjlj mingw. Sorry...

But now, I have compiled my current project that ran fine before.

I get runtime error:

First with the command :
Local wi:wxIcon = New wxIcon
wi.createfromfile("icon.png", wxBITMAP_TYPE_PNG)

I get EXCEPTION_ACCESS_VIOLATION in wxicon.bmx
Line 148 : Return bmx_wxicon_loadfile(wxObjectPtr, str, kind)

Secondly with XRC, i get
XRC error : unknown font family "default"

Very strange, because all works fine before ?


Brucey(Posted 2013) [#42]
You need to do :
Local wi:wxIcon = New wxIcon.Create()

The Create() method creates an instance of the real wxIcon object which we are wrapping in BlitzMax.


sebas76(Posted 2013) [#43]
I need that

Local wi:wxIcon = New wxIcon.Create()
wi.loadfile("icon.png", wxBITMAP_TYPE_PNG)

but same bug : ->
I get EXCEPTION_ACCESS_VIOLATION in wxicon.bmx
Line 148 : Return bmx_wxicon_loadfile(wxObjectPtr, str, kind)

if i replace it with a ico file :
wi.loadfile("icon.ico", wxBITMAP_TYPE_ICO)
it works without bug, so the problem is with PNG file.
Of course, i have init handler before in oninit method with
wxImage.AddHandler(New wxPNGHandler).

Something has change in new version of wxmax because before it works fine before.
Same thing for XRC, because it doesn't read the flage font default in xrc file ?


UNZ(Posted 2013) [#44]
This code example works for me


BTW: I would use .png images instead .ico files because .ico is windows only (I think)


Brucey(Posted 2013) [#45]
it works without bug, so the problem is with PNG file.

Maybe you aren't using Framework, and are including the Pub.LibPNG module by default?
There is a potential for two libpng libraries to be loaded in this case, and since both use the same function names, it can cause a mix up with which functions are actually called, and may lead to crashes.
I've worked out a way to avoid this by prefixing libpng functions with different names, but it's not currently in the wxMax build as I am waiting for 2.9.5 to be released before pushing any new major changes into wxMax.


sebas76(Posted 2013) [#46]
ok,I will wait for next release for this problem. How I can specified the libPNG to use ?

But my major problem is with XRC, now all my file generated with wxformbuilder containing a wxdialog makes XRC error : unknown font family "default". Wxmax doesn't reconize the flag "default" in font description as previous.
Is there a way to avoid this ?
Thank


sebas76(Posted 2013) [#47]
My problem with XRC :
All my file generated with wxformbuilder makes XRC error : unknown font family "default".
Wxmax doesn't reconize the flag "default" in font description as previous version.

Is there a way to avoid this ?
If I can modify the code to avoid this,it will be very good !

Thank


Brucey(Posted 2013) [#48]
I'm not sure if the latest release has the fix yet, but there was a patch for wxFormBuilder recently which specifically addresses this issue.

You may be able to fix your current xrc files by removing any family elements with a value of default.


sebas76(Posted 2013) [#49]
Yes it is the problem. thanks. I can't compile the patch...
But I have found the error in the code :
https://github.com/wxWidgets/wxWidgets/blob/master/src/xrc/xmlres.cpp
in method :
wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent)
{
...
Line 2268
bool hasFamily = HasParam(wxT("family"));
if (hasFamily)
{
wxString family = GetParamValue(wxT("family"));
if (family == wxT("decorative")) ifamily = wxDECORATIVE;
else if (family == wxT("roman")) ifamily = wxROMAN;
else if (family == wxT("script")) ifamily = wxSCRIPT;
else if (family == wxT("swiss")) ifamily = wxSWISS;
else if (family == wxT("modern")) ifamily = wxMODERN;
else if (family == wxT("teletype")) ifamily = wxTELETYPE;
else
{
ReportParamError
(
param,
wxString::Format("unknown font family \"%s\"", family)
);
}
}

I'd like to find this source in wxmax ,but I didn't find it, where is the file xmlres.cpp in wxmax ?

thank a lot.


Brucey(Posted 2013) [#50]
I'd like to find this source in wxmax ,but I didn't find it, where is the file xmlres.cpp in wxmax ?

It is not in wxMax, it is part of the wxWidgets compiled libraries. It was a change made to 2.9.x of wxWidgets, which is why wxFormBuilder had to fix their code to support the change.


sebas76(Posted 2013) [#51]
Ok, thank.
So I need to compile wxformbuilder.


Brucey(Posted 2013) [#52]
If the very latest release version of wxFormBuilder doesn't have the fix, then yes, probably.


sebas76(Posted 2013) [#53]
No the latest release haven't it...


sebas76(Posted 2013) [#54]
I didn't find wxformbuilder source file so I compiled the wxwidget lib 2.9.4 and copy the lib files generated by mingw in wxmax lib folder but it doesn't work because there are multiple definition of method.

Which version of wxwidget you use for wxmax ?


Brucey(Posted 2013) [#55]
An svn build after the 2.9.4 release.

They are meant to be releasing 2.9.5 soon (next week?), so I will be trying to update everything once that is done.


Can't you just hack the generated xrc files to remove the "family" elements that use "default" as the family?


UNZ(Posted 2013) [#56]
Hello world,

I just switched to an ssd and updated to kubuntu 13.10.
I already did a lot of apt-get and BlitzMax works very well again.
But two things remain with wxMax.

1. theme

I get a "Unable to locate theme engine in module_path" message and the gui appearance is kind of poor.
So I did
sudo apt-get install gtk-engines-oxygen:i386
and this works for the examples (like the aui example) but when I try to run indevIDE it says:
(indevIDE.debug:18597): GLib-WARNING **: unknown option bit(s) set
(indevIDE.debug:18597): GLib-CRITICAL **: g_regex_match_full: assertion 'regex != NULL' failed
and crahses. But this did not happen before!
So I removed the pagacke again and everything is back to ugly but functional. Anyone knows what this is? (I like pretty and functional more, you know :) )

2. libwebkitgtk

I have pretty much the same problem as Derron:
"cannot find -lwebkitgtk-1.0"
But running
sudo apt-get install libwebkitgtk-1.0:i386
returns

Which is about libs that have impossible dependencies.

Is there any solution to this?
Would it be different in wxWidgets 3.0?

thx


Derron(Posted 2013) [#57]
Welcome to my world (non correctable packages etc.).


instead of "oxygen" did you try a different theme?

Think some more than just you are having problems with gtk2-apps running with oxygen. So this seems related to the poor support of gtk2 within the oxygen package (it is more likely to support gtk3).


bye
Ron


UNZ(Posted 2013) [#58]
Changing the theme was a surprisingly easy solution.

But libwebkitgtk is irritating. Anyway the wxWidgets website says:
We plan to release 3.0.0 around November 10th, 2013

and
3.0 release is a culmination of several years of work since 2.8 and so brings many important improvements compared to the old stable series, such as much better and simpler to use support for Unicode, the new wxOSX/Cocoa port, suitable for development of 64 bit GUI applications under OS X, and support for GTK+ 3 in wxGTK port, [...]


So if Brucey keeps his promise to update wxMax there is hope.
And in Brucey we trust ^^

EDIT:
wxWidgets 3.0.0 is out. Just wanted to say...


Chalky(Posted 2014) [#59]
I am seriously struggling here...

I have:

1. Downloaded/installed tdm-gcc-4.7.1-2.exe from tdm-gcc.tdragon.net/download
2. Downloaded the latest SVN version of wxMax
3. Rebuilt all modules
4. Run Derron's script to copy required files from MinGW32/bin|lib into BlitzMax/bin|lib

This built all modules without errors, but resulted with a shedload of:

[snip]: undefined reference to '_Unwind_SjLj_Register'
[snip]: undefined reference to '_Unwind_SjLj_Unregister'
[snip]: undefined reference to '_Unwind_SjLj_Resume'
etc.

whenever I try to compile any of the wxMax examples (all my non-wxMax projects compile/run fine).

So I uninstalled/reinstalled MinGW, BlitzMax (1.4.8) & all 3rd party modules and tried again - with the same errors when compiling wxMax examples.

Is this because I have installed the wrong version of MinGW? If so - where can I find the correct one?


Henri(Posted 2014) [#60]
Hello,

did you download the silj-version ?

-Henri


Chalky(Posted 2014) [#61]
I'm guessing not as the errors all reference silj. However, I couldn't seem to find one which explicitly mentioned it - would silj be part of the installer's exe name?


Henri(Posted 2014) [#62]
Try getting the gcc-4.8.1-tdm-2-core.zip package from download page which is silj only. Standard package comes with both versions nowadays so that might be confusing

-Henri


Brucey(Posted 2014) [#63]
The one from here should do it : http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1006.0/

By default, TDM uses sjlj, and you generally have to go out of your way to use the other one.
The only thing I can think is that your MinGW is not setup correctly.
Do you have another version of it installed already, and is it on your PATH? (which could cause some problems if the wrong ar or ld programs are used).
Also check in your BlitzMax/bin dir that the ar.exe and ld.exe are in fact the ones from TDM (that the script should have copied over).


Chalky(Posted 2014) [#64]
Hi Brucey.

That's the one I'm using - I don't have another version installed, and it is in my PATH. I have now manually copied the libs and exes to be absolutely certain the correct ones are being used - and spent another 45 minutes waiting for all modules to rebuild, but the error remains: all projects other than wxMax ones compile fine, wxMax ones fall over with an SJLJ error.
I have spent almost 15 hours now trying to get this to work. I have clearly done something wrong - but cannot spend any more time trying to work out what.

Thanks for everyone's help.


UNZ(Posted 2014) [#65]
I made some notes the last time I installed MinGW. Maybe they're helpful:

It is not really necessary to copy every file in step 4 and 5 but I'm always to lazy to check which are needed^^

Good Luck!


Chalky(Posted 2014) [#66]
Well, I have just finished uninstalling everything and starting again from scratch. I had clearly managed to screw something up previously, because it is now working despite me following [almost] the same procedure. The only deviation I made this time was to copy all lib files (thanks UNZ) instead of using the script (which must mean that when I manually copied the required ones before I missed one [or more]).

The working wxMax BlitzMax installation has now been copied to an external drive - I don't want to have to do that again!