Configure Eclipse for kernel module development - linux

I am trying to configure Eclipse for building a custom kernel module. For that, I am using my own custom makefile, which is not managed by Eclipse. I have got everything working (the code compiles), apart of the IDE "seeing" all of the sources and not yielding errors:
I tried following this guide: Configuring Eclipse for Linux Kernel module development but it did not help me.

Related

vscode crashes on Arch linux when opening file/folder

Installation vscode
I'm running Arch Linux (Manjaro) and installed vscode with:
sudo pacman -S code
but then a simple .NET core program resulted in
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
It seems like the official Microsoft build should be obtained via the snap store:
sudo snap install code --classic
And the program looks normal. I can install plug-ins, create a new file et cetera.
Problem
However, I cannot open any files or projects. Doing so results in vscode crashing. I read that code --disable-gpu could solve this problem, but doesn't do so for me.
Any ideas
what may cause this crash?
or how to get the pacman vscode working?
Logs
$ code --verbose
Gtk-Message: 22:59:19.805: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:59:19.805: Failed to load module "canberra-gtk-module"
(code:33833): GdkPixbuf-WARNING **: 22:59:19.817: Cannot open pixbuf loader module file '/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
[33863:1104/225919.911481:ERROR:appcenter_api.cc(52)] expecting appcenter url prefix
[main 2020-11-04T21:59:19.960Z] Sending env to running instance...
[main 2020-11-04T21:59:20.041Z] Sent env to running instance. Terminating...
[main 2020-11-04T21:59:20.041Z] Lifecycle#kill()
where the recommended gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache results in bash: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache: No such file or directory
I'm running Arch Linux (Manjaro) and installed vscode with:
sudo pacman -S code
but then a simple .NET core program resulted in
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
I had the same issue trying to get the debugger to work and I spent hours on finding the reason for this. What I found out is that the debugger only works with officially signed Microsoft binaries of VSCode. So you have to make a distinction here:
The package code contains the open source version of visual studio code, a build wich anyone can make using the provided sources by Microsoft. The program which you get here is therefore not signed by MS!
The package visual-studio-code-bin provided by the AUR contains a officially signed version by MS. If you use this package, the debugger works as expected.
I do not know wether snap - which I personally never used at all - provides this kind of package, so I can not tell anything about that, but using the said package from the user repository solved the problem for me reliably.
Try this one (which I installed just yesterday under the recent manjaro distribution and it worked fine) and see if this solves your problem with opening files and folders.

Making Lazarus compile for Windows CE

I've been trying to set up Lazarus to compile for Windows CE 5.0, specifically for a Motorola MK-4000. However, I'm not having much success, and the instructions to set up the IDE appear to be outdated.
I'm using Lazarus v1.8.4 for Windows x64.
The problem starts when I'm told to download and install cross-arm-wince from the same download page as Lazarus. There is no such thing there. I did however find lazarus-1.8.4-fpc-3.0.4-cross-i386-win32-win64.exe which is the only mention of "cross" I can find. Not what I need, but installed anyway.
Now I go to set up my project in the IDE. I start a new application, but Project -> Project Options -> Compiler Options -> Paths -> LCL Widget Type or Project -> Project Options -> Compiler Options -> Paths -> Select another widget set (Macro LCLWidgetType) are not found, nor do I see any mention of "Widget".
Next two instructions for Target OS and CPU Family are okay, I found those settings and changed to WinCE and arm.
Upon saving project options, I see an error message:
Compiler "C:\lazarus\fpc\3.0.4\bin\x86-64-win64\fpc.exe" does not support target arm-wince
Except for the "Widget" setting I couldn't find, now I try to go ahead and build a new unaltered application. But to no surprise, I get an error:
Error: ppcarm.exe can't be executed, error message: Failed to execute ""ppcarm.exe" -Twince -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -FuC:\lazarus\packager\registration\ -FUC:\lazarus\packager\units\arm-wince\ fcllaz.pas
I went ahead and installed the arm-wince from FPC 3.0.0 (My Lazarus version came with 3.0.4), and it installed into its own FPC directory outside of the Lazarus directory. However I'm extremely new to FPC/Lazarus and have no idea how to make the IDE actually work with the other compiler.
As a dirty trial, I temporarily copied the compilers from the 3.0.0 dir to the 3.0.4 one, and the first attempt failed (I didn't note the error message at that time), but I just tried again and it compiled! Obviously blindly dumping files into the bin is not the appropriate solution, as I'm sure there's a proper way to configure this. It doesn't run on the device anyway, just shows the title in the taskbar and no UI ever opens.
What am I missing to get Lazarus to compile for Windows CE?
Well, that is a win32->win64 crosscompiler. You need a win32 -> arm-wince compiler. (assuming that the device is arm and not i386)
Not the same thing. Seems that prebuilding for arm-wince has stopped, so you have to build your own. Try reading the buildfaq.
For 3.0.0 the relevant crosscompiler is prebuilt, maybe it is enough for simple testing: ftp://ftp.freepascal.org/pub/fpc/dist/3.0.0/arm-wince/

How to make self-contained or java-bundled JavaFX application package for ARM

Where could I acquire a working copy of compiled JavaFX app bundled with JRE so I could execute this app on ARM linux?
or
How can I create my JavaFX app + JRE bundle that would work on ARM Linux
Best case scenario for me would be to be ableto create copy-paste enabled folder tree or single executable file..
I do understand that this question might be too vague, but I desperately need some help on this. I have spent more than 6 evenings + 2 nights searching how to get a compiled JavaFX application ( .jar file) to run on ARM linux on UDOO (RPi2-like) board.
I have been more of an .NET guy a long time, and now I had to make WPF-like rich UX app that would run on this specific hardware, and I chose JavaFX due to its likeliness to WPF. It does run fine on my desktop PCs but I absolutely can not get it to run on ARM linux.
I am trying to do this too. Did you get it working? My solution is to package the JAR using tools provided by IntelliJ or any other IDE, include the JRE in a folder within the app, then write a script that invokes the JAR from the included JRE like:
lib/jre/bin/java -jar runthis.jar
I also tried it for two days now but didn't get it to work.
I use maven in combination with the javafx-maven-plugin to build native installers of an application.
At first I got the error, that the javafx-ant.jar tools are missing:
[ERROR] Failed to execute goal build-jar(create-jfxjar) on project foo:
Execution create-jfxjar of goal build-jar failed: Plugin javafx-maven-plugin or
one of its dependencies could not be resolved: Could not find artifact
javafx-packager:javafx-packager:jar:1.8.0 at specified path
/opt/jdk1.8.0/jre/../lib/ant-javafx.jar
Then I found the ant-javafx.jar in a windows JDK but then another error was reported that linux is not supported with this one. Ok so I downloaded a linux JDK and used that ant-javafx.jar. Now it could build and create a *.deb file successfully!
However when I started the installer it failed with a message and when checking the log (/var/log/apt/term.log)
Log started: 2021-04-29 00:40:01
dpkg: Error creating archive
/home/pi/Foo/target/jfx/native/foo.deb (--unpack):
package architecture (amd64) does not match system (armhf)
Then I did research and found the following mailing list entry:
[...] the Java Packager isn’t shipped with any ARM builds that I’m aware of. Currently it is only for X86 Windows, Linux and Mac. [...]
This basically explains it: The packager doesn't work on ARM for now. Maybe we should write the guy to encurage him to add it...
=> So for now I work with the jar directly.

Error with wxWidgets minimal app

I recently began learning wxWidgets. As all learners do, I first wrote and tested the Minimal App (on my Ubuntu 12.04 LTS). It worked like a charm.
I then decided to test the application on my Windows 7 PC. I built wxWidgets (Debug and Release builds) using Visual C++ 2008 Express following instructions from here. I also built the Minimal App (Build and Release configurations) following the same instructions. The application worked perfectly on my computer. To check whether there were any problems, I sent the executable to a friend of mine. He tested it on his XP PC and it gave him the following error:
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more details.
I have checked that I am using the Multithreaded setting in the build options for both the Debug and Release versions of my application. However, neither of the generated executables works on my friend's machine.
What am I missing out here?
You are missing the C/C++ runtime libraries.
The simplest solution is to build both the wxwidgets libraries and the application with the /MT switch rather than the /MD switch in Project | Properties | C++ | Code generation | runtime libraries

How to build a mozilla firefox NSAPI sample plugin with only Gecko-sdk on linux

I have built the gecko-sdk NSAPI sample plugins on Windows (using visual studio project files), but I would like to develop some plugins on linux platform.
The mozilla site only covers setting up gecko-sdk for windows:
https://developer.mozilla.org/En/Creating_XPCOM_Components/Setting_up_the_Gecko_SDK
However, the gecko-sdk code only includes a makefile.in file (no configure.in/ac/am that autoconf needs to generate a configure script).
I know that I can create the plugins Makefile if i build using full mozilla-source (firefox source)and I add the plugin directory to MAKEFILE_plugins in mozilla/toolkit/toolkit-makefiles.sh
then do a ./configure at top level.
But how do i do it for gecko-sdk?
Heres the plugin code:
http://mxr.mozilla.org/seamonkey/source/modules/plugin/
How do I build the samples on linux?
This isn't really an answer, more of a similar-but-different problem that might help you out.
Awhile ago I built a C++ XPCOM extension on OS X, and I didn't (have to) use the configure/Makefile from gecko-sdk. Rather, I just called GCC in my own little Makefile.
The only thing to watch out for is to use the compatible compiler and build flags. You can look at a build log for firefox for your distro to figure out what build flags are appropriate, eg: for Ubuntu.

Resources