Author Topic: Error when compiling C::B svn 13356 with msys2/gcc  (Read 6910 times)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Error when compiling C::B svn 13356 with msys2/gcc
« on: September 18, 2023, 01:21:55 pm »
When I compile C::B svn 13356 with last g++ version form msys2 on windows (version 13.2.0), I obtain this error :
Code
compiler.o:compiler.cpp:(.rdata$_ZTV8Compiler[_ZTV8Compiler]+0x230)||undefined reference to `Compiler::CheckForWarningsAndErrors(wxString const&, long&, wxString&)'|
||error: ld returned 1 exit status|
probably in relation with modifications introduced in svn 13355 in compiler.h and advancedcompileroptionsdlg.cpp.
I tried a full rebuild.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #1 on: September 18, 2023, 05:17:22 pm »
Looks like the modified compiler.cpp with the new overload for CheckForWarningsAndErrors() was not commited.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #2 on: September 19, 2023, 07:33:23 pm »
@MortenMacFly, can you take a look?. Thank you.

Offline blauzahn

  • Almost regular
  • **
  • Posts: 161
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #3 on: September 21, 2023, 07:21:19 am »
I have the same problem on Linux x86_64.

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #4 on: September 21, 2023, 11:01:24 am »
is this a showstopper for the CB release this year?

Offline blauzahn

  • Almost regular
  • **
  • Posts: 161
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #5 on: September 21, 2023, 11:06:13 am »
Quote
is this a showstopper for the CB release this year?

No. It is very likely, that just the modified compiler.cpp was missing in the commit, like Miguel Gimenez already stated.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #6 on: September 21, 2023, 06:50:54 pm »
I also cannot compile head.
Code
.objs32_64\sdk\compiler.o:compiler.cpp:(.rdata$_ZTV8Compiler[_ZTV8Compiler]+0x230): undefined reference to `Compiler::CheckForWarningsAndErrors(wxString const&, long&, wxString&)'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 54 second(s))
2 error(s), 17 warning(s) (0 minute(s), 54 second(s))
 


Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #7 on: September 21, 2023, 11:50:28 pm »
I send morten an email, and hopefully he will fix this soon.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #8 on: September 25, 2023, 02:24:52 am »
Morten has fixed the issue.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline blauzahn

  • Almost regular
  • **
  • Posts: 161
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #9 on: September 25, 2023, 06:58:16 am »
Also on Linux, cb compiles again with the fix made in svn 13360. Thank you.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: Error when compiling C::B svn 13356 with msys2/gcc
« Reply #10 on: September 25, 2023, 11:49:43 am »
It's OK now. Many thanks.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).