Author Topic: Contrib plugins fail to run/debug  (Read 511 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12069
    • Travis build status
Contrib plugins fail to run/debug
« on: September 29, 2019, 02:27:46 pm »
Am I the only one that cannot run or debug contrib plugins from the CodeBlocks_wx30-unix.workspace or CodeBlocks-unix.workspace?
I think this worked in the past, but I might be wrong. Currently every plugin fails to start, because it cannot find the resources.

And I have to use a patch like:
Code: [Select]
@@ -6,15 +6,16 @@
  <Option pch_mode="2" />
  <Option compiler="gcc" />
  <Build>
  <Target title="default">
  <Option output="../../../devel30/share/codeblocks/plugins/AutoVersioning" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="../../../devel30/" />
  <Option object_output="../../../.objs30/plugins/contrib/AutoVersioning" />
  <Option type="3" />
  <Option compiler="gcc" />
  <Option parameters="--debug-log --multiple-instance -ns -ni -p debug" />
- <Option host_application="../../../devel30/codeblocks" />
+ <Option host_application="./codeblocks" />
  <Option run_host_application_in_terminal="0" />
  <Compiler>
  <Add option="$(#CB_RELEASE_TYPE)" />
  <Add option="`$(WX_CONFIG) --cflags`" />
  <Add option="-fPIC" />

I've tried an old version and it had the same problem.
I've tried to revert my recent commit related to the relative paths to the resources and it failed without it.

Am I remembering wrong and this never worked or something broke recently?
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2545
Re: Contrib plugins fail to run/debug
« Reply #1 on: September 29, 2019, 08:27:29 pm »
(i am going to ask the obvious) Have you run the update scipts?
For me on windows this works as expected:
1) Open Workspace
2) Select (for example) wxSmith
3) Build and run

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12069
    • Travis build status
Re: Contrib plugins fail to run/debug
« Reply #2 on: September 29, 2019, 09:25:54 pm »
(i am going to ask the obvious) Have you run the update scipts?
Update scripts matter only the first type and obviously I've run them if the provided patch has a chance to work at all. :)

What version are you running as a host cb? Which workspace are you using?
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2545
Re: Contrib plugins fail to run/debug
« Reply #3 on: September 29, 2019, 10:20:57 pm »
Quote
What version are you running as a host cb
last trunk before your commits today

Quote
Which workspace are you using?
wx31_64

Offline osdt

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Contrib plugins fail to run/debug
« Reply #4 on: September 29, 2019, 11:44:09 pm »
... Currently every plugin fails to start, because it cannot find the resources. ...

It's not reproducible here on Ubuntu 18.04. Using a clean build of CodeBlocks_wx30-unix.workspace (svn trunk), ran ./update30, I'm able to run/debug any plugin even with the newly compiled ./output30/codeblocks executable.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12069
    • Travis build status
Re: Contrib plugins fail to run/debug
« Reply #5 on: September 30, 2019, 12:54:23 am »
To be clear what I do is:
1. Open the workspace
2. Set the plugin project as active
3. Select Build -> Run or Debug -> Start

Do these work for you?
(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 osdt

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Contrib plugins fail to run/debug
« Reply #6 on: September 30, 2019, 01:08:30 am »
Yes it does, flawlessly.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12069
    • Travis build status
Re: Contrib plugins fail to run/debug
« Reply #7 on: September 30, 2019, 01:18:48 am »
What version of C::B are you using to open the workspace?
(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 osdt

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Contrib plugins fail to run/debug
« Reply #8 on: September 30, 2019, 08:29:41 pm »
What version of C::B are you using to open the workspace?

I've used svn #11825, slightly modified for my personal usecase.

To check if current trunk (#11866) works, I did simply run "./output30/run.sh CodeBlocks_wx30-unix.workspace", set 'AutoVersioning' as the active project, hit run and/or debug. It works as expected. The debug-log below shows #11866 (./output30) debugging #11866 (./devel30):
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
default
Adding source dir: /share/daten/c/osdt/codeblocks/gitsvn/src/plugins/contrib/AutoVersioning/
Adding source dir: /share/daten/c/osdt/codeblocks/gitsvn/src/plugins/contrib/AutoVersioning/
Adding file: ../../../devel30/codeblocks
Changing directory to: /share/daten/c/osdt/codeblocks/gitsvn/src/plugins/contrib/AutoVersioning/.
Set variable: LD_LIBRARY_PATH=.:/share/daten/c/osdt/codeblocks/gitsvn/src/devel30:/usr/lib/x86_64-linux-gnu:/share/daten/c/osdt/codeblocks/gitsvn/src/output30:
Starting debugger: /usr/bin/gdb -nx -fullname -quiet  -args ../../../devel30/codeblocks
Setting SHELL to '/bin/sh'
done
Setting breakpoints
Debugger name and version: GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
No source file named /share/daten/c/osdt/codeblocks/gitsvn/src/plugins/contrib/AutoVersioning/AutoVersioning.cpp.
Haltepunkt 2 ("/share/daten/c/osdt/codeblocks/gitsvn/src/plugins/contrib/AutoVersioning/AutoVersioning.cpp:68") anstehend.
Child process PID: 11977
At /share/daten/c/osdt/codeblocks/gitsvn/src/plugins/contrib/AutoVersioning/AutoVersioning.cpp:69
Continuing...