|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
NodeJS
Hi all,
i'm trying openbsd 6.8 on my laptop for the last couple of days and want to use "in production", which means as my daily driver for work. I need nodejs in different versions, 12/10/8. version 12 is available via pkg_add. Do you see any chance to get/compile older versions of node? This is a kind of show stopper for me, because the project I'm working on need all these lower versions of node. Can I jump back i the history of the ports tree and compile the port node in the particular version I need? Or would you start a VM in an openbsd version which contains the node version I need, installit there and copy the binaries over to my host system which is openbsd 6.8? Or do you see any other solution? Thx Marko |
|
|||
Copying binaries from an older OBSD version probably won't work as they will be linked against libraries that may not be present on the newer installation of OBSD.
Your best bet is probably to get the old version of the port out of CVS. You may need to update the port for any changes to the ports infrastructure. Then build it yourself. I've had to maintain older versions of PostgreSQL for work this way for a number of years. Even if you get node compiled, node modules are particularly troublesome, though, as they often hard code linuxisms and won't compile on OpenBSD. |
|
|||
You mean
* checking out the latest ports tree * copy over the content of node in the version i want to have * build it I'm getting errors when compiling node in revision https://github.com/openbsd/ports/com...85dda79401de15 The errors are about SSL. I tried to use shared-ssl or without-ssl option. without success. :/ Last edited by mbauhardt; 3rd January 2021 at 12:11 PM. |
|
|||
Can you build the current port?
|
|
|||
yes, I'm able to build the current port.
I thought building node with pkgsrc would be a good option. But, It it failed as well with with missing headers... (ext/stdio_filebuf.h) Anyway... |
|
|||
I'm going to give you a bit of a hard time on this because you basically have to become the maintainer of the node port for yourself and learn all that there is to doing that if you want to keep older versions running.
Your post was sparce on info so I'm only assuming what you saw and did... You didn't post the error message, but I assume I got the same one. What you listed as having tried is not what the error message told you to try. You have to pay attention to the errors. But even that ends up being a workaround and not the solution. You know that the build used to work. You have to figure out what's changed between then and now. In the port and in OpenBSD. Save the current node port, check out the old one. Diff them. Look at the history in CVS between the two and read the commit messages. And understand what the node build is doing. As I said, you have to bring any port changes made for the infrastructure back into the old port. It takes some time, but it's not hard. You have to put in the work. This is for your job, not mine. If you don't want to or can't put in the work, then I suggest you just use Linux and NVM. I am sure you have plenty of other problems to solve. |
|
|||
Yes, sorry for beeing quiete about the error messages. (I'm logged into the forum from another computer).
What I understand is exactly what you wrote. I have to backport commit by commit all the changes they are made into the current. The thing is I need at the end of the week a "working" machine for work. So as you suggest, I go back to linux work with that. But this time I will create a separate partition of BSD. Maybe I will try NetBsd which have the different node versions. Or I will invest the time and energy to backport the previous node versions I need. Thanks for your time. I learned something about OpenBSD, it feels awesome but I have to accept some workarounds or extra steps to get my env running. Which is fair. Thx Marko |
|
|||
Yes,
i have to tackle the learning curve about working with ports tree in order to get the knowledge how to backport changes etc. I'm working as sw dev where we are working on a commercial product and we have to maintain older versions of it incl e.g. working with older versions of node. Switching between branches and enable node with 'n' or 'nvm' is more convinient than working on 3 different machines or VM's etc. But maybe I have to be openminded and try such a solution. thx for your input. |
|
||||
The ports tree does have a few examples of managing multiple versions of an application at the same time: lang/python and lang/erlang come to mind, as well as the special case toolchains devel/autoconf and devel/automake. So it is not an impossibility.
|
Tags |
node, nodejs |
Thread Tools | |
Display Modes | |
|
|