Author Topic: error compiling nightly build revision 5046  (Read 8671 times)

Offline r.stiltskin

  • Multiple posting newcomer
  • *
  • Posts: 48
error compiling nightly build revision 5046
« on: May 10, 2008, 07:07:02 pm »
After
./configure --with-contrib-plugins=all --prefix=/opt/codeblocks-svn
make failed with this error:
Code
globals.cpp: In function `FileType FileTypeOf(const wxString&)':
globals.cpp:303: error: `GetFilesGroupsAndMasks' undeclared (first use this
   function)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: error compiling nightly build revision 5046
« Reply #1 on: May 10, 2008, 07:56:45 pm »
What happens if you modify the include part of globals.cpp from:
Code
#ifndef CB_PRECOMP
    [...]
    #include "filemanager.h"
#endif
...to:
Code
#ifndef CB_PRECOMP
    [...]
    #include "filemanager.h"
    #include "projectmanager.h"
#endif
??? Does this resolve the compiler issue?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline r.stiltskin

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: error compiling nightly build revision 5046
« Reply #2 on: May 10, 2008, 09:12:47 pm »
Including projectmanager.h helped.  It's compiling now -- globals.lo compiled without error.  I'll update you when it's finished.


Offline r.stiltskin

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: error compiling nightly build revision 5046
« Reply #3 on: May 11, 2008, 04:27:44 am »
Still not out of the woods.  It got as far as lib_finder, then bailed out with a syntax error:
Code
lib_finder.cpp: In member function `void
   lib_finder::SetupTarget(CompileTargetBase*, const wxArrayString&)':
lib_finder.cpp:282: error: syntax error before `->' token
lib_finder.cpp:283: confused by earlier errors, bailing out
make[5]: *** [lib_finder.lo] Error 1
I looked at that line (in trunk/src/plugins/contrib/lib_finder/lib_finder.cpp) & the preceding one but I couldn't find the syntax error.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: error compiling nightly build revision 5046
« Reply #4 on: May 11, 2008, 07:06:14 am »
I am Guessing that it is another NON PCH build issue.

What Linux OS are you using?

Tim S

PS: I thought sdk_events.h was missing, but after I double checked it, I see no way it could cause the issue.
« Last Edit: May 11, 2008, 07:14:30 am 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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: error compiling nightly build revision 5046
« Reply #5 on: May 11, 2008, 08:58:52 am »
I am Guessing that it is another NON PCH build issue.
You are guessing right. Hopefully you can provide a patch... (as usual... ;-). One thing I figured out myself - but this lib_finder stuff...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: error compiling nightly build revision 5046
« Reply #6 on: May 11, 2008, 12:37:11 pm »
I just compiled C::B svn5046 with "--enable-pch=no" and got the first error in "global.cpp", but after adding "projectmanager.h" everything compiled fine (including all contrib-plugins).
debian sid/experimental
64-bit
gcc 4.2.3
wxWidgets 2.8.7

Offline r.stiltskin

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: error compiling nightly build revision 5046
« Reply #7 on: May 11, 2008, 03:24:08 pm »
I realized that I had inadvertently used an old compiler (gcc 3.3, which I had to use for another project).  After switching back to gcc 4.1 everything compiled, including all contrib-plugins, but when I  start code::blocks, libfinder does not load (message pops up about being built for a different version of codeblocks).

What is this non-pch issue?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: error compiling nightly build revision 5046
« Reply #8 on: May 11, 2008, 03:34:15 pm »
(message pops up about being built for a different version of codeblocks).
You should really do  a clean and re-build when you have messed around with different compiler versions (especially if the major number changes). This will most likely also resolve this conflict.

What is this non-pch issue?
We take advantage of pre-compiled header files within C::B. This improves compiling speed a lot but also often causes some laziness concerning includes. The result is a broken build with compiler not supporting PCH (like GCC 3.3) and/or if you disable PCH explicitly using "--enable-pch=no".

Search google for more info on PCH if that doesn't ring a bell.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline r.stiltskin

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: error compiling nightly build revision 5046
« Reply #9 on: May 11, 2008, 05:10:40 pm »
I did "make clean" before I compiled with gcc4.1.  Shouldn't that have taken care of these issues?

Edit: I just went into the lib_finder directory & ran "make clean" and "make" there, then re-linked everything with "make install" in the trunk directory and now libfinder does load.

I'm not very good at reading makefiles.  Does "make clean" in the top makefile not delete all the object files in the plugins directories?
« Last Edit: May 11, 2008, 05:28:47 pm by r.stiltskin »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: error compiling nightly build revision 5046
« Reply #10 on: May 11, 2008, 08:14:49 pm »
Does "make clean" in the top makefile not delete all the object files in the plugins directories?
I believe you need a make dist-clean or something, too. In any case, just removing the whole folder and do a clean checkout does work for sure. ;-)
BTW: I am not the Linux guy... probably other (Linux) devs are more wisely.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: error compiling nightly build revision 5046
« Reply #11 on: May 11, 2008, 08:48:02 pm »
I just did a "make clean" from my C::B-source root-directory. Here's a snippet of the output:
Code
Making clean in lib_finder                                                                                                   
make[4]: Entering directory `/home/jens/codeblocks-build/codeblocks-1.0svn/src/plugins/contrib/lib_finder'                   
Making clean in lib_finder                                                                                                   
make[5]: Entering directory `/home/jens/codeblocks-build/codeblocks-1.0svn/src/plugins/contrib/lib_finder/lib_finder'       
rm -rf .libs _libs                                                                                                           
rm -f *.lo                                                                                                                   
make[5]: Leaving directory `/home/jens/codeblocks-build/codeblocks-1.0svn/src/plugins/contrib/lib_finder/lib_finder'         
Making clean in .                                                                                                           
make[5]: Entering directory `/home/jens/codeblocks-build/codeblocks-1.0svn/src/plugins/contrib/lib_finder'                   
test -z "lib_finder.zip" || rm -f lib_finder.zip                                                                             
test -z "liblib_finder.la" || rm -f liblib_finder.la                                                                         
rm -f "./so_locations"                                                                                                       
rm -rf .libs _libs                                                                                                           
rm -f *.o                                                                                                                   
rm -f *.lo                                                                                                                   
make[5]: Leaving directory `/home/jens/codeblocks-build/codeblocks-1.0svn/src/plugins/contrib/lib_finder'                   
make[4]: Leaving directory `/home/jens/codeblocks-build/codeblocks-1.0svn/src/plugins/contrib/lib_finder'                   

That means it really cleans up the lib_finder sub-dirs and a look in it shows me that there are no *.so *.lo or any other object files any more.

Don't know what went wrong for you.

Offline r.stiltskin

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: error compiling nightly build revision 5046
« Reply #12 on: May 11, 2008, 09:21:37 pm »
It must have been the sequence of my actions.  First I built everything with the old compiler.  Saw that lib_finder wasn't compiled, so I re-ran configure to exclude lib_finder, recompiled & installed.  That completed successfully, but when I tried to load code::blocks, it failed to load.  That's when I realized I was using gcc3.3, so I changed my compiler links, ran "make clean", configured again to include everything, and  so on...

But when I did that first "make clean", I was configured to exclude lib_finder so I guess the makefile wouldn't have cleaned that directory.

Oh, well... I guess it doesn't really matter.  Everything seems to be working now.
« Last Edit: May 11, 2008, 09:36:24 pm by r.stiltskin »