You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Graham Horner <gr...@hornercs.co.uk> on 2022/04/05 14:39:10 UTC

[C/C++][NB13] Netbeans hangs parsing project

Hi

I've been using NB 11.2 for some C/C++ projects (Kodi and linux 
kernel).  For some reason, NB never completes the background scan to 
parse all the symbols but does parse some of them.  I thought I'd try 
NB13 to see if it got better.  It didn't.

First I couldn't open my projects, even after adding the C/C++ Lite 
plugin.  So back to the 8.2 C/C++ plugin.  Now I can open my projects 
and background scanning starts and runs for an hour or more then 
eventually stalls with the progress bar at 100%, CPU usage stuck at 100% 
and maybe some of those 'Parsing ....' progress bars stuck as well.  I 
can't stop the background scanning from the GUI or even kill NB itself.  
Only logging out gets me back to a usable machine.

NB is running on Linux Mint 20.3 with 8GB RAM which goes up to 70% usage 
and 5GB swap (which is not touched). JVM is 11.0.14.1.

Any pointers to how I can get NB 13 working at least as well as my 11.2 
and hopefully with full code assistance?

TIA



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by Graham Horner <gr...@hornercs.co.uk>.
NB on LinuxMint x64.  Build server is an ARM-powered set-top box running 
a Debian derivative. I'm building Kodi (C++) under an armv7 toolchain 
and have now got that working quite nicely with the 8.2 plugin and some 
hacks on the build server. It would be good to reach the same point with 
NB13+.

I'm also building the linux kernel on the same box. That really is an 
'interesting' use-case as it uses an aarch64 toolchain in a chroot which 
NB can't see when it connects. That's not working as well as I think it 
could with the 8.2 plugin, but that's for another day.

KR Graham

On 15/4/22 10:57, Antonio wrote:
> Hi,
>
> So what's your setup? Windows with a remote Linux build server?
>
> Thanks,
> Antonio
>
> El 15/4/22 a las 10:38, Graham Horner escribió:
>> For me, the only use-case that makes sense.  Given it's a bad idea to 
>> build inside a git repo (IIRC gcc actually gives you a warning) the 
>> build artifacts should be only on the remote build server.  That 
>> means the Simple setup of the 8.2 plugin is preferred.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by Antonio <an...@vieiro.net>.
Hi,

So what's your setup? Windows with a remote Linux build server?

Thanks,
Antonio

El 15/4/22 a las 10:38, Graham Horner escribió:
> For me, the only use-case that makes sense.  Given it's a bad idea to 
> build inside a git repo (IIRC gcc actually gives you a warning) the 
> build artifacts should be only on the remote build server.  That means 
> the Simple setup of the 8.2 plugin is preferred.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by Graham Horner <gr...@hornercs.co.uk>.
For me, the only use-case that makes sense.  Given it's a bad idea to 
build inside a git repo (IIRC gcc actually gives you a warning) the 
build artifacts should be only on the remote build server.  That means 
the Simple setup of the 8.2 plugin is preferred.

I installed clangd-12 and pointed your fork to it, but there's still no 
code assistance.

KR Graham

On 14/4/22 09:39, antonio wrote:
> That's an interesting use-case

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: C/C++ Compiling and clangd integration

Posted by antonio <an...@vieiro.net>.
Hi,

"Tools->Options->C/C++->clangd" is not a feature of Apache NetBeans, are 
you using NB 8.X C/C++ plugin?

Cheers,
Antonio

El 1/6/22 a las 20:03, slipbits escribió:
> NB 13
> Win 7/10/11
> gcc 11.3.0
> 
> I'm trying to use NB as a C/C++ IDE. Some issues:
> 
>  1. I can't compile. Properties->Compile Commands = "<path>g++.exe -c
>     -dumpdir ..\obj\ -std=c++17 -o ..\obj\", but Run->Compile File is
>     'grayed' and can't be used. I've also tried linux separators (/) and
>     amisture of both, C:\cygwin/ ... . I can't seem to get this right.
>     What am I doing wrong?
>  2. I am using clangd (Tools->Options->C/C++->clangd Location) but when
>     I double-click on a underscored variable name (ab_cd), only the
>     first part (ab) is highlighted. Any reason that the syntax of a
>     variable is not recognized?
>  3. Highlighting a function name and then selecting Find in Projects
>     fails to find the function (or variable) . Is this something that NB
>     14 will fix?
> 
> I hope there is something that I can do to at least compile, and then 
> build, my files. I've tried several versions of the compile command, all 
> failing. I don't know what else to do.
> 
> art
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


C/C++ Compiling and clangd integration

Posted by slipbits <sl...@slipbits.com>.
NB 13
Win 7/10/11
gcc 11.3.0

I'm trying to use NB as a C/C++ IDE. Some issues:

 1. I can't compile. Properties->Compile Commands = "<path>g++.exe -c
    -dumpdir ..\obj\ -std=c++17 -o ..\obj\", but Run->Compile File is
    'grayed' and can't be used. I've also tried linux separators (/) and
    amisture of both, C:\cygwin/ ... . I can't seem to get this right.
    What am I doing wrong?
 2. I am using clangd (Tools->Options->C/C++->clangd Location) but when
    I double-click on a underscored variable name (ab_cd), only the
    first part (ab) is highlighted. Any reason that the syntax of a
    variable is not recognized?
 3. Highlighting a function name and then selecting Find in Projects
    fails to find the function (or variable) . Is this something that NB
    14 will fix?

I hope there is something that I can do to at least compile, and then 
build, my files. I've tried several versions of the compile command, all 
failing. I don't know what else to do.

art

Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by antonio <an...@vieiro.net>.
Hi Graham,

Well, that's good enough testing!

The fact is that you'll need to install "clangd", which is a language 
server (available at https://clangd.llvm.org/), different from plain 
"clang" which is a compiler.

Currently clangd does not support remote development (although you can 
still build on remote hosts). That's an interesting use-case we'll look 
at in the future.

Thanks for testing!

Cheers,
Antonio

El 14/4/22 a las 0:05, Graham Horner escribió:
> For 'location of clangd' I chose /usr/bin/clang but I'm getting no code 
> assistance.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by Graham Horner <gr...@hornercs.co.uk>.
I think you are assuming my knowledge of Netbeans is more than it really 
is. To get this far with C/C++ I've relied heavily on the defaults but 
your fork is not suggesting anything so I get lost quickly. For 
'location of clangd' I chose /usr/bin/clang but I'm getting no code 
assistance. I've no idea what cnd is or how anything could be ported 
from 8.2 (other than the full Oracle plugin).

I'm happy to test given detailed instructions but I do need to get some 
work done at the same time.  Do I need to build more than the 'basic' 
version?  The other options just seemed to be other languages which I 
don't need and the netbeans platform.

KR Graham

On 13/4/22 20:18, Antonio wrote:
> The fork does support remote building. That's the part of cnd from 8.2 
> that could be ported. So please keep up the good testing!
>
> Cheers,
> Antonio
>
> El 13/4/22 a las 17:00, Graham Horner escribió:
>> I built the 'basic' version of your fork and added cpplite. I can't 
>> make much use of it for my main project until you add remote 
>> building.  So please keep up the good work!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by Antonio <an...@vieiro.net>.
The fork does support remote building. That's the part of cnd from 8.2 
that could be ported. So please keep up the good testing!

Cheers,
Antonio

El 13/4/22 a las 17:00, Graham Horner escribió:
> I built the 'basic' version of your fork and added cpplite. I can't make 
> much use of it for my main project until you add remote building.  So 
> please keep up the good work!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by Graham Horner <gr...@hornercs.co.uk>.
Understood.  I was just hoping someone who is using the old plugin could 
give me some pointers.  I have got it working pretty well now with 11.2. 
It takes 30-40 mins to parse my linux kernel every time I start up NB 
which is not ideal and it's still missing some symbols from the 
Navigator.  But usable.

I built the 'basic' version of your fork and added cpplite. I can't make 
much use of it for my main project until you add remote building.  So 
please keep up the good work!

If you are working on remote building, a major issue for me with the old 
plugin (in 'Simple' mode) is there is no opportunity to automatically 
run a script locally or on the remote server _before_ NB attempts to 
upload changed files.  Even the Pre-build starts with an upload.

Another pain is there is no way I've found to exclude 'source' files 
from the upload.  My .git directory is about the same size as all the 
rest of the source tree (~2GB).  I don't need it on the build server but 
that plugin insists on trying to upload it with every build (and fails 
for unexplained reasons).  I think others have been asking for this for 
a long time.

So please give us these options as the work on C/C++ moves forward.

KR
Graham

On 13/4/22 10:50, antonio wrote:
> So you're using NetBeans 8.2 C/C++ modules. We don't support those 
> Oracle binaries any longer.
>
> You may want to give 
> https://github.com/vieiro/netbeans/tree/feature/cnd-small-4 a spin, 
> though.
>
> Cheers,
> Antonio 

Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by antonio <an...@vieiro.net>.
So you're using NetBeans 8.2 C/C++ modules. We don't support those 
Oracle binaries any longer.

You may want to give 
https://github.com/vieiro/netbeans/tree/feature/cnd-small-4 a spin, though.

Cheers,
Antonio

El 5/4/22 a las 19:13, Graham Horner escribió:
> I'm not using cpplite under 11.2, so I don't have that folder. Can you 
> point me to a description of the conf files - in the docs?
> 
> On 5/4/22 17:34, antonio wrote:
>> In windows, recursively copy the following folder
>>
>> C:\Users\[YOUR_USER]\AppData\Roaming\NetBeans\11.X\config\Preferences\org\netbeans\modules\cpplite 
>>
>>
>> To the NetBeans 13 version:
>>
>> C:\Users\[YOUR_USER]\AppData\Roaming\NetBeans\13\config\Preferences\org\netbeans\modules\cpplite 
>>
>>
>> You should recover your projects then. 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by Graham Horner <gr...@hornercs.co.uk>.
I'm not using cpplite under 11.2, so I don't have that folder. Can you 
point me to a description of the conf files - in the docs?

On 5/4/22 17:34, antonio wrote:
> In windows, recursively copy the following folder
>
> C:\Users\[YOUR_USER]\AppData\Roaming\NetBeans\11.X\config\Preferences\org\netbeans\modules\cpplite 
>
>
> To the NetBeans 13 version:
>
> C:\Users\[YOUR_USER]\AppData\Roaming\NetBeans\13\config\Preferences\org\netbeans\modules\cpplite 
>
>
> You should recover your projects then. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by Graham Horner <gr...@hornercs.co.uk>.
Many thanks.

Using the old (8.2) plugin still I've given NB 6G of RAM (same as I had 
for 11.2) and parsing gets a bit further now using all that and 2G of 
swap.  But not finished yet.

I'll have a go with the C++ Lite later.

On 5/4/22 17:34, antonio wrote:
> Hi,
>
> Some comments below.
>
> On 05/04/2022 16:39, Graham Horner wrote:
>> Hi
>>
>> I've been using NB 11.2 for some C/C++ projects (Kodi and linux 
>> kernel).  For some reason, NB never completes the background scan to 
>> parse all the symbols but does parse some of them.  I thought I'd try 
>> NB13 to see if it got better.  It didn't.
>>
>> First I couldn't open my projects, even after adding the C/C++ Lite 
>> plugin.  So back to the 8.2 C/C++ plugin.  Now I can open my projects 
>> and background scanning starts and runs for an hour or more then 
>> eventually stalls with the progress bar at 100%, CPU usage stuck at 
>> 100% and maybe some of those 'Parsing ....' progress bars stuck as 
>> well.  I can't stop the background scanning from the GUI or even kill 
>> NB itself. Only logging out gets me back to a usable machine.
>
> We're still working on Apache NetBeans C/C++.
>
> Currently the most advanced branch is 
> https://github.com/vieiro/netbeans/tree/feature/cnd-lsp-2 , with LSP 
> (clangd) support. You're welcome to test it (but you'll have to build 
> that branch yourself).
>
> No debugger yet, though, but it's on its way at 
> https://github.com/apache/netbeans/pull/3909 to the "cnd" branch.
>
> In the future the most advanced branch would be 
> https://github.com/apache/netbeans/tree/cnd (again you'll have to 
> build the branch yourself).
>
> If we are lucky we could have C/C++ in NB14 or NB15.
>
>>
>> NB is running on Linux Mint 20.3 with 8GB RAM which goes up to 70% 
>> usage and 5GB swap (which is not touched). JVM is 11.0.14.1.
>
> Apache NetBeans C/C++ will delegate many parsing/completion/semantic 
> highlighting features to the clangd LSP server https://clangd.llvm.org/
>
>>
>> Any pointers to how I can get NB 13 working at least as well as my 
>> 11.2 and hopefully with full code assistance?
>
> AFAIU, C/C++ Lite stores projects in NetBeans preferences system. You 
> should copy the preferences from the previous NetBeans version to the 
> new one.
>
> In windows, recursively copy the following folder
>
> C:\Users\[YOUR_USER]\AppData\Roaming\NetBeans\11.X\config\Preferences\org\netbeans\modules\cpplite 
>
>
> To the NetBeans 13 version:
>
> C:\Users\[YOUR_USER]\AppData\Roaming\NetBeans\13\config\Preferences\org\netbeans\modules\cpplite 
>
>
> You should recover your projects then.
>
> If you use Linux then I think the folder is in 
> $HOME/.netbeans/config/preferences/org/netbeans/modules/cpplite 
> (cannot check this right now).
>
> HTH,
> Antonio
>
>>
>> TIA
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [C/C++][NB13] Netbeans hangs parsing project

Posted by antonio <an...@vieiro.net>.
Hi,

Some comments below.

On 05/04/2022 16:39, Graham Horner wrote:
> Hi
> 
> I've been using NB 11.2 for some C/C++ projects (Kodi and linux 
> kernel).  For some reason, NB never completes the background scan to 
> parse all the symbols but does parse some of them.  I thought I'd try 
> NB13 to see if it got better.  It didn't.
> 
> First I couldn't open my projects, even after adding the C/C++ Lite 
> plugin.  So back to the 8.2 C/C++ plugin.  Now I can open my projects 
> and background scanning starts and runs for an hour or more then 
> eventually stalls with the progress bar at 100%, CPU usage stuck at 100% 
> and maybe some of those 'Parsing ....' progress bars stuck as well.  I 
> can't stop the background scanning from the GUI or even kill NB itself. 
> Only logging out gets me back to a usable machine.

We're still working on Apache NetBeans C/C++.

Currently the most advanced branch is 
https://github.com/vieiro/netbeans/tree/feature/cnd-lsp-2 , with LSP 
(clangd) support. You're welcome to test it (but you'll have to build 
that branch yourself).

No debugger yet, though, but it's on its way at 
https://github.com/apache/netbeans/pull/3909 to the "cnd" branch.

In the future the most advanced branch would be 
https://github.com/apache/netbeans/tree/cnd (again you'll have to build 
the branch yourself).

If we are lucky we could have C/C++ in NB14 or NB15.

> 
> NB is running on Linux Mint 20.3 with 8GB RAM which goes up to 70% usage 
> and 5GB swap (which is not touched). JVM is 11.0.14.1.

Apache NetBeans C/C++ will delegate many parsing/completion/semantic 
highlighting features to the clangd LSP server https://clangd.llvm.org/

> 
> Any pointers to how I can get NB 13 working at least as well as my 11.2 
> and hopefully with full code assistance?

AFAIU, C/C++ Lite stores projects in NetBeans preferences system. You 
should copy the preferences from the previous NetBeans version to the 
new one.

In windows, recursively copy the following folder

C:\Users\[YOUR_USER]\AppData\Roaming\NetBeans\11.X\config\Preferences\org\netbeans\modules\cpplite

To the NetBeans 13 version:

C:\Users\[YOUR_USER]\AppData\Roaming\NetBeans\13\config\Preferences\org\netbeans\modules\cpplite

You should recover your projects then.

If you use Linux then I think the folder is in 
$HOME/.netbeans/config/preferences/org/netbeans/modules/cpplite (cannot 
check this right now).

HTH,
Antonio

> 
> TIA
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists