Author Topic: How can I biuld codeblocks with codeblocks on linux  (Read 42581 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: How can I biuld codeblocks with codeblocks on linux
« Reply #30 on: July 12, 2009, 08:19:56 pm »
So (pre)compile sdk.h seems to be the most simple solution and should (hopefully) not have any sideeffects.

Any comments or objections from users and devs that have more experience with precompiled headers are (as always) welcome.

Again:

are there any objections (especially by other dev) against using two precompiled headers ?
Or other solutions to make C::B debuggable with gcc >= 4.3 .

If not, I would like to commit a patch.

If you build Code::Blocks under windows sdk.h is already precompiled during the main exe build.
target "src"

Edit: Just looked at C::B Unix project and it sdk.h is not precompiled for it.

Tim S

« Last Edit: July 12, 2009, 08:22:24 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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How can I biuld codeblocks with codeblocks on linux
« Reply #31 on: August 26, 2009, 08:06:15 pm »
Why do I need to apply this patch, in order to run cb from cb (on linux)

Code
Index: src/main.cpp
===================================================================
--- src/main.cpp        (revision 5712)
+++ src/main.cpp        (working copy)
@@ -1015,11 +1015,13 @@
     m_PluginIDsMap.clear();
 
     PluginManager* m_PluginManager = Manager::Get()->GetPluginManager();
+    int count = 0;
+    wxString path;
 
-    // user paths first
-    wxString path = ConfigManager::GetPluginsFolder(false);
-    Manager::Get()->GetLogManager()->Log(_("Scanning for plugins in ") + path);
-    int count = m_PluginManager->ScanForPlugins(path);
+//    // user paths first
+//    path = ConfigManager::GetPluginsFolder(false);
+//    Manager::Get()->GetLogManager()->Log(_("Scanning for plugins in ") + path);
+//    count += m_PluginManager->ScanForPlugins(path);
 
     // global paths
     path = ConfigManager::GetPluginsFolder(true);

Without the patch C::B starts but no plugins are loaded...
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How can I biuld codeblocks with codeblocks on linux
« Reply #32 on: August 26, 2009, 09:44:46 pm »
Why do I need to apply this patch, in order to run cb from cb (on linux)


Don't know, works fine here.

Can you post the output from the "Code:Blocks" tab in the "Logs & others" window ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How can I biuld codeblocks with codeblocks on linux
« Reply #33 on: August 26, 2009, 11:23:05 pm »
Here it is

Code

Scanning for lexers in /home/obfuscated/projects/codeblocks/brances/codecompletion_refactoring/src/devel/share/codeblocks/lexers/...
Found 41 lexers
Loading lexer_haskell
Loading lexer_f77
Loading lexer_properties
Loading lexer_ada
Loading lexer_latex
Loading lexer_OgreCompositor
Loading lexer_rc
Loading lexer_xml
Loading lexer_OgreMaterial
Loading lexer_glsl
Loading lexer_gm
Loading lexer_vbscript
Loading lexer_postscript
Loading lexer_angelscript
Loading lexer_vhdl
Loading lexer_html
Loading lexer_squirrel
Loading lexer_d
Loading lexer_lua
Loading lexer_perl
Loading lexer_smalltalk
Loading lexer_prg
Loading lexer_matlab
Loading lexer_fortran
Loading lexer_batch
Loading lexer_ruby
Loading lexer_css
Loading lexer_lisp
Loading lexer_caml
Loading lexer_bash
Loading lexer_diff
Loading lexer_hitasm
Loading lexer_cg
Loading lexer_make
Loading lexer_cpp
Loading lexer_sql
Loading lexer_masm
Loading lexer_nsis
Loading lexer_pascal
Loading lexer_verilog
Loading lexer_python
Configured 0 tools
Scanning for plugins in /home/obfuscated/.codeblocks/share/codeblocks/plugins
Plugin resource not found: cbMakefileGen.zip
Loaded 1 plugins
Scanning for plugins in /plugins
Loading:

(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How can I biuld codeblocks with codeblocks on linux
« Reply #34 on: August 27, 2009, 12:00:46 am »
It seems you have an incompatible vewrsion of the cbMakeFileGen-plugin in C::B's user-plugin folder.

Try to rename (or empty) the /home/obfuscated/.codeblocks/share/codeblocks/plugins-folder.
If you remove or empty the folder you should also remove the cbMakeFileGen.zip-file, if you only rename the folder, to test it, you can leave it where it is.

If the folder is removed or renamed, C::B will create a new one at next start.

You have to stop C::B before you do this of course.

I think C::B should not stop loading the other plugins, but show a message about not loaded plugins.

I will have a look into it.

You might want to file a bug report, so that this issue does not get lost.

I try not to forget it anyway ...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How can I biuld codeblocks with codeblocks on linux
« Reply #35 on: August 29, 2009, 11:59:47 pm »
The problem seems to be a little bit more difficult as it looks on first sight.

I have a test-plugin in my user-plugin-folder.

C::B loads it, but cannot load the appropriate zip-file, because immediately after loading the .so-file, all global values in (at least) configmanager are lost.

The plugin is linked a gainst the libcodeblocks.so in /usr/lib (belonging to my regular C::B installation aka nightly).

It seems that loading the plugin also reloads libcodeblocks, but (most likely) the wrong one and therefore loses all the formerly initialised global variables.

Therefore it tries to search the zip-file and all other plugins in wrong folders.
Most likely many other init-values get lost also (I did not check this).

The only way to avoid this, seems to be to remove either the "wrong" plugin, or the libcodeblocks.so in /usr/lib.
The first one makes the plugin unusable for the regular C::B executable, the second makes the whole regular C::B unusable.

I don't see an easy solution at the moment.