Why can't I deselect some packages in Buildroot, marked with -*-? - buildroot

When I navigate through the Buildroot setup with make menuconfig (I'm using version 2021.11.x) I see some options that are marked -*- and cannot be deselected.
For example, under Target Packages -> Networking applications, cups is marked -*- but I would like to deselect it.
I tried editing the .config manually (probably not advisable?). Even after commenting out BR2_PACKAGE_CUPS=y it still shows cups marked -*- in menuconfig
I feel like I'm missing something obvious here.

As mentioned in the comment to my question
That means that the option is a required dependency of some other option that you have selected. I think that if you press 'H' with the cursor on the option, it will tell you what that other option is.
H shows all the info you need about a package and showed me which package depends on cups. In my case, since I manually selected openjdk, cups was autoselected (and could not be deselected) because openjdk depends on cups.

Related

Why do I get error messages like "Unable to activate XX analyzer" in vscode?

I have added some extensions in vscode and after that, every time I open/switch to a tab with a C file, I am getting a dropdown with three error messages about not being able to activate analyzers. Why?
Here are the extensions:
and here are the error messages:
That should be caused by c/c++ Advanced lint module, well the same error can be caused by others modules, those errors occur, when you don't have those modules that you are getting warning about installed, in this case Clang, CppCheck, and flexeLint. Well for the two first you can download and install them from here:
clang: http://clang.llvm.org/ (go to download section)
cppCheck: http://cppcheck.sourceforge.net/
flexlint: here the bad news, that's not a free product, and some kind of expensive. http://www.gimpel.com/html/flex.htm
for those programs, once installed, by default should be added to the system path environment variable (if not you can do it yourself, cppcheck don't add automatically to path in windows), the thing if they are added to the path, vscode or the calling plugin here "c/c++ Advanced lint", will recognize them, because will test if the command is recognized at the console level. If you don't want to add those tools to path, you can still specify in parameters the path to those tools executables, for that you can follow the instruction for every module here they are :
cppCheck : https://marketplace.visualstudio.com/items?itemName=matthewferreira.cppcheck (using this setting cppcheck.cppcheckPath:)
clang: (clang.executable) see here: https://marketplace.visualstudio.com/items?itemName=mitaki28.vscode-clang
flexlint: (c-cpp-flylint.flexelint.executable)
and of course setting the path to executable in each one of those settings.
well you can also check that : https://marketplace.visualstudio.com/items?itemName=jbenden.c-cpp-flylint
it's so often that plugins depends on others programs, on which you need to install manually, and every time, you need to read the documentation for the module to be installed, to see what configuration you need to do.
for the warning about flexlint you can disable it by adding this to the user settings :
"c-cpp-flylint.flexelint.enable": false
that disable completely the use of flexlint, and so the plugin will not search for it. I'm not sure, may be setting cppcheck is sufficient, otherwise you have that to set. I personally have that set. Of course unless you count to buy the product and then just set the path.
hope you all, all the best!

"Undefined variable: Environment" when editing SConscript file in Eclipse Neon

I have an SCons project (an implementation of the Generic Mapping Tools tutorial at http://gmt.soest.hawaii.edu/doc/latest/GMT_Tutorial.html using SCons rather than shell scripts), and I am using Eclipse Neon to edit the Sconstruct file.
The Sconstruct file starts in quite a standard way (the rest of the file is immaterial to this question).
import os
import collections
env = Environment(ENV = os.environ)
bld = Builder(action = 'ps2pdf $SOURCE $TARGET', \
suffix = '.pdf', \
src_suffix = '.ps')
What is annoying me is that while the build works perfectly using scons, Eclipse keeps marking the Environment and Builder constructions as "Undefined variables".
I installed the SConsolidator plugin, but it makes no difference.
I find the marking of an error that is not an error incredibly annoying.
While I could do something like tell Eclipse to ignore the error, I would prefer something more intelligent, such as adding Scons to the library path. I have tried adding C:\Python27\Lib\site-packages\scons-2.5.1\Scons and C:\Python27\Lib\site-packages\scons-2.5.1\Scons\Scripts to the Python Interpreter Paths (Window → Preferences → PyDev → Interpreters → Python Interpreters → Paths), and using an import directive like from SConscript.SCons import * but it doesn't make a difference.
Try library path:
C:\Python27\Lib\site-packages\scons-2.5.1\
Then
from SCons.Script import *
First thing first - if you know exactly where does your plugin keep it's symbol index(es) make sure that they don't get deleted by whatever the editor/IDE/build think they are doing to "be helpful".
Python plugins for editors easily get confused and you may need you to draw very explicit and detailed picture and train them a bit (by stopping the code in debugger) in order for a scanner/indexer to "wake up" and finally scan and index all symbols.
What I do in VS (with PTVS) is to make one proj for Scons_lib (home at C:\Python27\Lib\site-packages\scons-2.5.0), another for Scons_Scripts (C:\Python27\Scripts\, startup file: scons.py)
and then separate projects for separate scons driven folders/builds. To get editor to immediately recognize building files as Python I add extension .scons (google's convention used in Chrome build, Sconcsript's are ProjName.scons), tell VS that .scons is also Python, rename Sconstruct to Make.scons.
Then I run in debugger, (with -f Make.scons -n of course) as many times as I can :-) trying to place breakpoints in different files form different sub-packages that I know will run. Letting scons throw exceptions for nothing (like missing Sconstuct file) is also file - the goal is to force indexer to go places because it sees that debugger is going there.
After N runs, (and/or K days). PTVS (you can consider it a plugin) all of the sudden starts recognizing all symbols, packages, sub-packages, only can't penetrate things explicitly hidden behind caches.
Gave up trying to determine which events exactly make the scanner/indexer see the light. Probably something like seeing the number of files at "unexpected" paths being in debugger. Most symbols are visible in debugger immediately, except for the files that load first (scons.py and my own file that I exec from scons.py to inject whatever I want before anything else runs.)
Also I keep PYTHONDONTWRITEBYTECODE=1 to make sure that it always has to load actual .py-s
It might potentially help to have a single file that would exercise something form every sub-package, litter it with breakpoints and let it be run a few times.

How can I set up a GTK+ Project in Code::Blocks if gtk doesn't have the right subfolders?

I'm following this tutorial on how to set up a GTK+ project on Code::Blocks 16.01. The link in Step 1 to download GTK+ doesn't work, so I instead did a "Open in Desktop" from the Gtk Github repository. When doing Step 3 and giving the path for the location GTK, I get this error:
The path you entered seems valid, but the wizard can't locate the
include directory. The wizard cannot continue.
When I look back at the repository, I see there is no "include" or "lib" subfolder that is needed to make the project. What can I do to setup the project if neither of those folders exist? I realize the tutorial was written in 2013, so maybe it's outdated. There is a 2015 YouTube tutorial about setting this up, but it seems more complicated with setting up environment variables and changing Code::Blocks "Global Compiler Settings", so I was wondering if this 2013 tutorial still works.
That tutorial has a lot of outdated info in it. It recommends GTK+2, GTK+ is now at version 3, moving on to 4, and you'll probably want to follow GTK's methods for installing and setting up instead of orienting yourself around Code::Blocks.
My recommendation would be to follow the GTK+ download instructions and the instructions on how to set it up and maybe these instructions on how to start, then begin making it work with Code::Blocks (for which you probably need to look at this question).
Also, with how much work it takes to set up Code::Blocks for GTK+3 anyway, you may consider using a different IDE.

Code::Blocks not working with GTK3 even after editing the script-gtk-win32-3.0.lib not present

Where do I get gtk-win32-3.0.lib from?
I am trying to use GTK3 with Code::Blocks. The thing is initially when I was trying to create a GTK project, it gave me an error that it can't find gtk.h. I then edited the wizard script and changed gtk-2.0 to gtk-3.0 as seen in an answer on Stack Overflow.
After doing that, it gave me an error cannot find gtk-win32-2.0. I changed this to gtk-win32-3.0 in the script but the error still persists.
I have both the files gtk.h and gtk-win32-3.0 in the GTK directory. I crosschecked this many times. Can someone help me with this?
I just discovered that I don't have a file 'gtk-win32-3.0.lib` in the gtk\lib directory. I manually created one in the directory and now Code::Blocks lets me create a project. I still don't know what should be present inside the library file.
Edit:
The project gets created after I added a blank file named gtk-win32-3.0.lib in the expected directory but the files doesn't get compiled.
Current error:error: ld returned 1 exit status
Didn't get more details regarding the error.
The same program gets compiled when used outside the project as an individual source file.
I just noticed I still have code::blocks installed (version 13.12). Note that I am on Linux. I just clicked on File|New|Project.
I then selected the new project to be a Gtk project, and most everything was ready.
You'll have to fill in a project name (Test99 in the screenshot) and a location.
I suspect you do need to have the gcc compiler installed, and of course the Gtk libraries. You'll also need pkg-config, which is necessary for configuration.
By default, the new project was configured to be a gtk-2 project. But you can change that by changing the part of the includes. Right click on the project name in the left panel (Test99), and select Properties. In Properties, select Project Build Options (don't be tempted to select Options instead of Properties in the previous step. I don't know why, but they're different!)
Select Linker Options, and you should see pkg-config gtk+-2.0 --libs with 'back-ticks' around it. Changing 2.0 into 3.0 should link with the libraries.
Go to Compiler Settings, then Other Options and again, you will find a similar entry pkg-config gtk+-2.0 --cflags (also with backticks). This detects where the gtk.h file lives. (Also change 2.0 to 3.0)
That should be it. This may not be the latest version of code::blocks. If you encounter problems, yell!

Pylint in Sublime Text 2

So, I've been using Sublime for a while as a simple text editor, but I'm venturing into the land of plugins for work and I've run into an issue getting pylint to work. Specifically I have it installed and have the Sublime package manager working, but I'm not sure how to include paths in my sublime settings.
I haven't found very useful documentation on this point, but if you are willing to point me towards it that would be a perfectly acceptable answer. My basic issue is that currently every time I save a file, the following error message shows up:
"Please define the full path to 'lint.py' in the settings"
I understand this error message which is great, I just have no idea where the sublime settings are or what the standard format for defining a path is. Any help would be appreciated.
There are quite complete directions at the SublimeLinter GitHub page that should describe how to set everything up. Briefly, go to Preferences->Package Settings->SublimeLinter->Settings - Default to see where the different settings are defined. Then, open Preferences->Package Settings->SublimeLinter->Settings - User to change anything, as the main settings will be overwritten when the package is updated. Remember that settings files are in JSON format, so you'll need opening and closing curly brackets to enclose settings, and a comma between them:
{
"sublimelinter_delay": 30,
"sublimelinter_mark_style": "none"
}
I haven't gotten the error you have, are you sure you're using the regular SublimeLinter and not the new beta version? I just installed it fresh on my work machine (I've been using it for a while at home) and after restarting ST2 it's working like a charm with Python.
I had the same problem. I found it to be coming from the package "Pylinter". I removed Pylinter and added SublimeLinter, it covers more than python and is well used. I'm enjoying it quite a bit.
From your command line just run:
sudo easy_install pylint
sudo easy_install pep8
After that restart your sublime.
I encounter the same situation today. In my case, that is because I have not installed the 'pylint' in my system yet. It works fine after I installed the 'pylint' through pip.
Just for other people reference.