brl and pub module updates

BlitzMax Forums/Brucey's Modules/brl and pub module updates

Brucey(Posted 2013) [#1]
Since the official BRL and PUB modules where re-licenced to zlib/libpng, it gives us the opportunity to update/improve/fix and then release them back to the community.

I've set up git repositories here, that I will be updating over time. Initially I will be updating the various libraries (libpng, etc) to their latest versions, some of which are sadly quite dated now.

There are potential security issues with using old image libraries (buffer over/underflows, etc) - although if your simply use it to load images for your game and are not intending accessing 3rd-party images, then of course it's something you shouldn't need to worry about.

And of course, if there are useful tweaks we can apply in general to the modules, I'm all for moving them forward as such.


xlsior(Posted 2013) [#2]
Interesting indeed.

I noticed that you have the bah.mod and wx.mod also listed on github there -- is that your 'official' repository now, or is the google code one still the primary?


Brucey(Posted 2013) [#3]
is that your 'official' repository now .. ?

bah and wx mods there are currently just mirrors of the SVN versions on googlecode, and are sync'd hourly to the repositories. I'll probably add qt and bmk_ng at some point too.

I still haven't found a likeable place to host downloads as yet, and may end up having to do it myself again.


Derron(Posted 2013) [#4]
Nice idea - maybe this is a nice way to apply the most important bugfixes provided in the bug-section.

Odd that this topic is just shown "now" to me - last visit 1 hour ago said "last post in bruceys forum 1 day ago".

edit: for binaries - couldn't you do something like a "binaries repo" ? tagging the binaries individually should enable "downloads" (without dl counter).

bye
Ron


degac(Posted 2013) [#5]
Ok, my silly daily question...

I've noticed there are BRL and PUB modules... they are ALL the original BRL modules+your fixed I suppose.
What are the modules you fixed/changed?
And of course will be nice to know what you fixed (at least in BRL and PUB modules).

PS: many thanks for your work!


Grisu(Posted 2013) [#6]
Thanks for your efforts!

A simple download option and public change log would be nice.


Derron(Posted 2013) [#7]
changelog -> watch the commits done (if there are some).
For general "improvements" every comitter should be able to push a new readme.md to change it when changes are merged by authorized users.


bye
Ron


Brucey(Posted 2013) [#8]
if there are some

I'm sure there will be.


Derron(Posted 2013) [#9]
Instead of the history.md brucey created, one could also do something like:

https://coderwall.com/p/5cv5lg


maybe this is of interest for brucey (concerning binary downloads - and the thing I described as "tagging")

http://stackoverflow.com/questions/14916492/publish-a-project-release-binary-source-packages-on-github/14916525#14916525


bye
Ron


Brucey(Posted 2013) [#10]
Yes, releases work for a full repository, but I can't see how you might release a subset of that - for example the individual modules in bah.mod.

I created history.md because other projects did on github. Seemed like a reasonable idea. And it's just a case of updating it as other things get changed.

I still need to pad out the readme properly.


Derron(Posted 2013) [#11]
According to
https://github.com/blog/1547-release-your-software

you should be able to create "releases" with manually added binaries. So you could add a release named
bah.mod.XYZ.1.0
XYZ is the name of the module, 1.0 the version

This adds a bit of clutter in the release list - but just for people thinking of releases being "full packages".

I dont know if the downloads then contain: custom files + full source package.


Another nice thing:
http://git-scm.com/book/en/Git-Tools-Submodules

So you can use other git-controlled libraries without having them "statically" linked. Useful if you do not patch their files but just want to use the most current one.

Maybe this can be used as: each module is a repository, the "module collector" (aka "bah.mod") then just submodules all of its child modules.
So you can release full packages with "bah.mod" and single packages with "bah.mod.xyz.mod".

I know that might make things more complicated - but I did not try it yet so may be that is an option to test out if it is needful.



bye
Ron


LT(Posted 2013) [#12]
I'm curious about the status of the MaxGui module. If I'm understanding correctly, the change to the Pub and Brl modules' licenses means I am free to distribute a dll that uses their functions. But what if I'm making use of MaxGui - albeit minimally?

Any ideas?


Grisu(Posted 2014) [#13]
I tried to update the png module and get a compilation error:

In file included from C:/BlitzMax/mod/pub.mod/libpng.mod/png.c:14:0:
C:/BlitzMax/mod/pub.mod/libpng.mod/pngpriv.h:810:4: error: #error ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
 #  error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
    ^
Build Error: failed to compile C:/BlitzMax/mod/pub.mod/libpng.mod/png.c


I deleted the original module folders to make sure there are no old files. - Any ideas how to make this work?


Brucey(Posted 2014) [#14]
I tried to update the png module and get a compilation error

Did you update only the png module?

The idea is that you take all the modules together, not just one or two. Some modules rely on others to work, and several modules have been updated.

Or you can try to get each of them individually and hope you get all the right ones.
You'll need pub.zlib too, if you want to do it that way.
Good luck ;-)

<edit>
... and... you'll need brl.pngloader.

Which is why it's more simple just to grab everything and use that :-)


xlsior(Posted 2014) [#15]
Downloaded pub.mod and brl.mod, everything seems to compile OK so far.
(After updating axe.oggsaver to point to the updated OGg Vorbis includes)


Grisu(Posted 2014) [#16]
It felt greedy to grab everything. But after doing so, everything works again. Lesson learned for life. ;) Thanks Brucey!


degac(Posted 2014) [#17]
@Derron: I've found 'latest commit link'... as I said it was my stupid question of the day.

In any case big thanks to Brucey to 'keep' BlitzMax


Grisu(Posted 2014) [#18]
Sorry to bump this topic up again.:(

Bruce, what version of MinGW do you use while making the modules?

I'm getting a strange error message when I try to compile some bmx examples, such as:
Building .createwindow
Compiling:.createwindow.bmx
flat assembler  version 1.71.16  (1048576 kilobytes memory)
3 passes, 2904 bytes.
Linking:.createwindow.exe
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x355): undefined reference to `__umoddi3'
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x377): undefined reference to `__udivdi3'
Build Error: Failed to link C:/BlitzMax/tmp/.createwindow.exe
Process complete


P.S.: PRP code works fine though... ;)

|Edit|
Recompiling all modules works but at the very end I get the following error message:



xlsior(Posted 2014) [#19]
Bruce, what version of MinGW do you use while making the modules?



IIRC Brucey uses TDM 4.7.1


Derron(Posted 2014) [#20]
@xlsior: You remember correctly, we recently had this discussion (for reporting that bcc-crash-bug).


bye
Ron


Brucey(Posted 2014) [#21]
C:/BlitzMax/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x355): undefined reference to `__umoddi3'


Again, it looks like you have a broken install of MinGW somehow.

I'm always surprised how much trouble people have getting this working correctly.

Usually, I can do this and it all *just works* :

1 * Unzip BlitzMax
2 * Install MinGW TDM 4.7.1
3 * Tweak Derron (or xlsior's script to set the correct MinGW name)
4 * Run the script (which copies .a files to BlitzMax/lib and .exe files to BlitzMax/bin)

Optionally set MINGW in PATH to point to the base folder of the MinGW install.

That tends to always work for me, and can be done in a few minutes.

When people have problems it usually relates to a problem with step 4 (which results in a mix of files between those which BlitzMax ships with, and the MinGW you have installed).


Derron(Posted 2014) [#22]

3 * Tweak Derron (or xlsior's script to set the correct MinGW name)



Are you sure about the way you set the brackets ? :D I am not tweakable.


If you use libsound (-ldsound) you will have to copy that small libsound.a file from the minGW install too.

My script just tries to copy files which already exist in the blitzmax dir (to avoid getting overpopulation in that directories :D).


bye
Ron


Grisu(Posted 2014) [#23]
@Derron: Where can I get your script?

I've tried it multiple times with MinGW 4.8.1 & MinGW 4.7.1. As soon I replace the mod folders. It get's messed up somehow. Probably, I'm just to dumb.


Derron(Posted 2014) [#24]
Just follow the last posts in
http://www.blitzmax.com/Community/posts.php?topic=87257

Just CTRL-F to:
"Thought ImaginaryHuman was an old hand concerning BlitzMax."


bye
Ron


Brucey(Posted 2014) [#25]
I noticed there was a build issue with oggvorbis on Linux (missing header), so I updated to the latest ogg and vorbis while I was fixing it - libogg 1.3.1 and libvorbis 1.3.4.


Grisu(Posted 2014) [#26]
What version of MaxGUIEx are you using?
This might be the cause of the compiler issues.