Author Topic: Building CodeBlock  (Read 7842 times)

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Building CodeBlock
« on: August 20, 2007, 07:13:12 pm »
After building the codeblock successfully, I execute it. Then I try to open a .cbp file using the new executable. It says "Deactivating the compiler plugin is most unwise. If you intend to open a project, you have to re-activate the compiler plugin first".

I also tried enable compiler from Plugins->Manage Plugins. But it does not show me any options for enabling compiler. Please suggest me something to fix this.


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Building CodeBlock
« Reply #1 on: August 20, 2007, 07:26:49 pm »
Compile the plugins, too, not just the application. And then run update.bat.
You should do that anyway, or it will crash soon enough when you open a dialog.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Building CodeBlock
« Reply #2 on: August 20, 2007, 08:16:16 pm »
I am building the whole project. What do you mean by compile plugins too? Isnt the plugins included in CodeBlock.cbp?

I am running update.bat too.

This is the build log

WARNING: Can't read file's timestamp: C:\codeblocks-1.0svn4360.tar\src\plugins\compilergcc\depslib\src\main.c
Linking static library: plugins\compilergcc\depslib\libdepslib.a
ar.exe: .objs\plugins\compilergcc\depslib\src\main.o: No such file or directory
Process terminated with status 1 (0 minutes, 4 seconds)
0 errors, 0 warnings


Is the error because of the above warning that is generated?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Building CodeBlock
« Reply #3 on: August 20, 2007, 09:09:49 pm »
The "Can't read file's timestamp" error occurs when the depslib component of the C::B executable that you're currently running was built with -O2 optimization under GCC 4.2. When building C::B with GCC 4.2, add "-fno-strict-aliasing" to fix this problem. Otherwise, wait for the next 4.2 release in which this compiler bug was fixed.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Building CodeBlock
« Reply #4 on: August 20, 2007, 09:36:18 pm »
How do I compile the plugins separately? I have built the CodeBlocks.cbp file. But when I execute the executable, there is just one plugin installed i.e. AyStyle. I cannot see any other plugin installed. Also when I click Help->About, it shows SVN 0. Why is that the case?


Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Building CodeBlock
« Reply #5 on: August 20, 2007, 10:40:25 pm »
For core plugins:
Either build target "all" or choose your plugin as build target.
For contributed plugins:
Open ContribPlugins.workspace, point global variable "cb" to your codeblocks\src dir and hit Build->Build workspace.
« Last Edit: August 20, 2007, 10:42:49 pm by raph »

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Building CodeBlock
« Reply #6 on: August 20, 2007, 11:19:27 pm »
I did build target "all", but it seems like that plugins are not getting built properly.
The build log is as follows -

-------------- Build: Compiler depslib in Code::Blocks ---------------
WARNING: Can't read file's timestamp: C:\codeblocks-1.0svn4360.tar\src\plugins\compilergcc\depslib\src\main.c
Linking static library: plugins\compilergcc\depslib\libdepslib.a
ar.exe: .objs\plugins\compilergcc\depslib\src\main.o: No such file or directory
Process terminated with status 1 (0 minutes, 5 seconds)
0 errors, 0 warnings

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Building CodeBlock
« Reply #7 on: August 21, 2007, 01:05:36 am »
The build log for depslib is

Build: Compiler depslib in Code::Blocks ---------------
Compiling: plugins\compilergcc\depslib\src\alloc.c
Compiling: plugins\compilergcc\depslib\src\cache.c
Compiling: plugins\compilergcc\depslib\src\depslib.c
Compiling: plugins\compilergcc\depslib\src\filent.c
Compiling: plugins\compilergcc\depslib\src\fileunix.c
Compiling: plugins\compilergcc\depslib\src\hash.c
Compiling: plugins\compilergcc\depslib\src\headers.c
Compiling: plugins\compilergcc\depslib\src\lists.c
WARNING: Can't read file's timestamp: C:\codeblocks-1.0svn4360.tar\src\plugins\compilergcc\depslib\src\main.c
Compiling: plugins\compilergcc\depslib\src\newstr.c
Compiling: plugins\compilergcc\depslib\src\pathsplit.c
Compiling: plugins\compilergcc\depslib\src\pathunix.c
Compiling: plugins\compilergcc\depslib\src\regexp.c
Compiling: plugins\compilergcc\depslib\src\search.c
Compiling: plugins\compilergcc\depslib\src\timestamp.c
Linking static library: plugins\compilergcc\depslib\libdepslib.a
ar.exe: creating plugins\compilergcc\depslib\libdepslib.a
ar.exe: .objs\plugins\compilergcc\depslib\src\main.o: No such file or directory
Process terminated with status 1 (11 minutes, 4 seconds)
0 errors, 0 warnings


Why is it looking for main.o, when there is no main.c defined in plugins\compilergcc\depslib\src??

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Building CodeBlock
« Reply #8 on: August 21, 2007, 05:31:47 am »
Quote
Why is it looking for main.o, when there is no main.c defined in plugins\compilergcc\depslib\src??

That's the way the plugin was designed. If it cannot read the timestamp, it'll try to link the .o file anyway, even if it doesn't exist. I modified that section of the plugin by adding a check for file existence. If the file exists it forces compilation, if it doesn't then it continues with the old behavior, and the svn version you're trying to compile has that change already (it was introduced in revision 4326).

Please find that main.c in the project tree and delete it. If you say it doesn't exist in that directory, it should be in the project tree with a different icon. If it doesn't even show up in the project tree then something strange is going on with the .cbp file. If that's the case, please upload the project file so we can check it.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Building CodeBlock
« Reply #9 on: August 21, 2007, 05:13:43 pm »
Attached is the depslib folder which is giving errors. Please suggest me  suitable changes to be made.



[attachment deleted by admin]

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Building CodeBlock
« Reply #10 on: August 21, 2007, 06:06:36 pm »
Where did you add the check for file existence?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building CodeBlock
« Reply #11 on: August 21, 2007, 06:26:37 pm »
The tarball you downloaded is damaged or not extracted properly. main.c file is missing from your package and that is the reason C::B is complaining.

Try to download the source from svn. :)
Be a part of the solution, not a part of the problem.