Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello,
If someone wants to porting an application from an operating system to another operating system, then he\she must rewrite that program from scratch?
I'm thankful if users share their experiences.
I would say, have a look first in the language the application is written and if the same language is available in the target system. Then adapt. What application do you mean? a python / Cpp / .. in linux and move it to Windows?
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,786
Rep:
@floppy_stuttgart I don't think the OP has porting from Linux to Windows in mind, given the fact the question is asked in the Solaris forum.
@n00b_noob No, the very idea of porting software from an OS to another OS is precisely to avoid rewriting all from scratch. Porting code means adapting the non portable portion of the source code to the target environment. Depending on how different the APIs and libraries are between the original and new system, some parts might need to be fully rewritten from scratch, or left out.
Application written in C.
In Linux, I extracted it and run "./configure" file, but on Solaris, must I do the same processes and when I get any error then try to fix it?
Application written in C.
In Linux, I extracted it and run "./configure" file, but on Solaris, must I do the same processes and when I get any error then try to fix it?
porting software from one OS to another is not typically feasible because of link-loader and binary incompatibilities
Hello,
Typically you cannot "port" software between dissimilar operating systems because dependencies in dynamically (runtime) linked libraries and the actual construction of the binary executable itself is incompatible.
The only case I know of where this true binary compatibilities, external libraries, etc., is between the SCO UNIX x86 environment and the Solaris x86 environment. Apparently Solaris x86 is actually SCO UNIX x86 and has full binary compatbility including linked libraries via the loader/linker.
I've written compilers, interpreters, operating systems and advanced communication platforms on dozens of operating systems.
Application written in C.
In Linux, I extracted it and run "./configure" file, but on Solaris, must I do the same processes and when I get any error then try to fix it?
the "portability" depends on the code itself, in simple cases you can just try to build it and fix the errors. In difficult cases probably you need to rewrite part of the code and also the build system (makefiles or whatever is used). There is no general answer.
What kind of Solaris is it and what kind of software is it? (by the way a lot of linux tools are already ported to Solaris, there was a sunfreeware.net site, but it is now http://unixpackages.com/)
You might get some pointers from the guys at slackware Arm, but you will probably find bits of code that worked just fine on the Sparc CPU but puke on x86_64. Likewise there will be differences in the toolchain. Joerg Schilling(sp?) the maintainer of cdrtools used to give long rants on the inferiority of the linux libc on the LKML and in the cdrtools documentation. I imagine the fact that all users of cdrtools were linux users gave him headaches.
Application written in C.
In Linux, I extracted it and run "./configure" file, but on Solaris, must I do the same processes and when I get any error then try to fix it?
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,786
Rep:
Quote:
Originally Posted by ddbtek
Typically you cannot "port" software between dissimilar operating systems because dependencies in dynamically (runtime) linked libraries and the actual construction of the binary executable itself is incompatible.
You seem to be confusing porting and running. You run binaries but you port code. Porting is the process to adapt source code and possibly build utilities to the target environment. Sometimes, no change is required and a simple recompilation is sufficient, but fully portable code is rarer and rarer. POSIX was an attempt to allow portability but isn't a thing developer take into account that much nowadays.
Quote:
The only case I know of where this true binary compatibilities, external libraries, etc., is between the SCO UNIX x86 environment and the Solaris x86 environment. Apparently Solaris x86 is actually SCO UNIX x86 and has full binary compatibility including linked libraries via the loader/linker.
Solaris 10 for x86 used to provide binary compatibility with Linux in its early days (lx branded zones), but that didn't last because the supported kernel was too old and 32 bit only. This is similar to Windows WSL1 that allows running Linux binaries on top of a Windows kernel without using at all an actual Linux kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.