Author Topic: macOS Catalina build  (Read 6165 times)

Offline Inskipp

  • Multiple posting newcomer
  • *
  • Posts: 13
macOS Catalina build
« on: November 11, 2020, 08:41:50 pm »
Hi guys,

I used to use Code::Blocks a lot on Linux years ago (I created in house tools using wxWidgets so CB was an obvious choice).
Now I'm trying to build Code::Blocks on my Mac and I ran into an issue related to squirrel (if I'm not mistaken), but I'm not familiar with it at all (or the CB codebase in large, to be honest).

The error pops up at line 995 (using the compressed codeblocks-20.03.tar.xz) and it's:

Code
../../../src/src/main.cpp:955:21: note: in instantiation of function template specialization 'SqPlus::SQClassDef<MainFrame>::func<bool (MainFrame::*)(const wxString &, bool)>'
      requested here
                    func(&MainFrame::Open, "Open");

Does anybody have a quick tip to where to look before I start to dig into the code?

Thanks in advance,
Inskipp

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: macOS Catalina build
« Reply #1 on: November 11, 2020, 09:04:24 pm »
Can you post the actual error?
What version of wxWidgets are you using?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Inskipp

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: macOS Catalina build
« Reply #2 on: November 11, 2020, 09:46:01 pm »
Hi,

I think that's the actual error... Here's a little bit more context though:

Code
In file included from ../../../src/src/main.cpp:12:
In file included from ../../../src/src/app.h:33:
In file included from ../../../src/src/main.h:23:
In file included from ../../../src/include/scripting/bindings/sc_base_types.h:27:
../../../src/include/scripting/sqplus/sqplus.h:1760:51: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
    RegisterInstance(v,newClass.GetObjectHandle(),*(TClassType *)0,pfunc,name_);
                                                  ^~~~~~~~~~~~~~~~
../../../src/src/main.cpp:955:21: note: in instantiation of function template specialization 'SqPlus::SQClassDef<MainFrame>::func<bool (MainFrame::*)(const wxString &, bool)>'
      requested here
                    func(&MainFrame::Open, "Open");
                    ^
4 warnings and 1 error generated.
make[3]: *** [main.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

I'm using wxWidgets-3.1.4

Cheers,
Inskipp

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: macOS Catalina build
« Reply #3 on: November 12, 2020, 12:54:56 am »
Nope this is one of the 4 warnings. Find the error. Search for the "error: " string.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Inskipp

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: macOS Catalina build
« Reply #4 on: November 12, 2020, 01:32:20 am »
Hi,

Yeah, you're right. I hate working in the terminal, that's why I need CB :-)

Here's the real error:

Code
../../../src/src/main.cpp:2681:22: error: calling a private constructor of class 'wxPaintEvent'
        wxPaintEvent e;

Thanks,
Inskipp

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: macOS Catalina build
« Reply #5 on: November 12, 2020, 05:38:56 am »
Hi,

Yeah, you're right. I hate working in the terminal, that's why I need CB :-)

Here's the real error:

Code
../../../src/src/main.cpp:2681:22: error: calling a private constructor of class 'wxPaintEvent'
        wxPaintEvent e;

Thanks,
Inskipp

If I recall correctly, that error has already been fixed in SVN, so either build using the current CB trunk or use an earlier wxWidgets version.
Or patch the version of CB to use the fix CB SVN trunk.

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 Inskipp

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: macOS Catalina build
« Reply #6 on: November 12, 2020, 10:17:53 pm »
Hi,

Yep, I've managed to get this and another error fixed, but now I'm running into an issue with directorymonitor.cpp....

Code
../../../../../src/plugins/contrib/FileManager/directorymonitor.cpp:29:10: fatal error: 'fam.h' file not found
#include <fam.h> //USES EITHER GAMIN OR FAM (IDENTICAL FILE MONITORING APIS)

Both (FAM and GAMIN) looks like Linux specific tools... :-/

Any ideas?

Thanks in advance,
Inskipp

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: macOS Catalina build
« Reply #7 on: November 12, 2020, 11:48:13 pm »
--with-contrib-plugins=all,-FileManager when doing configure.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Inskipp

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: macOS Catalina build
« Reply #8 on: November 13, 2020, 03:12:25 am »
Thanks!

How can I disable multiple plugins?
I tried several variations and the configuration help doesn't really help in this case.

Thanks in advance,
Inskipp

Offline Inskipp

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: macOS Catalina build
« Reply #9 on: November 13, 2020, 06:21:28 am »
Hi,

So, I figured it out and fixed a few more errors, and eventually I've managed to build and install it.
However, after launching codeblocks (the raw binary), the CB's main window is active and responsive, but the menu becomes completely unresponsive, even the system menu.
If I switch to another application and the return to CB, the menu is working.
Has anybody seen this issue?



Thanks,
Inskipp


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: macOS Catalina build
« Reply #10 on: November 13, 2020, 10:48:16 am »
Have you run the bundle script. BTW there are night builds for macOS in the night build forum. Have you tried them?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Inskipp

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: macOS Catalina build
« Reply #11 on: November 13, 2020, 05:44:23 pm »
Thanks, I missed that section.

Cheers,
Inskipp