LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This 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


Reply
  Search this Thread
Old 02-11-2021, 11:58 AM   #1
n00b_noob
Member
 
Registered: Sep 2020
Posts: 436

Rep: Reputation: Disabled
Post What are the processes of porting an application?


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.

Thank you.
 
Old 02-11-2021, 12:41 PM   #2
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,085
Blog Entries: 5

Rep: Reputation: 106Reputation: 106
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?
 
Old 02-11-2021, 08:42 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,785

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
@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.
 
1 members found this post helpful.
Old 02-12-2021, 01:59 PM   #4
n00b_noob
Member
 
Registered: Sep 2020
Posts: 436

Original Poster
Rep: Reputation: Disabled
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?
 
Old 02-13-2021, 06:49 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6037Reputation: 6037Reputation: 6037Reputation: 6037Reputation: 6037Reputation: 6037Reputation: 6037Reputation: 6037Reputation: 6037Reputation: 6037Reputation: 6037
Quote:
Originally Posted by n00b_noob View Post
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?
Have you tried?
 
Old 01-19-2023, 01:03 AM   #6
ddbtek
LQ Newbie
 
Registered: Oct 2010
Location: United States of America
Distribution: rhel, suse, centos, etc.
Posts: 9

Rep: Reputation: 3
Talking 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.

Thanks,
David
 
Old 01-19-2023, 03:55 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 19,524

Rep: Reputation: 6608Reputation: 6608Reputation: 6608Reputation: 6608Reputation: 6608Reputation: 6608Reputation: 6608Reputation: 6608Reputation: 6608Reputation: 6608Reputation: 6608
Quote:
Originally Posted by n00b_noob View Post
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/)
 
Old 01-19-2023, 06:13 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 14,676

Rep: Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Porting and tuning applications for Linux on Power, Part 2: 15 Porting and tuning tools for Linux on Power LXer Syndicated Linux News 0 05-18-2018 02:05 PM
porting Window Application to Linux sjcoder Programming 3 12-18-2005 05:48 PM
Porting Solaris Application to Linux CaptainRon Solaris / OpenSolaris 5 10-01-2005 03:29 AM
Huge Porting application question el_scrub Programming 5 06-10-2004 07:05 AM
Porting win32 application into Linux sergeyy Linux - Software 1 06-23-2003 09:57 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 06:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration