Author Topic: Compiling C::B using Msys2  (Read 14242 times)

Offline alle_meije

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: Compiling C::B using Msys2
« Reply #15 on: August 25, 2015, 05:13:56 pm »
Scouring all previous posts and manuals for options, I used this for building wxWidgets
Code
configure --prefix=/mingw64 \
          --enable-compat28 --enable-xrc       --enable-shared     --enable-monolithic --disable-debug \
          --enable-unicode  --enable-vendor=cb --disable-universal --enable-tooltips   --enable-dnd \
          --with-opengl \
          CFLAGS='-fno-keep-inline-dllexport' \
          CXXFLAGS='-fno-keep-inline-dllexport'

But the same DLL-related things are still causing problems even with all those options.

I have tried
Code
  cd ../wxWidgets-dev/
  make distclean
  configure --prefix=/mingw64 \
            --disable-shared --enable-static     --enable-compat28   --enable-xrc      --enable-monolithic --disable-debug \
            --enable-unicode --enable-vendor=cb  --disable-universal --enable-tooltips --enable-dnd \
            --with-opengl
  updatedb & make && make install
  cd ../codeblocks-dev/
  ./bootstrap
  ./configure --with-wx-config=`which wx-config`
  make

To see if it would work with wxWidgets compiled as a static library, but it still stops at the Annoying Dialog (same place) complaining about static members.

Out of ideas.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Compiling C::B using Msys2
« Reply #16 on: September 18, 2015, 11:59:59 pm »
I am trying to get Code::Blocks to build using MSys2 MinGW64.
It is now obvious that the exchndl DLL will need ported to MSys2; this is NOT something I plan to do.
I believe the exchndl DLL is made from drmingw sourcecode https://github.com/jrfonseca/drmingw
I plan to just fix the other items; and, then wait for someone else to port the exchndl DLL.
Or, at least wait till I learn enough of MSys2 to think it is possible for me to do it myself.

My Git location that I plan to upload the work in a few weeks
https://github.com/stahta01/msys2_codeblocks

My repo I am using to test changes; I am still learning how to use Git correctly.
I am doing a lot of forced pushes on this repo; to correct mistakes.
( I know configure/make even less than I know Git)
https://github.com/stahta01/codeblocks_windows

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Compiling C::B using Msys2
« Reply #17 on: September 19, 2015, 10:42:49 am »
There is a 64-bit version of exchndl.dll in cb repo, doesn't that work for you? I use it for my 64-bit builds.

Btw, I've ported all the required project, workspace and update files to 64-bit wx2.8 for my own usage, I can pack them and upload them somewhere if that helps.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Compiling C::B using Msys2
« Reply #18 on: September 19, 2015, 01:09:31 pm »
There is a 64-bit version of exchndl.dll in cb repo, doesn't that work for you? I use it for my 64-bit builds.

Btw, I've ported all the required project, workspace and update files to 64-bit wx2.8 for my own usage, I can pack them and upload them somewhere if that helps.

MSys2 does NOT use MINGW64 built in startup code for its internal built apps.
So, I am guessing the 64-bit version of exchndl.dll in cb repo will NOT work as a native MSys2 app.
My first idea was to just create a Windows 64 bit apps modified to work with MSys2 and that way the
64-bit version of exchndl.dll in cb repo should work.

I just wanted to get the configure/make method of building to work under MSys2 and in my view
that will require 64-bit version of exchndl.dll compiled to work as native MSys2 dll.
The work to do this correctly using the correct MSys2 packaging is way beyond the effort I wish to put in.

But, I now need to decide how to fix the Squirrel libs for DLL export issues.
(I am trying to build the CB SDK without using the linker export all option; I think its a bad design choice.)
FYI: I figured out how to export the Mgr Template in case that is wanted by someone.

Tim S.
« Last Edit: September 19, 2015, 01:11:09 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Compiling C::B using Msys2
« Reply #19 on: September 19, 2015, 11:27:03 pm »
Ok, my bad.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Compiling C::B using Msys2
« Reply #20 on: September 20, 2015, 01:06:41 am »
Ok, my bad.

No it was a good idea, I am trying to compile it right now using that way.
But, it is a bad idea in that it is very likely the crash reporting routine will crash instead of reporting a error correctly.

Found out I will need to port the console runner to MSys2; and I think that is something within my knowledge and abilities.

I have an issue getting some core plugins to link because of tinyXML link errors; but, I decided to just ignore those plugins for now.
(The Compiler Plugin compiles without any errors; and, that is the most important plugin to me.)

I am hoping the starter of this thread will do the work of porting exchndl.dll to the MSys2 environment.
If not, I plan to try my changes under CygWin64 and see if they work there.

Edit: Found this package mingw-w64-x86_64-drmingw-0.7.4-2; so, I do NOT need to worry about porting drmingw to MSys2's mingw-w64-x86_64. Note: I am NOT certain if porting is the right word; might just be a minor recompile with linking to the correct object files.
But, I am a newbie on using MSys2 and did NOT wish to do something that might be risky.

Tim S.
« Last Edit: September 20, 2015, 10:11:23 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline alle_meije

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: Compiling C::B using Msys2
« Reply #21 on: October 16, 2015, 11:49:31 am »
Sorry for letting this thread get old. Must admit these names mean nothing to me.
But still, I'll give it a go if it means being able to have C::B in Msys2!

It looks like a 64-bit version was compiled before?
http://forums.codeblocks.org/index.php/topic,18902.msg129510.html#msg129510
« Last Edit: October 16, 2015, 12:52:20 pm by alle_meije »

Offline alle_meije

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: Compiling C::B using Msys2
« Reply #22 on: October 16, 2015, 02:01:49 pm »
I have compiled https://github.com/jrfonseca/drmingw in Msys2, which includes a exchndl DLL.

In Msys2 64-bit I did
Code
git clone https://github.com/jrfonseca/drmingw.git
cd drmingw/
mkdir build
cd build
cmake .. -G "MSYS Makefiles"
make

which produces a DLL file bin/exchndl.dll that I'm more than happy to share.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Compiling C::B using Msys2
« Reply #23 on: October 16, 2015, 03:30:26 pm »
@ alle_meije:
I am building CB Under MSys2 using the DrMinGW and wxWidgets Msys2's MinGW64 packages.

Still have NOT fixed all the bugs; but, I can build CB using Configure/Make method.
I have NOT spent enough time to see if the resulting Code::Blocks is useful for doing anything.

I have changed to trying to build CB using CB Projects for now; then, I plan to merge the two methods.
After, that I plan to test the resulting binaries for usefulness.

I have NO idea what would be the proper location in MSYS2 to store the CB config file; do you have a suggestion?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Compiling C::B using Msys2
« Reply #24 on: October 18, 2015, 01:41:24 am »
The combined changes I did to get Configure/Make method to work under MSys2
https://github.com/stahta01/cb_misc/blob/master/Patches/Git-am/MSys2/2015-10-16_MSys2_changes.patch

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Compiling C::B using Msys2
« Reply #25 on: October 29, 2015, 03:20:41 am »
I have decided to stop work on trying to build Code::Blocks under MSys2 using configure/make decided it was NOT the real problem.

Decided the real problem is making the normal Windows built binary to work better with the Compiler and Libraries from an MSys2 installation.

Likely need to add use of the command "cygpath" in the compiler.

This means I would likely need to edit the Cygwin GCC Compiler code to use it.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org