Linked by Thom Holwerda on Tue 16th Aug 2005 22:50 UTC, submitted by Jan Stafford
Linux Security, cost-savings, performance and innovation are the primary reasons to move to Linux, says Novell Linux developer evangelist Darren R. Davis, stating what is to him the obvious. Rather than dillydallying with that question, he'd rather help IT shops and developers get moving to Linux. Davis explains how to port Unix and Windows applications to Linux and how to make those Linux apps support multiple distributions in this interview.
Order by: Score:
v Linux porting guide
by Anonymous on Tue 16th Aug 2005 23:02 UTC
v LINUX PORTING STEPS
by Anonymous on Tue 16th Aug 2005 23:31 UTC
RE: LINUX PORTING STEPS
by orestes on Tue 16th Aug 2005 23:57 UTC in reply to "LINUX PORTING STEPS"
orestes Member since:
2005-07-06

Or just do a static build and don't worry about about it.

Reply Score: 2

Or....
by Bobmeister on Tue 16th Aug 2005 23:43 UTC
Bobmeister
Member since:
2005-07-06

Or....write it in Java....run application anywhere...

Reply Score: 3

RE: Or....
by kevogod on Tue 16th Aug 2005 23:53 UTC in reply to "Or...."
kevogod Member since:
2005-08-16

If you believe that, then Sun has marketed correctly.

Reply Score: 1

Or...
by Anonymous on Wed 17th Aug 2005 01:35 UTC
Anonymous
Member since:
---

Or....write it in (any other emulator)....run applications anywhere.

Reply Score: 0

v Yes, the desktop is "problematic"
by Anonymous on Wed 17th Aug 2005 03:35 UTC
Absolutely right
by rm6990 on Wed 17th Aug 2005 04:25 UTC
rm6990
Member since:
2005-07-04

You are absolutely right. You know, there are individual packages for each distro for OpenOffice, Mozilla Suite and applications, Adobe Acorobat Reader, Real Player.....erm...wait a second....

Reply Score: 3

Or...
by shotsman on Wed 17th Aug 2005 06:03 UTC
shotsman
Member since:
2005-07-22

Write your code to ONLY use call that are supported on ALL the platforms you want to run on.
wrt Windows, install Services for Unix as their posix interface seems to have gone from their default install.
I do this all the time in C. 98% of my code runs unaltered on Windows, Solaris, Linux & VMS. I expect other platforms would be not a great problem to port to.

The big problems lie in the area of the GUI. Pretty well, the only language that has this ability on different platforms is JAVA even though its performance sucks when using Swing or SWT as your GUI interface..

My starting point with any S/W development is to think outside the box that it is initially aimed at and in all cases, try to write the application in a way that it can be ported to several different platforms without difficulty.
thats my 0.2rbl take on the subject.

Reply Score: 1

RE: Or...
by Anonymous on Wed 17th Aug 2005 06:25 UTC in reply to "Or..."
Anonymous Member since:
---

Use a GUI library like Qt or wxWidgets

Reply Score: 2

depends on application
by Anonymous on Wed 17th Aug 2005 06:21 UTC
Anonymous
Member since:
---

Security, cost-savings, performance and innovation

Every reason listed is going to depend on the application.

A couple of them are kinda funny.

Cost savings? If you consider porting to be cheap I guess.

Innovation ? I'm not sure I'd call porting a program to another platform to be innovtation.

The article is well written however and does provide some basics for people interested in porting, at least the basics on where to look for more answers.

Reply Score: 0

Borland Delphi for Linux
by rugbuzpafnuti on Wed 17th Aug 2005 09:01 UTC
rugbuzpafnuti
Member since:
2005-07-07

Too bad Kylix is dead. Although Borland really got it wrong from the start: way too expensive, binary compatibility issues, no real static linking, etc.

I heard Kylix build applications have problems running under current Linux distros - if binary abi problems are that prevalent, I'd rather not invest in Borland too...

Reply Score: 2

RE: Borland Delphi for Linux
by Anonymous on Wed 17th Aug 2005 09:31 UTC in reply to "Borland Delphi for Linux"
Anonymous Member since:
---

"Too bad Kylix is dead."
I too love Pascal, Delphi and related languages... And now, we have Lazarus!
It's a very nice RAD based on FreePascal (if you know Pascal and or Delphi you will not have difficulties in using it) to build cross platform application (win, lin, bsds, darwin) using native graphic systems (so, quite performing and coherent with the rest of the GUI).
For low level programming, FreePascal performances are good, for the GUI work Lazarus is a nice environment and is reasonably similar in look to the Delpi/Kylix RAD, without (too bad) graphic libraries issues that plagued those environments!
The website is http://www.lazarus.freepascal.org/
definitely worth a try, and it's still growing!

Reply Score: 0

RE[2]: Or...
by Anonymous on Wed 17th Aug 2005 09:22 UTC
Anonymous
Member since:
---

"Write your code to ONLY use call that are supported on ALL the platforms you want to run on."
You are right until you have not to deal with system objects.
In example, you make a number crunching program using libraries implemented on all systems supported by your developing environment. You will not have problem regardless the language you chose (ehm... excepting for thikdifferntness... excuse me, endianness, but only for few months only thanking macintel switch!).
Now, save the file configuration to... wait! Register? Nice, but will work only on Windows. File? Maybe you want the file to be not accessible by all users, so you must place the file here in Win, there in that *x, here in that other *x, there in Amiga and so on...
Or, think to case sensitiveness issues, or if you program have to deal with filesystem at low level, or if it should launch shell scripts that does more securely and more efficently what you shold rewrite from scratch...
In many cases you must rely on conditional compilation or seriously downgrade your program features to a minimum common between different systems or seriously make your program more complex to reinvent a "system independent" weel...
Generally this is possible but it's not trivial to make a program platform independent also if written with languages with libraries supported on different platforms.

Reply Score: 0

Lazarus
by Anonymous on Wed 17th Aug 2005 09:29 UTC
Anonymous
Member since:
---

Kylix is that, all hail the new king, Lazarus.
See http://www.lazarus.freepascal.org
It runs on windows/linux/osX and the motto is write once and compile everywhere. Not perfect yet, but then again it's beta.

Reply Score: 0

Linux? Innovative?
by siebharinn on Wed 17th Aug 2005 10:48 UTC
siebharinn
Member since:
2005-07-06

Does anyone else see an article about porting software to the "innovative" linux to be a little ironic?

Linux has always been a Frankensten-system of pieces ported from elsewhere.

Reply Score: 2

RE: Linux? Innovative?
by Anonymous on Wed 17th Aug 2005 12:56 UTC in reply to "Linux? Innovative?"
Anonymous Member since:
---

> Does anyone else see an article about porting
> software to the "innovative" linux to be a little
> ironic?

Knowing that both comments will not be there for a long time: You are right and the Linux platform is not innovative. The Linux platform has its advantages, but it is not innovative. It is much harder to develop for because tools like Visual Studio are still missing, and many innovations from other platforms take months, if not even years to be copied to Linux. There is no innovation in the Linux platform, but still, Linux has its advantages.

Reply Score: 0

RE: Linux? Innovative?
by Mediocre Sarcasm Man on Wed 17th Aug 2005 14:54 UTC in reply to "Linux? Innovative?"
Mediocre Sarcasm Man Member since:
2005-07-06

Linux has always been a Frankensten-system of pieces ported from elsewhere.

Which is innovative in and of itself.

Reply Score: 1

v RE: Linux? Innovative?
by Anonymous on Wed 17th Aug 2005 15:16 UTC in reply to "Linux? Innovative?"
Wx is your friend.
by Anonymous on Wed 17th Aug 2005 12:47 UTC
Anonymous
Member since:
---

"The big problems lie in the area of the GUI."

That's why WxWidgets is your friend!

"Now, save the file configuration to... wait! Register? Nice, but will work only on Windows. File? Maybe you want the file to be not accessible by all users, so you must place the file here in"

Wx takes care of more than just GUI crossplatform stuff. Wx has a configuration object that encapsulates the registry on Windows and a file on unix. Wx also has objects for DDE servers, threads, and a number of other areas of crossplatorm incongruity.

Also since Wx is wrapping native stuff with a common API, your stuff runs natively fast as it compiles on multiple architectures, unlike java.

Reply Score: 0

RE: Wx is your friend.
by Anonymous on Wed 17th Aug 2005 13:03 UTC in reply to "Wx is your friend."
Anonymous Member since:
---

"Wx has a configuration object that encapsulates the registry on Windows and a file on unix."
And Wx can understand if the file or the registry key should be public or root-private or user private?
And does it test if exists and what is the more fit between various analogous paths that may exist in different *x flavours?
I don't think so... neither does authors:
"An open source C++ GUI framework to make cross-platform programming child's play. Well, almost."
Cross platform programming is certainly feasible but it's not trivial, at least the programmer should carefully consider to make a little of experience on target system if the program deal in some way with privacy or security.
Wx is certainly a good product but i'll not scream to the miracle, it just works (very well) as a "API replicator" a'la wine (more or less), adding to a system Wx API, that you will call with your program.
It's a clever and performance wise thing, but it assumes that the users will install the API since the program will be compiled for that API, that's different to compile a binary that will work on a plain user's sistem without asking it to install.
(btw, I'm strongly oriented to an utopistic real API unification and I think Wx is really a good example of how things should be in the IT world).

Reply Score: 0

RE[2]: Wx is your friend.
by Anonymous on Thu 18th Aug 2005 08:46 UTC in reply to "RE: Wx is your friend."
Anonymous Member since:
---

Wx is certainly a good product but i'll not scream to the miracle, it just works (very well) as a "API replicator" a'la wine (more or less), adding to a system Wx API, that you will call with your program.

It's a clever and performance wise thing, but it assumes that the users will install the API since the program will be compiled for that API, that's different to compile a binary that will work on a plain user's sistem without asking it to install.


You can easily fix that by simply linking statically. The binary will get a bit bulky, but nowadays people don't really care.

wx rocks - I can even compile windows executables of my applications on my development machine (which runs linux) using the mingw cross-compiler.

Reply Score: 0

RE[3]: Wx is your friend.
by Anonymous on Thu 18th Aug 2005 10:41 UTC in reply to "RE[2]: Wx is your friend."
Anonymous Member since:
---

"You can easily fix that by simply linking statically."
Well, you have to link statically a lot of things if you want the application to contain everithing it need without installing the framework and to run without a single call to the sitem's API!
At this point, if someone have a lot of Wx applications, it worts to install the framework in order to not have any single Wx application to be statically linked to everithing it need!
And it doesn't resolve the problem of privacy and security (i.e. paths, temp files, conf files, std in and std out): if your software have to deal with it (you will not install everithing as root or admin, I hope!) you shuold study the targhet system's architecture and build a conditional compiling code that will proprly fit in the targhet system's. You won't suppose that Wx replace the system's user right and memory protection management!?
And, more, it does not prevent the problem of reinventing the weel, you may find useful to launch platform specifical shell scripts, commands, access the browser and ports... repeat, don't expect the application layer to replace the system layer of security management, don't expect Wx convert a shell script in a language fit for all existing shell of all possible target system...

"wx rocks - I can even compile windows executables of my applications on my development machine (which runs linux) using the mingw cross-compiler."
I agree, it rock. But you are compiling for Wx, not for the target system.
And that leaves forementioned problems open:
- you have the user to install the API, or it will not work, or you have to link everithing that the application will call, that's huge (well, if desktop user's doesn't care it's quite infeasible for embedded environment with limited resources, also if we don't think to extreme like smartcards, or S40 cellphones with 64KB limit for binaries and few megs of main memory);
- Wx cannot replace system layer security model, for a nontrivial application you will probably still need the system to protect ports, files, paths, so you should carefully study the target system to undertand how it woks keeping users information protected and separated;
- even at application layer level Wx cannot replicate everithing platform specifical that you may find useful like shells, browsers, utilities, firewall etc and you should write platform conditional code in order to mimic the functionalities.
Wx is a great thing, if used properly (or, right, for applications that doesn't have those issues), but if you use an hammer for cutting a tree instead for hammering nails, it would work poorly.

Reply Score: 0

RE[4]: Wx is your friend.
by Anonymous on Thu 18th Aug 2005 16:42 UTC in reply to "RE[3]: Wx is your friend."
Anonymous Member since:
---

access the browser

In fact, wx includes a `wxLaunchDefaultBrowser' function ;) .

you have the user to install the API, or you have to link everithing that the application will call, that's huge.

Actually, it's not that huge: a small wxWidgets application I wrote (http://pathalizer.sf.net ) is linked statically and the binary is only 2.4MB - that is possible because when statically linking, only the parts that you actually use are included. But I can imagine if you're working on embedded systems and have a lot of wx applications you're better of linking dynamically.

And of course you're right: if you want to use platform-specific features, you'll have to write some conditional code (which is a matter of some #ifdef's).

Reply Score: 0

RE: Wx is your friend.
by Anonymous on Wed 17th Aug 2005 14:38 UTC in reply to "Wx is your friend."
Anonymous Member since:
---

There are lot's of options available. Of course, it all depends what the project is about.

For GUIs I personally go with wxWidgets or Qt, both are excellent toolkits. Swing isn't so bad as well, but Java can be difficult to deploy depending on the target audience.
For non-GUI stuff, good old C mostly works, and there are Python, Perl, Ruby, Java etc.
Finally we got OpenGL, SDL, OpenAL etc. for the gaming needs.

When selecting the right tool for the job, cross-platform development actually is not overly difficult. The real problem is that the majority of Windows-only programmers are mostly unaware of and unfamiliar with these tools. Hence, they often keep rolling out Win32-only software. It isn't about the lack of available cross-platform toolkits, it's about getting out of old habits.

Reply Score: 2

RE:RE: Linux? Innovative?
by Anonymous on Wed 17th Aug 2005 13:08 UTC
Anonymous
Member since:
---

small correction:

1.) Linux is perhaps not as innovative as it should be but it is still more innovative than any version of Windows that has been released so far.

2.) Linux does need better development tools but IDEs like Anjuta or kdevelop already rival the tools available for Windows such as Visual Studio and tools like Glade don't even exist for Windows.

yes, Linux does need to become more innovative and, yes, it does have its advantages.

Reply Score: 0

v RE: Linux? Innovative?
by Anonymous on Wed 17th Aug 2005 15:04 UTC in reply to "RE:RE: Linux? Innovative?"
Cheaper? Performance? Innovation?
by Haicube on Wed 17th Aug 2005 14:15 UTC
Haicube
Member since:
2005-08-06

Geeez, I don't really see how porting an application from unix (let's say FreeBSD) to Linux would make things cheaper?

In fact I'd say moving applications to Unix is the way of costs, compatibility and efficiency assuming all distros need their own version of the software.

Another hype article perhaps? Did IBM sponsor it?

Reply Score: 1

cost savings
by Anonymous on Wed 17th Aug 2005 14:41 UTC
Anonymous
Member since:
---

I am not sure how much you can actually save by porting from UNIX to Linux but there are likely some saving associated with it.

On the other hand porting from Windows to Linux can lead to tremendous savings e.g. our company was depending on one particular application that was only available for Windows. We decided to port it to Linux rather than keep running it in an emulator or VMware and it turned out a great investment. Since we have moved to Linux on all of the desktops last year we've already saved thousands in licensing fees and maintainance expenses and the only larger exspense was porting one piece of software.

Reply Score: 1

Easier than that
by Smartpatrol on Wed 17th Aug 2005 15:46 UTC
Smartpatrol
Member since:
2005-07-06

Why would you need to migrate your applications from one platform to the other? You don't gain anything porting a Unix application to Linux and you won't get the same appearance or behavior moving from Windows to Linux. Its simple keep applications on the native platform they were written for or perform the best on.

Reply Score: 1

RE: Easier than that
by Anonymous on Wed 17th Aug 2005 15:58 UTC in reply to "Easier than that"
Anonymous Member since:
---

Yeah, why would anyone want to jump ship? Proprietary UNIX isn't expensive and not doomed at all in the long run, right? And if Windows was a house the needed security-measures wouldn't be the equivalent of massive searchlights lightening up the whole block, and an armed guard every square-meter? Why would anyone want to leave that?

Reply Score: 0

RE: Easier than that
by Anonymous on Wed 17th Aug 2005 16:24 UTC in reply to "Easier than that"
Anonymous Member since:
---

"Why would you need to migrate your applications from one platform to the other?"
- Merging with a company with different machines and systems;
- Ceased or insufficient or costly or otherwise disvantageous support for commercial systems (DOS, Win9x, Netware, Mac OS Classic, old proprietary *x) without rewriting the application from scratch;
- Consolidation in less new machines with new hw and s.o. without having to rewrite from scratch, cutting licensing and maintenance costs;
- Consolidation of IT knowledges porting as many application as possible (and as reasonable) on the same hw and s.o. cutting support cost;
- Eradicate the nightmare of sudden supplier failure since it's possible to jump on a new hw or s.o. supplyer;
- Eradicate the nightmare of bad organization: "Haven't I told you to port the application from y to x last mont? Gee, we are switching to x right now!"

Reply Score: 0

RE[2]: Easier than that
by Anonymous on Wed 17th Aug 2005 16:32 UTC in reply to "RE: Easier than that"
Anonymous Member since:
---

I.e. the IBM itself made AS/400 (now i5) a virtual system over any hw (decided by IBM, since it's closed).
This is a good example of advantages of thinking in a platform independent way, IBM write low level layer for new hw i can switch to more powerful hw and continue to run the same application that calls the highest level layer. I was, and is, a success, so consider that is a fact that an user doesn't like to lose his software and really wants a s.o. or a kind of support or a programming made thinking to portability that allows him, not the vendor, to decide when cease to use a sw.

And more, for swhouses point of view, programming cross platform is a desiderable way, in order to reach more possible customers using different systems, and have ready products if market become oriented in a different way or if new niches open (ie handhelds, cellphones, embedded devices...).

Reply Score: 0

Anonymous
Member since:
---

No, this should be "Porting Applications From Windows and Unix to ... Unix"

Seriously. Linux, BSD, Solaris all largely share the same APIs, X Window System, etc. Just write to UNIX, like back in the old days before Windows. It's better, though, as there are fewer UNIX systems to target, now.

Hell, even OpenGL works across all these platforms (Mesa, at least) and OpenAL, too, so, games developers, where are you?

Reply Score: 2

Anonymous Member since:
---

Well, it's not all so simple!
Many compilers (rightly!) see Linux, Darwin, each BSD and other single *x like different target... that should say you something about binary compatibility of *xes!
Moreover, programming for the same *x you can also encounter other problems:
basically if i do something not self-contained:
- had the user/root customized paths?
- had the user/root customized libraries?
- had the vendor or the distro packager boy customzed something?
if i do something with GUI interface:
- what desktop environment i'll find?
- how does the d.e. resolves path and autocomplete strings? (KDE and Gnome are hilariously different in those things!)
and if i don't want to reinvent the weel each time:
- if i launch complex shell scripts, what shells will be available on the target system?
- if my program calls networking features, what standard browser, mail client, firewall... should i expect?
- and so on
So, it's not so simple...

Reply Score: 0