Node.js compile error on Linux - linux

I'm currently running a heavily modified Synology DSM (x86 bromolow based) on my server (bootstrapped, etc.), and for some services, I would need node.js.
And thus, I've been following the tutorials, more or less. Installed the required packages (python2.7, make, gcc, etcetera), grabbed the source, checked out the latest stable, and tried to compile.
But I ran into a slight issue while trying to run configure. Here's the output log: http://pastebin.com/BPXX4XiY
Then tried with Python2.6 too: http://pastebin.com/Xg4qHspG
Problem is, Error 38 and "Function not implemented" does not give a slightest hint on what might be missing - there is simply no reference to it.
Did anyone else have this problem, and if yes, how did you solve it?
EDIT
Using the solution from here, it still does not work. /dev/shm/ (after manually creating the node, and mounting it) is there, with 0777 access rights, and yet Python still returns the same error.

Related

All node usb libraries do not work and all give some kind of error

I'm developing a VSCode Extension where you can develop CircuitPython code. I want it to be able to upload your code to your pico, or whatever microcontroller you're using.
For this I need to detect all usb drives that are connected, I've tried libraries like node-usb, usb-detection, etc. But they always give some kind of error, for usb-detection for example you need to rebuild the library with this command:
./node_modules/.bin/electron-rebuild
But then I get greeted with this:
text here: https://pastebin.com/E7bjtWgP
I have absolutely no idea what anything of this means, I've installed vs build tools 2022, 2017 and even added it to my community installation.
After that I tried the usb library. Which again, greets me very kindly with:
I've also tried some other libraries but they all give a similar result. Some do this:
And I've also seen some very questionable things like this:
I've been googling, and debugging now for roughly 4 hours and atm I'm tired so I'll probably try again in a couple of hours.
EDIT:
I've made an entirely new project, moved over all the code and it now works. I have absolutely no idea what the problem was but at least its working now.

Using Eclipse (with Debian) to modify applications from the official repository

For a university project, I am trying to find a not so cumbersome way to effectively modify certain applications from the official Debian repository, such as eog. I want to clarify that I am unfamiliar with Linux and GTK. My idea was to be able to work comfortably in terms of finding variable and function definitions, trying step by step debugging while getting used to gtk+ and the application's source code. I tried to understand the code while working from the terminal, but in my opinion, it was a pain i* t** a**.
So far, I managed to install the application's build dependencies with
sudo apt build-dep eog
and I received the source-code with
apt-get source eog
After I installed eclipse, I tried to get gtk+ running with the minimum example from the gtk+ reference manual. I found a very useful easy explanation here. It's the answer from Wed, 04 November 2015 12:51.No problem so far. So in theory, I should be able to write GTK+ applications in Eclipse. But when I am trying to make a new project and include eog's .src and .h files, I am running into a mass of unresolved inclusions, missing header files, undefined references etc...
So I wanted to ask: Did anybody work on similar tasks and can provide some help? Or: Does anyone have a better idea maybe?
If anybody should come across this ever again: I found an alternative solution: When you download the source-files of eog, you will come across the meson-build system. Eclipse supports C meson-build projects. I just copied all downloaded source files into the meson-build project in eclipse in could compile it right away.

C++ entry points not showing up in node.js profiling output

When running node --prof <command>, then later node --prof-process on macOS, my profiling output no-longer shows any of the C++ entry points, leading to a lot of unaccounted-for gaps in my profiling data. Changed around the same time, I now just see the node binary in these profiling trees where it wasn't showing up before, so it's like the profiler is no-longer able to "dive in" to the internals of node.
I think this started when trying to improve dtrace permissions with csrutil, but I've restored things back to their factory settings and this still happens.
What causes C++ entry points to not show up in traces? Is there a way to fix the issue?
Update:
Just tried turning off SIP entirely with csrutil disable (which is a bad thing to do), and the problem persists, so maybe SIP is a red herring here.
The amazing wizards in the node.js github issues figured this out.
In short, I learned that two commands are used by the profiler on macOS: c++filt and nm. When I tried reporting which versions of those commands I had installed, I got this message back for nm:
» nm --version
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
Apparently the requirement of accepting the license was added, perhaps after an upgrade, and this was blocking the ability for the profiler to look up and demangle C++ symbols. After I accepted the license, the profiler started working normally again.
Hopefully this helps others running across the same scenario.

debian shared library is not being loaded properly after oracle xe installation

I am facing a strange problem, maybe somebody can point me to right direction.
I have an application that uses a shared library that I built back in the day, shared library is stored under /usr/lib/ folder. My application binary used to work OK with this set up. Yesterday I tried to install ORACLE-XE to my linux distro. Ran some scripts that set some environment variables. My installation failed and I had to uninstall ORACLE-XE.
When I came back to work today, I tried to run my binary just like I used to, but I've seen some errors about undefined symbol. Symbol name was related to the shared library that I used seamlessly for months. I have the same setup in other machines, I confirmed that application is still working there, so I copied application binary and shared library from other computers to the computer that I am working on, still no luck. It seemed to me that like shared library is not being loaded at all, I tried deleting the shared library and running the application one more time, I received the same error, right around the same time.
I think the oracle scripts might have mingled some of the environment variables, therefore shared library can not be loaded. I am not sure what to check next though, any suggestion would be appreciated.
ldd application-name helped me to identify where the shared library is being read from, it appears that there was another version of shared libary under /usr/local/lib, which was causing the issue.

Please recommend a way to deploy into a Linux box in a LAN environment

have you struggled with Linux deployment before?
I need to deploy an application into a dedicated Linux box with no outside network access.
The configuration should be as simple as possible, robust for different configurations (missing libraries and build tools) and preferably automatic. Another difficulty I need to consider is that I need to connect to an Oracle database.
What would you recommend as the best way for deployment? I have some ideas, but not sure which is the best.
I can use Java
I will need to install JDK, and that solves mostly everything
Another big problem is that the code we presently have in Java is poorly written and slow.
I'm not sure if I need to install Instantclient to connect to Oracle under linux
I can use C (I do have the source code for a very well-written LGPL program)
And use dpkg to deploy
The Linux box is most likely a Ubuntu server, but I'm not sure which version is installed
I can't use apt-get, but I can copy all the packages I need
I know I can use dpkg -s to check which packages they are, but I'm really not sure if I might miss dependencies.
I guess I will need build-essentials and pcap or such
And use static linking
I configured it with ./configure LDFLAGS=-static with no errors and it works on my computer now
I have chroot into this directory and run it without problems, does this mean this is okay?
I really need to test this on a new Linux box to make sure
And use Statifier
I browsed stackoverflow and found this app, haven't tried it out yet.
Seems like people have used it with mixed success.
And create a build environment and make
I have no confidence that this is going to work
Using C leaves some problems
But the program is incomplete, I have to process this data, preferably not in C.
I have to install Instantclient, which is difficult to deploy
I can use Perl
I can't use CPAN
I have already downloaded the libraries, so maybe I could just copy them into the deployed machine, I am not sure how or whether this works
Perl is slow
I have to install Instantclient anyways
Please share your similar experience.
C with static linking solves a lot of the portability problems at the expense of a larger executable. To make sure that everything is truly getting statically linked and not secretly depending on any outside libraries, run ldd on your executable and make sure it isn't dynamically loading everything. Note that this won't be 100% portable amoung various linux machines because Oracle instantclient has some dependencies on kernel versions, but it should work on any reasonably new kernel.
Edit: If the box has LAN access and and just no internet access, why not run your own apt repository on the local network. You could even create a .deb for your application and put it on the same server, than on that machine you just need to execute apt-get myApplication and it will pull down your app and any noninstalled dependencies as well. Setting up an apt mirror is actually pretty easy and this would be pretty slick. If network access is missing alltogether, you can still create an install dvd that has all the debs including your app and set up apt-get to pull from there.

Resources