Jump to content
The Dark Mod Forums

my continuely updated opensource development environment

Recommended Posts

Been working on/off for more than a decade on this one.

An Msys2 CodeBlocks cross development environment with all the bells and whistles, the windows compilers were previously based on the TDM patched gcc builds but as we hit gcc-10

i ran into a snag as the compiler now defaults to hardening (ASLR / DEP) it turned out the TDM patches no longer worked (crashes and segfaults galore). As a result the compiler is now more like the standard, you can still link to the static runtimes but it requires a bit more work now. putting -static-libgcc in LDFLAGS if building with the Msys2 bash shell will link to the static gcc runtime and normally adding -static-libstdc++ would link to the static libstdc but there is a catch... libstdc is a C++ library so if you use gcc to link in features from it it will allways link to the shared library and your project will depend on both the libgcc and libstdc++ dll's. You can get around this by renaming libstdc++.dll.a to say libstdc++_s.dll.a but its a bit of a letdown. If you feel comfortable using an older gcc like 9.3.0 the TDM patched version of that still works but it has no hardening.

CodeBlocks was modified by me to support both the 32 and 64 bit mingw-w64 compilers as well as the msys2 cross compiler and also supports the mingw clang compilers.

I defaulted the windows compilers to use sjlj exceptions as sjlj exceptions are the only format compatible with msvc for linking.

The environment is huge and contains pretty much all the packages from the Msys2 mingw package database plus a few that i added myself like openjade's sgml based docbook format.

There is a ton of game related tools and libraries included like ogre irrlicht godot blender allegro SDL1 SDL2 vulkan openscenegraph etc. so it is quite a collection.

The packaged size of it is around 29GB unpackaged it expands to several hundred GB's, that should be telling :P  and i just uploaded it to sourceforge.

https://sourceforge.net/projects/cbadvanced/files/CB Msys2 Dev Environment/

lots of other things i built over the years on this site to.

  • Like 1
Link to post
Share on other sites

P.s unzip it to this path only C:\Msys64 or some tools like python might break because they rely on absolute windows paths.

You can also update the Msys2 packages from the main repository the mingw-w64 packages cannot however as they use a different exception model so are incompatible with this version and the default update path for those have been disabled. Over time i intend to have my own repository where users can update from as of now it is safest to just build and install packages locally.

There are also quite a lot of build tools like cmake meson ninja and bsd make as well as scons so it might even be possible to toy with darkmods scons build.

There is a pretty complete Qt5 build included as well as FLTK Fox gtk2 gtk3 and it is even possible to build ada gui program as the gprbuild frontend is also included.

  • Like 1
Link to post
Share on other sites
  • 2 weeks later...

And with a lot of work i actually managed to get gcc-10.2.0 building with the tdm patchset ... sheesh.

The compiler uses the last compatible binutils version without hardening so no ASLR or DEP you can still enable crt hardening but that would cause all your executables to depend on libssp ;). I use it in my ass old bootstrap compiler now which originally used gcc-7.3.0 so if youre in for a blast from the past im actually packing it up now hehe.

The neat thing with this old version is that it contains some hard to get windows versions of some not so windowy things like webkitgtk2,3 and devhelp which is a local help server intended for gimp and inkscape which is no longer buildable with msys2 since it relies on the old python2 and several other deprecated features that have since been removed. Also it contains my initial work on this dev environment with a lot of tools that where originally broken in msys2 patched and fixed.

You can use it to create packages that are linked to the static gcc runtimes and libraries created with it can even be used by visual studio :) since it uses sjlj exceptions (atleast the C based libraries can). Atm im using it to create packages for use with my current compiler (yes the one above).

This version is probably the last publicly avaliable one with dual python version support (python2.7 and 3.7) it also sports ruby ocaml an older clang and mono .NET.

The build tools have been updated so you can use meson ninja cmake and bsd make with it and they are all included.

Sadly like the previous package it is rather large :S but that is the price for a huge collection of tools and libraries, in case this is to much im also packaging the compiler linker and as many libraries as i can build as seperate packages. These can then be installed with pacman and you can pretty much construct your own version from the packages.

  • Like 1
Link to post
Share on other sites
  • 5 weeks later...

Well the old bootstrap compiler finally enabled me to port the TDM patchset for use with gcc-10.2.0 and some major changes have followed.

The TDM compiler is now a plugin to the msys2 shell in fact all compilers currently runnable with it are clang to ;).

The nice things about this is that you can pretty much build anything the standard version can with the only difference being that the TDM version defaults to linking to the static gcc runtime libraries.

The bad thing is that things using clangs libunwind will most likely barf a lot because the gcc unwinder is linked into every library so you will see multiple definition errors in those cases, though not insurmountable -> can just do LDFLAGS+=" -Wl,--allow-multiple-definition" and it will happily compile again it might cause some trouble down the road.

The full package is here -> https://sourceforge.net/projects/cbadvanced/files/Msys2 TDM final/ but i suggest waiting a bit until i get my package server online since even solid compressed it is 46GB :S so its a rather hefty download.

When the package server is online you can just get the features you want and nothing else which would be more manageable.

  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...