Author Topic: rev 5084 does not build on linux  (Read 6424 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
rev 5084 does not build on linux
« on: June 02, 2008, 03:25:14 pm »
does not build on linux : headerfixup : makefile : recursive variable PWD referenes itself (eventually). Stop.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: rev 5084 does not build on linux
« Reply #1 on: June 02, 2008, 08:21:24 pm »
does not build on linux : headerfixup : makefile : recursive variable PWD referenes itself (eventually). Stop.

In the last line of headerfixups "Makefile.am", the one containing
Code
PWD=`pwd` cd $(srcdir) && zip $(PWD)/headerfixup.zip manifest.xml > /dev/null
the four leading blanks have to be replaced by a "tab" and it should work.

You have to run "./bootstrap" again to recreate "Makefile.in" after that change.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: rev 5084 does not build on linux
« Reply #2 on: June 02, 2008, 08:35:36 pm »
But I found two other issues the first is the look of the dialog (see attached image).

And if I run the plugin without a project loaded it crashes (crashreport is also attached). It would of course be better to show just an error-dialog.

EDIT:
Sorry for hijacking this post  :roll: .

[attachment deleted by admin]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: rev 5084 does not build on linux
« Reply #3 on: June 02, 2008, 09:03:31 pm »
With this patch the dialog is much more readable:

Code
--- codeblocks-1.0svn.orig/src/plugins/contrib/headerfixup/wxsmith/execution.wxs        2008-06-02 19:40:10.000000000 +0200
+++ codeblocks-1.0svn.work/src/plugins/contrib/headerfixup/wxsmith/execution.wxs        2008-06-02 20:56:32.000000000 +0200
@@ -16,7 +16,9 @@
                                                                <item>Scan source files in project</item>
                                                                <item>Scan source files in workspace</item>
                                                        </content>
-                                                       <size>200,65</size>
+                                                       <default>0</default>
+                                                       <dimension>2</dimension>
+                                                       <size>337,70</size>
                                                        <tooltip>This will setup on what files to operate: All from active project or whole workspace.</tooltip>
                                                </object>
                                                <flag>wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
@@ -30,7 +32,8 @@
                                                                <item>Use &lt;include.h&gt; (brackets)</item>
                                                        </content>
                                                        <default>1</default>
-                                                       <size>200,65</size>
+                                                       <dimension>2</dimension>
+                                                       <size>337,70</size>
                                                        <tooltip>This will setup the way missing header files are included: By quotation mark or brackets.</tooltip>
                                                </object>
                                                <flag>wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
@@ -73,7 +76,8 @@
                                                                                <item>Process both files (2-step-fix up)</item>
                                                                        </content>
                                                                        <default>2</default>
-                                                                       <size>200,85</size>
+                                                                       <dimension>3</dimension>
+                                                                       <size>317,95</size>
                                                                        <tooltip>This will setup on what file types the plugin shall operate: Header files, implementation files or both (after each other).</tooltip>
                                                                </object>
                                                                <flag>wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: rev 5084 does not build on linux
« Reply #4 on: June 03, 2008, 12:11:46 am »
And another patch needed to build/copy files in the right place when building with C::B on linux:

Code
--- codeblocks-1.0svn.orig/src/plugins/contrib/headerfixup/headerfixup-unix.cbp 2008-06-02 19:40:19.000000000 +0200
+++ codeblocks-1.0svn.work/src/plugins/contrib/headerfixup/headerfixup-unix.cbp 2008-06-02 23:11:26.000000000 +0200
@@ -7,7 +7,7 @@
                <Option compiler="gcc" />
                <Build>
                        <Target title="default">
-                               <Option output="../../../devel/share/CodeBlocks/plugins/headerfixup" prefix_auto="1" extension_auto="1" />
+                               <Option output="../../../devel/share/codeblocks/plugins/headerfixup" prefix_auto="1" extension_auto="1" />
                                <Option object_output="../../../.objs/plugins/contrib/headerfixup" />
                                <Option type="3" />
                                <Option compiler="gcc" />
@@ -37,7 +37,7 @@
                                        <Add directory="$(#CB)/sdk/tinyxml" />
                                </Linker>
                                <ExtraCommands>
-                                       <Add after="zip -j9 ../../../devel/share/CodeBlocks/headerfixup.zip manifest.xml" />
+                                       <Add after="zip -j9 ../../../devel/share/codeblocks/headerfixup.zip manifest.xml" />
                                        <Mode after="always" />
                                </ExtraCommands>
                        </Target>

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Re: rev 5084 does not build on linux
« Reply #5 on: June 03, 2008, 08:46:33 am »
patches applied

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: rev 5084 does not build on linux
« Reply #6 on: June 03, 2008, 09:36:13 am »
I forgot, that if only the wxs-file is changed with a patch and not from wxSmith the appropriate cpp-file doesn't know anything about the changes, so the following patch is also needed:
Code
--- codeblocks-1.0svn.orig/src/plugins/contrib/headerfixup/execution.cpp        2008-06-02 19:40:19.000000000 +0200
+++ codeblocks-1.0svn.work/src/plugins/contrib/headerfixup/execution.cpp        2008-06-02 23:43:22.000000000 +0200
@@ -67,7 +67,7 @@
        _("Scan source files in project"),
        _("Scan source files in workspace")
   };
-  m_Scope = new wxRadioBox(this, ID_RB_SCOPE, _("Scope"), wxDefaultPosition, wxSize(200,65), 2, __wxRadioBoxChoices_1, 1, 0, wxDefaultValidator, _T("ID_RB_SCOPE"));
+  m_Scope = new wxRadioBox(this, ID_RB_SCOPE, _("Scope"), wxDefaultPosition, wxSize(337,70), 2, __wxRadioBoxChoices_1, 2, 0, wxDefaultValidator, _T("ID_RB_SCOPE"));
   m_Scope->SetSelection(0);
   m_Scope->SetToolTip(_("This will setup on what files to operate: All from active project or whole workspace."));
   sizLeft->Add(m_Scope, 0, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
@@ -76,7 +76,7 @@
        _("Use \"include.h\" (quotation marks)"),
        _("Use <include.h> (brackets)")
   };
-  m_Options = new wxRadioBox(this, ID_RB_OPTIONS, _("Options"), wxDefaultPosition, wxSize(200,65), 2, __wxRadioBoxChoices_2, 1, 0, wxDefaultValidator, _T("ID_RB_OPTIONS"));
+  m_Options = new wxRadioBox(this, ID_RB_OPTIONS, _("Options"), wxDefaultPosition, wxSize(337,70), 2, __wxRadioBoxChoices_2, 2, 0, wxDefaultValidator, _T("ID_RB_OPTIONS"));
   m_Options->SetSelection(1);
   m_Options->SetToolTip(_("This will setup the way missing header files are included: By quotation mark or brackets."));
   sizLeft->Add(m_Options, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
@@ -99,7 +99,7 @@
        _("Process implementation files only"),
        _("Process both files (2-step-fix up)")
   };
-  m_FileType = new wxRadioBox(this, ID_RDO_FILE_TYPE, _("File types to process:"), wxDefaultPosition, wxSize(200,85), 3, __wxRadioBoxChoices_3, 1, 0, wxDefaultValidator, _T("ID_RDO_FILE_TYPE"));
+  m_FileType = new wxRadioBox(this, ID_RDO_FILE_TYPE, _("File types to process:"), wxDefaultPosition, wxSize(317,95), 3, __wxRadioBoxChoices_3, 3, 0, wxDefaultValidator, _T("ID_RDO_FILE_TYPE"));
   m_FileType->SetSelection(2);
   m_FileType->SetToolTip(_("This will setup on what file types the plugin shall operate: Header files, implementation files or both (after each other)."));
   sizAdvancedOptions->Add(m_FileType, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);

and the plugin is not yet in debian/control.

The line-numbers of the patch might be incorrect, because I use a patched control-file.

Code
--- codeblocks-1.0svn.orig/debian/control    2008-06-03 07:53:35.000000000 +0200
+++ codeblocks-1.0svn.work/debian/control      2008-06-02 23:21:44.000000000 +0200
@@ -71,6 +71,7 @@
     * DragScroll (enhances mouse operations)
     * Setting of environment variables
     * Source exporter to PDF/HTML/ODT/RTF
+    * Header fixup
     * Help
     * Keyboard shortcuts configuration
     * GUI RAD builder (wxSmith)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Re: rev 5084 does not build on linux
« Reply #7 on: June 03, 2008, 01:09:21 pm »
done

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: rev 5084 does not build on linux
« Reply #8 on: June 03, 2008, 03:35:03 pm »
When applying the execution.cpp patch you forgot to change a "1" to a "2"

m_Scope = new wxRadioBox(this, ID_RB_SCOPE, _("Scope"), wxDefaultPosition, wxSize(337,70), 2, __wxRadioBoxChoices_1, 2, 0, wxDefaultValidator, _T("ID_RB_SCOPE"));

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: rev 5084 does not build on linux
« Reply #9 on: June 08, 2008, 04:55:51 pm »
I push this post, because there is still a 1, where a 2 should be in line 70 of "execution.cpp".

When applying the execution.cpp patch you forgot to change a "1" to a "2"

m_Scope = new wxRadioBox(this, ID_RB_SCOPE, _("Scope"), wxDefaultPosition, wxSize(337,70), 2, __wxRadioBoxChoices_1, 2, 0, wxDefaultValidator, _T("ID_RB_SCOPE"));


Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: rev 5084 does not build on linux
« Reply #10 on: June 08, 2008, 05:25:20 pm »
Fixed in revision 5093.
Be a part of the solution, not a part of the problem.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: rev 5084 does not build on linux
« Reply #11 on: June 10, 2008, 05:29:04 pm »
Fixed in revision 5093.
Since that time my HeaderFixUp plugin looks broken. Just as the screenshot of Jens. What has happened?!

It also makes no sense to me, because the radiobox really should be one-dimensional...?!
« Last Edit: June 10, 2008, 05:31:10 pm by MortenMacFly »
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 Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: rev 5084 does not build on linux
« Reply #12 on: June 10, 2008, 06:18:17 pm »
Fixed in revision 5093.
Since that time my HeaderFixUp plugin looks broken. Just as the screenshot of Jens. What has happened?!

It also makes no sense to me, because the radiobox really should be one-dimensional...?!

Fixed in revision 5095. :)
Be a part of the solution, not a part of the problem.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: rev 5084 does not build on linux
« Reply #13 on: June 10, 2008, 06:54:54 pm »
@Biplab:
you should also change "execution.wxs" to reflect the changes.

I think the problem is caused by a wrong wxWidgets behaviour. The documentation (and what's make me wonder the source code too, as far as I see) says the default style is "wxRA_SPECIFY_COLS", but that seems not to work in all cases (or on all ports) if style is "0".

If style is explicitely set to "wxRA_SPECIFY_COLS" the dimension can (and should) be set to "1".