Solaris (SPARC) development environment - gcc

I'm working on a cross-platform application for which I would like to include Solaris/SPARC support but I no longer have access to a server. I have an OpenSolaris VM on VirtualBox but I don't know of any SPARC VM which I could use to compile and test on. Did I miss something? Otherwise, do you know of solaris/SPARC shell account services with the gcc toolchain, preferably free ones?

That question is similar to this one. I haven't seen anything about Solaris running on qemu, otherwise you can get SPARC hosting for $10 at polarhome.

You can get a free SPARC emulator from http://www.stromasys.ch/virtualization-solutions/virtual-sparcstation/.

Related

can compiled perl v5.28.0 from src (with gcc 4.8.5) run on RHEL 5.5?

My question is about whether if it would be possible to run a compiled perl 5.28.0 from source (with GCC 4.8.5 on CentOS 7) to be able to be used on RHEL 5.5 (Tikanga) where GCC version is lower and so would be the other libs like libc, glibc, etc.
Our production environment is running very old perl version (5.8.8) and due to security concerns, it is under heavy lock down, i.e. most of our servers lack make, gcc and related tools and there is no root access available to anyone
I was wondering if it would be possible to compile perl from source i.e. latest 5.28.0 with GCC 4.8.5 AND try to use this compiled version on our production servers (with GCC 4.8.2).
This will save me tonnes of headaches with slow bureaucracy and I can get going with my project with the new tools.
Have not been able to find any discussion or hint about this subject. Can anyone shed some light?
Thank you in advance.
Update after 2 days:
As it seems Perl 5.28 compiled on RHEL7 does not work on RHEL5.5. You will have to compile it on RHEL5.5 and make it relocatable for further usage on any server.
So I Downloaded the RHEL 5.5 and CentOS5.5 ISOs and ran into bootable iso related issues.
Couldn't make a suitable bootable disk for both rhel 5.5 and centos5.5.
rhel5.5 iso was a single dvd image and upon doing file rhel5.5.iso on command prompt, it showed bootable. tried unebootin, rufous iso creator, dd command and created ISOs and tried all of them one by one, but couldn't get it to show boot menu. tried FAT, NTFS FS while making boot disk. Stuck here now.
Centos5.5 iso came in 8 pieces of 600mb files. Had to create a single iso image out of it and found some online procedure to do it and made one ISO file. Got boot menu and looked like it worked. But then it got hung up on doing some sort of source media check test and couldn't proceed further. Found a fix related article that you imprint md5sum on iso and it should work but it didn't.
Just now found something on grokbase and it mentions a new technique, that could take me forward from the point of failure mentioned in point no.3 above.
Edit: static compilation bypasses the problems you are cautious about. You need to figure out whether the result is suitable for your intended purposes.
Otherwise you contend with traditional compilation like you had planned. If the libc is too different, it won't work. You could certainly just go ahead and try, then you'll know for certain.
The real solution is to set up a copy of your production environment (can be in a virtual machine) and compile stuff there.
You could try PerlApp + ActivePerl from ActiveState.com (maybe a part of PDK, Perl Development Kit). I've used it for many years. It compiles perl source and include modules (compiled modules also) into a .exe-program file on Windows and a binary executable file on Linux. There is a payed version and a free/demo version. The payed version allows for cross-compilation and more versions of Perl if I remember correctly.
You might run into trouble with differing versions of glibc/libc on dev vs prod computer, so try to use PerlApp on a CentOS 5.5 Linux (free) for compilation. CentOS5.5 resembles RHEL5.5 enough for most projects. Good luck.
Try perlbrew (is an admin-free perl installation management tool)

I have a windows pc, can I develop with LAMP?

I have a pc running windows but I want to use a linux server. Is there a way for me to develop my website on my computer before I rent space on a server? Also its probably important to note that I have no linux experience. Should I just stick with wamp?
Unless you specifically and purposely use .NET features in your PHP Application, then an application developed in WAMP will work fine on a LAMP Server as long as you have included all the same PHP plugins.
PHP is independent from Linux or Windows. 99.9% of the time you have to knowingly use features from the host OS.
You should try ubuntu in a virtualbox, there are lots of well written guides that'll get you up and running.
For best performance, use coLinux. Install a linux distro like ubuntu (easier for beginners) and you should be ok.
Yes. I have developed and maintained a website like this before. My development environment was WAMP and the server was a LAMP shared server. Shouldn't be a problem till your site is using fairly basic libraries and they are available both for windows/linux.
However as others mentioned, its wiser to have the development environment as close possible to the production environment. You don't hit any surprises that way. And hey its not difficult and involves no cost:
You can use dual boot to have linux as other operating system.
Depending on your machine, you can just install VirtualBox and install a Linux VM.

Compile Ada program for Linux using Windows

If I want to compile a program that is written in Ada, I have to use GNAT, of course.
As my Computer has Windows as its sole operating system, I cannot use GNAT, normally. Right? Thus I got Cygwin which enables me to use GNAT on Windows.
But the result is an executable that runs under Windows - not Linux. So how can I compile the Ada code for Linux although I only have Windows? (Please don't think about the reasons ...)
Is this possible with Cygwin? Do I have to install a virtual machine with Linux? Or is there another (easier) solution to this issue?
I have to use GNAT, of course.
Not true; there are other Ada compilers. (GNAT is the only one I know of that's free.)
Running GNAT under Cygwin gives you Cygwin executables, which are Windows executables that depend on cygwin1.dll. They will not work on Linux. See the "What ... isn't it?" section on the Cygwin home page.
There is a GNAT for Windows. The GNAT Pro version has a list of supported platforms here; it includes Linux and Windows, but it doesn't show a Windows-to-Linux cross compiler.
Since GNAT is free software (GNAT Pro isn't is a little more complicated; I won't get into that) there could well be a Windows-to-Linux GNAT cross-compiler -- or, if you're really ambitious, you could build one yourself (or hire someone to do it for you).
But installing GNAT on a Linux system is the easiest approach. It doesn't have to be a virtual machine. If you have the hardware, you can install some Linux system by itself, or you can set up a dual-boot system on your Windows box. Ubuntu has a Windows installer, Wubi, that installs an Ubuntu image as a Windows file; it doesn't let you run Windows and Ubuntu concurrently, but it lets you dual-boot without having to repartition.
There are other options; these are just the ones I'm familiar with.
Is this possible with Cygwin?
It's probably possible.
Do I have to install a virtual machine with Linux? Or is there another (easier) solution to this issue?
Installing a Linux on a virtual machine is likely to be the simplest solution to your problem.
Since GNAT is free software (GNAT Pro isn't; I won't get into that) there could well be a Windows-to-Linux GNAT cross-compiler -- or, if you're really ambitious, you could build one yourself (or hire someone to do it for you).
Actually GNAT Pro is Free Software, free as in freedom, not as in beer.
And I think that it would be simplest to install Linux in virtual machine and compile with it.
AdaCore has a gnat compiler for the Windows operating system freely available at: http://libre.adacore.com/libre/download/ and choose "Free Software..." and click "Build Your Download Package" and go from there. As Keith Thompson suggests, you can setup a dual-boot solution if you actually need a Linux compatible executable. Remember any program compiled on Windows results in a Windows-only executable unless you have a compiler that allows for cross-compilation.
It became possible for them who use Windows 10 64 bit with new "Linux Subsystem" feature. You may install gnat on it and use it to compile ELF binaries, as well as windows binaries.

Developing Linux software on Windows

I want to write software for the Linux platform, but I would like to do this on a Windows OS. I'm only developing Linux software for a remote server of mine, so it wouldn't be worth it to switch to Linux just for that. I don't think it's as simple as using a cross-compiler, because I will be writing code that uses headers specifically for Linux, and I would like to test the programs on Windows. I don't want to use VirtalBox etc.
If possible, install the entire development environment on the linux server. Then install an Xserver (e.g XMing) and an ssh client (e.g putty) on your Windows box. Then run the dev. environment remotely.
The big pro of doing this is that the linux windows integrate seamlessly in the Windows enviornment. I used to work with dual platform development and had a virtual linux box on my PC. Still, I used ssh+X-forwarding to access it. This way I got full copy-paste support etc. between the environments.
Now WSL (also known as "Bash on Windows") exists, you can run native Linux binaries directly on Windows. With snapcraft you can package Linux applications entirely under Windows, without using a VM. Might be a better option. I made a super quick video to explain it.
CoLinux allows you to run linux side-by-side with Windows.
You could try VirtualBox and virtualize a Linux environment from within Windows. I do the reverse of what you are trying to do and run Windows from Linux, and it works quite well.
If you are familiar with .NET and C# you can use Mono for your client.
You can use Visual Studio to develop and the Mono runtime one Linux to run the application.
You do need to keep away from windows specific code.
Maybe Cygwin could help. You don't need an entire virtual machine and only the api is emulated.
You could use g++ in cygwin to target a linux binary. It's a pain to setup as you noted you'll need the entire toolchain (not just the compiler). I've used crosstool (domain name makes me giggle every time) in the past with success. It looks like someone did the work already http://metamod-p.sourceforge.net/cross-compiling.on.windows.for.linux.html
However I've never targeted linux from windows. I'd install a virtual linux box, way easier and you're likely going to want to do your testing on a real linux box before going live.
Cygwin isn't linux so you can't test your linux binaries there.
Out of curiosity what's keeping you from doing the development on linux? If the server the app runs on isn't mission critical you could even develop there.

Compile Linux application for Windows (C)

can I compile a linux application, with Linux-only available libraries, for Windows ?
I know the author of nginx web server uses some Wine tools to get his Linux-based project working on win32, natively, but how does he do that ?
Is MinGW support to create Windows binaries linked with Linux-specific libraries/headers ?
PS: I do not want to use cygwin due to big lost about performance...
Using something like mingw32 environment, you would have to find or build yourself all libraries on which the project you want to build depends (and all libraries on which those libraries depend).
You might end up having to implement some functionality which is missing on that platform. One of the reasons cygwin is slow is the hoops it has to jump through to simulate unix-y things that are missing on windows.
As long as the project uses the standard libraries on Linux and do not depend on anything specific to the Linux platform, the Mingw port of GCC can compile it on Windows.
If you are familiar with Linux tools and you don't Cygwin, you might want to take a look at MSYS:
MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell.

Resources