How can I run VisualWorks under OpenBSD? - smalltalk

Has anyone gotten VisualWorks running under OpenBSD? It's not an officially supported platform, but one of the Cincom guys was telling me that it should be able to run under a linux compatibility mode. How did you set it up?
I already have Squeak running without a problem, so I'm not looking for an alternative. I specifically need to run VisualWorks's Web Velocity for a project.
Thanks,

if you're wondering about setting up linux compatibility mode and you're running the GENERIC kernel:
# sysctl kern.emul.linux=1
to enable at boot uncomment the kern.emul.linux=1 line in /etc/sysctl.conf

See the OpenBSD FAQ, specifically section 9.4 - Running Linux Binaries on OpenBSD.
Typically there are more steps needed then just kern.emul.linux=1 unless you have statically linked (i.e. completely stand-alone) binaries. The good news is that packages exist that contain Linux libs, and they are easy to install. This is all detailed in the above link.

Related

Can you make WSL interface with windows installs? [duplicate]

How do I avoid installing same programming languages both in WSL and Windows10?
I am thinking about using WSL as a dev workspace. However, I realized I will need to install Node.js, Python, create-react-app, and so on in WSL even though my windows 10 already have them installed.
It would be helpful if you could spare me some advice.
Thanks.
To some degree, it depends on what type of development you are doing. Given your example languages/tools, I'm going to assume that most of your development is platform agnostic, web-development, etc.
My recommendation is to go all-in on WSL and install the Linux versions of the tools you use (with some notable exceptions covered below).
Uninstalling the Windows versions is recommended, but not strictly necessary. I recommend uninstalling because I continue to see a number of questions across the Stack sites where it becomes apparent that the Windows version of Node or Python is getting called from inside WSL. It's likely that some tool, such as nvm or equivalent, attempted to prepend the Windows Node or Python location to the Linux path.
This causes problems, as the Windows versions Node and Python understand Windows paths and processes. When you call them from the Linux shell in WSL, the shell/OS uses, of course, the Linux versions. And Windows Python just won't understand something like /mnt/c/Projects. It needs C:\Projects. You can work around this with utilities such as wslpath (automatically installed in some WSL distributions, installable in all others), or you could just manually adjust the path. But ... why go through the hassle if you don't need to.
Just use the Linux versions, with the corresponding Linux paths and instructions. Most development tools, tutorials, instructions, etc. are going to "default" to the Linux doc. It will typically be more complete, more up-to-date, etc.
And, of course, the Linux command-line experience is (subjectively, sure) far-and-above better than PowerShell. Don't get me wrong, I like PowerShell, but I like PowerShell even better when I call it through WSL (powershell.exe or pwsh.exe), since I can take advantage of Linux niceties like less (or bat), jq, and many others.
Not to say there aren't WSL caveats that you have to get used to. Be prepared to run into a few snags here and there (lack of Systemd support, permissions, filesystems, inotify), but most everything has a workaround that you'll typically find here on Stack (Stack Overflow, Ask Ubuntu, Unix & Linux, and/or Super User) if you search.
And for those "notable exceptions" I mentioned, I recommend installing:
Windows Terminal (available in the Microsoft Store), which will provide an upgraded terminal experience for WSL.
The Windows version of Visual Studio Code -- I've seen a question from someone here who tried to install the Linux version. It's just not necessary. Microsoft has done a great job of integrating the Windows version of VSCode with WSL. Just install the "Remote Development" extension pack, which includes the "Remote - WSL" extension.

Issue when trying to run passenger on Apache

I am getting this issue when running
httpd -t
httpd: Syntax error on line 545 of /private/etc/apache2/httpd.conf: Syntax error on line 1 of /private/etc/apache2/other/passenger.conf: Cannot load /Users/sbaidon/.rvm/gems/ruby-2.2.5/gems/passenger-5.3.5/b
uildout/apache2/mod_passenger.so into server: dlopen(/Users/sbaidon/.rvm/gems/ruby-2.2.5/gems/passenger-5.3.5/buildout/apache2/mod_passenger.so, 10): no suitable image found. Did find:\n\t/Users/sbaidon/.rv
m/gems/ruby-2.2.5/gems/passenger-5.3.5/buildout/apache2/mod_passenger.so: code signature in (/Users/sbaidon/.rvm/gems/ruby-2.2.5/gems/passenger-5.3.5/buildout/apache2/mod_passenger.so) not valid for use in p
rocess using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.\n\t/Users/sbaidon/.rvm/gems/ruby-2.2.5/gems/passenger-5.3.5/buildout/apache2/mod_passen
ger.so: stat() failed with errno=22
Passenger installation is just fine.
I ran into this too: the issue is that the built-in httpd that comes with macOS Mojave has Library Validation turned on, which means any modules it loads must be properly signed. Unfortunately, mod_passenger.so is not signed, so loading fails. Actually, a lot of people are having this problem with loading Apache modules on macOS Mojave (especially during the beta), some example references:
https://github.com/GrahamDumpleton/mod_wsgi/issues/357
https://github.com/phpredis/phpredis/issues/1406
I believe it's possible to set up a plist somewhere to give an entitlement to httpd to disable library validation (com.apple.security.cs.disable-library-validation) as described at https://developer.apple.com/documentation/security/com_apple_security_cs_disable-library-validation. For instance, here's a recent WebKit patch where they add it to allow plugin loading: https://bugs.webkit.org/show_bug.cgi?id=183252. Similarly, here's the Mozilla people talking about how they need to enable this (and other) properties: https://bugzilla.mozilla.org/show_bug.cgi?format=default&id=1470597.
Unfortunately, I don't do macOS development (I just do development on macOS) and I have absolutely no idea how to apply it to the built-in Apache, I'm sorry.
At this point I'm kind of sick of every major macOS update nerfing all my httpd settings and generally being a pain (it's infrequent but it's still annoying), so I'm doing what I should have done years ago: stop using the built-in httpd that comes with OS/X and just use Homebrew httpd.
Here's some instructions I found regarding setting up Homebrew httpd (and disabling the built-in macOS httpd), it's pretty straightforward and you don't have to follow all of the directions about multiple PHP versions etc: https://getgrav.org/blog/macos-mojave-apache-multiple-php-versions
If someone can figure out how to disable Library Validation in the built-in httpd, or if there is some way to provide signing on mod_passenger.so (seems unlikely since both the Homebrew and gem passenger need to be buildable from source), you don't need to junk the built-in httpd. But I personally think the best solution is to move away from it entirely and use the Homebrew version instead.
For anyone having this issue or any issue with library validation in macOS Mojave, I found an incredibly easy fix to disable it. https://github.com/mologie/macos-disable-library-validation
This is fixed in macOS 10.14.4

Run linux distro of choice inside existing distro

Just wondering if it's possible and what the best route might be to run a full-on Linux distro within my existing distro? It would be great to for instance run Arch Linux within a chroot, jail, etc.. I believe people are doing this on Chromium for example.
I would require that whatever fs loaded, I can install packages using pacman and that my changes are kept intact.
I have tried the Virtualbox route by the way and there is a pretty nasty bug involving double mouse pointers on rotated host screens that I can't seem to get around.
I should mention that I'll be using this chroot environment for development, maybe running the odd X client to be exported remotely, etc..
I followed the chroot guide at https://wiki.archlinux.org/index.php/Change_Root and basically installed a whole Arch system within a nested chroot according to the Arch Linux installation guide and I'm now able to switch to the environment at will.
There is a tool https://github.com/fsquillace/junest that does everything automatically for you (downloads and unpacks ArchLinux distro inside some folder and chroots there).

How to install recent mono and monodevelop?

I tried to install mono and monodevelop on centOS 6.3.
After many hours I was able to install mono but failed with monodevelop.
I'm really astonished how difficult and time consuming it is, to get a recent mono/monodevelop version on linux installed.
Is there nobody willing to write and maintain an install/compile tutorial to get the most recent mono/monodevelop/monodata/ASP.NET MVC/... version on the major linux distributions (Centos, Ubuntu, Suse, Debian) installed?
I think many people developing on Windows (with limited linux knowledge) would like to start using mono, if the boarding hurdle would be somehow lower.
It may be the most important to make Mono more used and more visible.
Please, write a tested tutorial (script) for compiling mono/monodevelop.
Thank you!
I have created a project on Open Build Service, which produces builds of the latest MonoDevelop 4.0.10 for Debian, Ubuntu, CentOS, and Fedora.
see https://build.opensuse.org/project/show/home:tpokorra:mono
For installation instructions with apt-get or yum, see:
http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=monodevelop-opt
I hope this will increase the usage of MonoDevelop on Linux Desktop environments.
Monodevelop 4.
If you use any *buntu. Check this.
"You can open up the terminal and install it via the following:
1. sudo add-apt-repository ppa:keks9n/monodevelop-latest
2. sudo apt-get update
3. sudo apt-get install monodevelop-latest"
http://mono-d.alexanderbothe.com/?p=101
Xamarin should be doing a better job at publishing the linux packages in a one-click manner. I don't care what linux distro (SuSE, RHEL, CentOS, Ubuntu etc) - just pick any one as the supported one and publish for it. It seemed that it used to be SuSE but even that has old packages as seen within Zypper/YaST.
Update Mono framework
Having said that, to update the Mono framework itself, without letting go of the package managers try this. This will work as long as the project dutifully publishes the RPMs. You don't want to build from source since it's a more fickle process and the setup distracts from your real objective (i.e. develop).
Obviously, please replace the URL below to what will be latest by the time you're reading this.
mkdir mono-rpms
cd mono-rpms
wget --reject "index.html*" -nd -r -e robots=off --no-parent http://download.mono-project.com/archive/3.2.3/linux/x64/
sudo zypper install *rpm
Update MonoDevelop (the IDE)
Timotheus Pokorra's answer indicates he's filling in some of the usability void left by Xamarin (Thanks Timotheus!!). You can install MonoDevelop via
http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=monodevelop-opt
Note that on SuSE I get the error
Problem: nothing provides liberation-mono-fonts needed by mono-libgdiplus-opt-3.0.12-7.1.x86_64
Solution 1: do not install monodevelop-opt-4.0.12-5.2.x86_64
Solution 2: break mono-libgdiplus-opt-3.0.12-7.1.x86_64 by ignoring some of its dependencies
I (very reluctantly) selected to break the dependency. Note that I already had liberation-fonts (via sudo zypper install liberation-fonts). I don't know if its the same/different as liberation-mono-fonts. Anyway, hope Timotheus fixes it when he has a moment.
I'm not sure if you've already seen this, but this may help:
http://www.mono-project.com/Parallel_Mono_Environments
The most common problem that new developers have when coming to Linux from systems like Windows is not properly setting up their environment variables and so when they do the standard ./configure && make && make install routine, when it involves a number of source packages (like Mono does), any package that depends on the core package won't pick up the correct location for that base package.
Your question really doesn't explain what parts you found confusing or difficult so it's hard to address those issues.
For people unfamiliar with setting up Linux systems, it may be easier if you just go with a system like Ubuntu which has fairly recent pre-built packages (although not the latest - I don't think any Linux system keeps up with Mono releases) rather than wrestling with the learning curve of how to build everything yourself.
It is confirmed that in the near future Xamarin will support Linux and provide binaries (mono and mainline applications) for Debian and Centos derivatives, and their are already packages for Debian and Centos derivatives for technical preview. So cheers and no more pain of compiling and even parallel mono installaions.It can not get more easy than this. Check here

Installing Apache Web Server on 64 Bit Mac

I know that MAC OS X 10.5 comes with Apache installed but I would like to install the latest Apache without touching the OS Defaults incase it causes problems in the future with other udpates. So I have used the details located at: http://diymacserver.com/installing-apache/compiling-apache-on-leopard/ But I'm unsure how to make this the 64 Bit version of Apache as it seems to still install the 32 bit version.
Any help is appreciated
Cheers
Add this to your ~/.bash_profile which means that your architecture is 64-bit ant you’d like to compile Universal binaries.
export CFLAGS="-arch x86_64"
This page claims that a flag for gcc (maix64) should do the trick. Give it a whirl, and if you need any more help, post back here.
Be aware that you may run into issues with your apache modules. If they are compiled in 32-bit mode, then you will not be able to load them into a 64-bit apache.
I had this issue with mod_python, took a bit of thinking to figure out this was the reason.
Don't export CFLAGS from your .bash_profile or any other dot file. Your home directory could live on for decades, the system you're currently using is transient.
There's a guide on Apple's web site, Porting UNIX/Linux Applications to Mac OS X, that talks specifically about how to make autoconf and make and other similar build systems fit into the Mac OS X Universal Binary scheme. If you're going to build cross-Unix applications on Mac OS X, you need to read and understand this guide.
That said, I strongly question why you want to build Apache 64-bit. Just because Leopard can run 64-bit software doesn't mean you want all software on your system to be 64-bit. (It's not Linux.) In fact, virtually none of the software that ships with Leopard runs 64-bit by default, and most of the applications included with Leopard only ship 32-bit.
Unless you have a pressing need to run Apache 64-bit, I wouldn't bother trying to build it that way.
If you would have read a bit further on the same site there is some information on compiling Apache in 64 bits mode!
http://diymacserver.com/2008/10/04/update-on-64-bits-compilation/