Question for you Linux guys -- installing Ubuntu 14.04.5

Thread Starter

WBahn

Joined Mar 31, 2012
24,974
Here is a suggestion for you, @WBahn. On your 14.04 box, install Virtualbox (sudo apt-get install virtualbox). Then, create a virtual machine with 16.04.3. This way, you can test a Kinetic install and ensure it works properly prior to upgrading your system.
While I see the value in that and it's a useful and appreciated suggestion, I don't know that it helps me a whole lot.

It seems to be telling me that before I upgrade a Linux box to the next OS release, that I really need to test every piece of software I am running on my present version on a virtual machine with the new version to see if it still works. Is that even practical? Am I likely to even remember every program I've installed on a given machine? And how much time is required to do all of that installation and testing? And then I have to do all of the installation all over again after I do the actual upgrade.

Does the Linux community have absolutely no sense of backwards compatibility?

There's definitely something that I'm missing from my understanding of the model here.

For instance, just to use the software that we've mentioned here, but really only as generic name placeholders, let's say I build an application that uses ROS Indigo and runs on 14.04. Everything is wonderful. Now 16.04 comes out and let's say that the person/team that wrote ROS Indigo has not updated it to run on 16.04 yet. Maybe they will update it next week, maybe they never will because they've moved on to something else or gone out of business or were all killed in an airplane crash. That means that I can't upgrade my system to 16.04 because my application isn't going to work because ROS Indigo won't run on 16.04. But that means that no one that uses MY application can upgrade to 16.04, either. Yet many of them probably want/need to use new applications that won't run on 14.04 because they were initially developed for 16.04.

While I won't argue that Linux is far superior to Windows in many, many ways, I have to admit that I just don't run into this problem on Windows machines. I am running some programs on my Win7 box that are 25 year old Win3.1 programs and even a couple programs from the DOS days. In general, I expect a program written for a version of Windows to run fine on any later version and I am almost never disappointed. I have some friends that are up in arms because they like to write assembly language programs for DOS and the latest versions of Windows finally stopped supporting them natively and so they've had to find tools to run them virtually. I tell them that it's pretty unreasonable to expect an OS to be backwards compatible for three decades, but I certainly don't think it's unreasonable to expect it to be backwards compatible from one version to the next.

It's the same with Python. You can't just use code written for Python 2 and Python 3 together because a lot of code that's written for Python 3 won't run under Python 2 (which is expected), but a lot of code written for Python 2 won't run under Python 3! Yet the Python folks always go on and on about how Python is all about code reuse. Seems more like it's all about continual code rewriting as the next version breaks a big chunk of everything you've already written.

So, seriously, what am I missing here. Surely this isn't the way things in the Linux world are supposed to work.
 

shteii01

Joined Feb 19, 2010
4,647
While I see the value in that and it's a useful and appreciated suggestion, I don't know that it helps me a whole lot.

It seems to be telling me that before I upgrade a Linux box to the next OS release, that I really need to test every piece of software I am running on my present version on a virtual machine with the new version to see if it still works. Is that even practical? Am I likely to even remember every program I've installed on a given machine? And how much time is required to do all of that installation and testing? And then I have to do all of the installation all over again after I do the actual upgrade.

Does the Linux community have absolutely no sense of backwards compatibility?

There's definitely something that I'm missing from my understanding of the model here.

For instance, just to use the software that we've mentioned here, but really only as generic name placeholders, let's say I build an application that uses ROS Indigo and runs on 14.04. Everything is wonderful. Now 16.04 comes out and let's say that the person/team that wrote ROS Indigo has not updated it to run on 16.04 yet. Maybe they will update it next week, maybe they never will because they've moved on to something else or gone out of business or were all killed in an airplane crash. That means that I can't upgrade my system to 16.04 because my application isn't going to work because ROS Indigo won't run on 16.04. But that means that no one that uses MY application can upgrade to 16.04, either. Yet many of them probably want/need to use new applications that won't run on 14.04 because they were initially developed for 16.04.

While I won't argue that Linux is far superior to Windows in many, many ways, I have to admit that I just don't run into this problem on Windows machines. I am running some programs on my Win7 box that are 25 year old Win3.1 programs and even a couple programs from the DOS days. In general, I expect a program written for a version of Windows to run fine on any later version and I am almost never disappointed. I have some friends that are up in arms because they like to write assembly language programs for DOS and the latest versions of Windows finally stopped supporting them natively and so they've had to find tools to run them virtually. I tell them that it's pretty unreasonable to expect an OS to be backwards compatible for three decades, but I certainly don't think it's unreasonable to expect it to be backwards compatible from one version to the next.

It's the same with Python. You can't just use code written for Python 2 and Python 3 together because a lot of code that's written for Python 3 won't run under Python 2 (which is expected), but a lot of code written for Python 2 won't run under Python 3! Yet the Python folks always go on and on about how Python is all about code reuse. Seems more like it's all about continual code rewriting as the next version breaks a big chunk of everything you've already written.

So, seriously, what am I missing here. Surely this isn't the way things in the Linux world are supposed to work.
Basically the part you are missing is the fact that most Linux software is written by users for THEIR needs, not community needs. Basically a user runs into a problem, writes a program to resolve the problem, community benefits because now they have a piece of software that does X and is free. Most nobody cares about next week, next month, next year, next 10 years. It is why we pay money to M$.
 

joeyd999

Joined Jun 6, 2011
4,287
Does the Linux community have absolutely no sense of backwards compatibility?
It's not that.

In Linux, there is no concept of backward binary compatibility.

In other words, each new major distribution of a software package is completely recompiled against (also) newly compiled system libraries and the kernel. Everything builds clean and fresh ... no cruft. But no "backward compatibility" to older libraries.

This is a blessing and a curse. The blessing in that the OS and apps are faster, smaller, and more secure. The curse is the "dependency hell" you've just experienced.

Windows attempts to maintain backward binary compatibility over many successive releases. While convenient for users, this is one of the reasons why Windows continues to be one of the slowest and most insecure operating systems on earth.

It's the same with Python. You can't just use code written for Python 2 and Python 3 together because a lot of code that's written for Python 3 won't run under Python 2 (which is expected), but a lot of code written for Python 2 won't run under Python 3!
You are always welcome to download the source for Python 2 and compile it on your machine. This is a benefit. Free (freedom, not beer) software means you'll never be beholden to the (seemingly irrational) decisions of someone else, and you can work they way you want to -- not the way someone in Redmond, WA wants you to.

It just takes a little effort on your part. You're a smart man, @WBahn. You can do it!

(And, no, you are not expected to run each new release in a VM. That was a suggestion for you for this one single piece of code that seems important to you. If you use the latest ROS on a supported Linux, I really don't think you'll have a problem.)
 
Last edited:

joeyd999

Joined Jun 6, 2011
4,287
One thing to keep in mind is that Linux is a completely different -- I hate to use the word -- paradigm than Windows.

Linux seems alien and confusing to those who have used nothing but Windows.

Personally, Windows -- after not having used it for about 15 years -- seems alien to me. I get lost on a Windows box and have to ask my wife for help.

Over time, you get used to a new way of thinking about software and applications and you get used to it. Eventually, it becomes your preferential way of doing things.

Today, I wouldn't use Windows even if someone paid me.
 

rthomas12

Joined Dec 6, 2016
32
I had a similar problem with a Acer lap top with a new ssd drive. I cant remember the exact order I set the BIOs but it wasn't listed as the first boot order. What about removing the hard drive, connecting it to another computer and imaging the OS on it?
 

joeyd999

Joined Jun 6, 2011
4,287
I had a similar problem with a Acer lap top with a new ssd drive. I cant remember the exact order I set the BIOs but it wasn't listed as the first boot order. What about removing the hard drive, connecting it to another computer and imaging the OS on it?
This could work, but many of the installed packages may have to be reconfigured depending upon hardware differences between the two systems.
 

rthomas12

Joined Dec 6, 2016
32
I agree, "image" was not the best choice of words. I was thinking of the install package. The version I installed gave an option to run the boot up one time or format for a complete install. Its a nice OS but not compatible with a lot of software that I use.
 

Thread Starter

WBahn

Joined Mar 31, 2012
24,974
It's not that.

In Linux, there is no concept of backward binary compatibility.

In other words, each new major distribution of a software package is completely recompiled against (also) newly compiled system libraries and the kernel. Everything builds clean and fresh ... no cruft. But no "backward compatibility" to older libraries.

This is a blessing and a curse. The blessing in that the OS and apps are faster, smaller, and more secure. The curse is the "dependency hell" you've just experienced.

Windows attempts to maintain backward binary compatibility over many successive releases. While convenient for users, this is one of the reasons why Windows continues to be one of the slowest and most insecure operating systems on earth.
So I'm still missing some key pieces (not surprising) but this helps -- and is in line with the soft understanding that I have.

So when I use apt-get and install ROS Indigo, for instance, I thought I was getting the source code and that a lot of the seemingly thousands of lines of information that goes flying up the screeen was all of the downloaded files being compiled. Is this not the case? Am I actually downloading precompiled binary executables? If so, then what is all that stuff that's going on?

Definitely two different paradigms -- and probably pretty defensible paradigms given the respective target audiences. Seems to me that Linux is "easy" for someone only if they have a pretty deep understanding of a lot of stuff and can maneuver through the maze, but that once they have that level of understanding then it really IS a lot easier and more powerful. But that is not the market that Windows is targeting -- they are targeting my stepmother, who still doesn't have a clear understanding of the difference between a hard drive and a CD drive. Yet even she can download and install programs on a Windows machine with little difficulty.

You are always welcome to download the source for Python 2 and compile it on your machine. This is a benefit. Free (freedom, not beer) software means you'll never be beholden to the (seemingly irrational) decisions of someone else, and you can work they way you want to -- not the way someone in Redmond, WA wants you to.

It just takes a little effort on your part. You're a smart man, @WBahn. You can do it!
How would that help? Seems I would need to the source code for Python 2 and then go through however many files and lines of code there are and understand it well enough to figure out what changes needed to be made so that it could interpret scripts written for Python 3 and do so without breaking anything. Or, I supposed I could download the source code for Python 3 and go in and figure out what changes I needed to make in order to reestablish support of the no-longer supported structures and syntax of Python 2 -- again without missing anything or breaking anything.

(And, no, you are not expected to run each new release in a VM. That was a suggestion for you for this one single piece of code that seems important to you. If you use the latest ROS on a supported Linux, I really don't think you'll have a problem.)
I'm still completely unclear as to what I can expect to have to do if and when I decide to upgrade this machine to 16.04. I sure sounds like it is going to break a hell of a lot of stuff that is already on there. Do I just have to wait and see what does and doesn't work and then figure out what I have to get the latest version of and then hope that I don't have irresolvable dependency issues? And, when I do try to use an application that turns out to be broken, do I have to hope that I happen to be connected to the Internet and not out in the middle of the desert on the test range?

Also, I noticed that you very quickly determined the status of ROS Indigo vis-a-vis 16.04. How did you do that?

EDIT: Fix QUOTE tag typo.
 
Last edited:

joeyd999

Joined Jun 6, 2011
4,287
So when I use apt-get and install ROS Indigo, for instance, I thought I was getting the source code and that a lot of the seemingly thousands of lines of information that goes flying up the screeen was all of the downloaded files being compiled.
No. You are downloading and installing executables and libraries that were pre-compiled against the intended Linux distribution target. This save a great deal of time and headache for us end users. Because the project is FOSS (actually, BSD license), you could download their software and compile specifically for your individual machine, though there is usually no need to do that these days. I've been running Linux long enough to remember when this was expected for many software packages. Hell, I've even had to roll my own kernels once or twice to get some specific functionality that was not available on a stock distribution kernel.

Seems to me that Linux is "easy" for someone only if they have a pretty deep understanding of a lot of stuff and can maneuver through the maze, but that once they have that level of understanding then it really IS a lot easier and more powerful.
For the most part, a deep understanding is not necessary -- except for very specific and obscure applications. The immediate instance is exemplary. Most users only need a browser, an office suite, email, and perhaps some games. Pretty much all distributions do this very well right out of the box after an install that is much faster and far easier than a typical Windows install. Remember, most consumers never need to install an OS -- Windows comes pre-packaged, pre-installed, and pre-configured for the specific piece of hardware he is buying. On the other hand, he then has to locate, purchase, download, and install all the applications he wishes to use. Most of the useful apps are already installed in Linux, and the ones that are not can be very quickly downloaded and installed via the command line or the provided package manager (for those who prefer a GUI).

Further, updates to the kernel and all installed apps happens automatically. No need to fetch and install individual app updates.

How would that help? Seems I would need to the source code for Python 2 and then go through however many files and lines of code there are and understand it well enough to figure out what changes needed to be made so that it could interpret scripts written for Python 3 and do so without breaking anything. Or, I supposed I could download the source code for Python 3 and go in and figure out what changes I needed to make in order to reestablish support of the no-longer supported structures and syntax of Python 2 -- again without missing anything or breaking anything.
On the off chance Python ever goes away, the source code will always be available somewhere. This guarantees you have a fallback option and your applications will never be completely obsoleted.

With that said, in your case it is not necessary to download the source code and compile your own Python 2 on a Python 3 distribution. You can install Python 2 aside 3 and choose which version you wish to run for a particular applications.

Remember, the default packages are those preferred by the distribution maintainer. There is (generally) no technical reason why one cannot personally revert to a previous version -- or use both simultaneously.

I do this with respect to PHP 4 and PHP 5 (the MySQL libraries changed dramatically from 4 to 5).

I'm still completely unclear as to what I can expect to have to do if and when I decide to upgrade this machine to 16.04. I sure sounds like it is going to break a hell of a lot of stuff that is already on there.
I don't think this is going to happen unless there are some required features in an older version that are no longer available in a current or future version. Usually, features are deprecated long before they are removed. This gives other developers time to update their code and apps before things get broken.

In the worst possible case, Ubuntu 14.04 will always be available for download (somewhere). The only thing you'll be missing is hardware and security updates.

And, when I do try to use an application that turns out to be broken, do I have to hope that I happen to be connected to the Internet and not out in the middle of the desert on the test range?
I strongly suggest you install, configure, and test on base first prior to going out on the range -- regardless of what you are doing. Isn't this standard practice?

Also, I noticed that you very quickly determined the status of ROS Indigo vis-a-vis 16.04. How did you do that?
Every FOSS project usually has a project page where these things are spelled out. In this case:

http://www.ros.org/reps/rep-0003.html
 

Thread Starter

WBahn

Joined Mar 31, 2012
24,974
I strongly suggest you install, configure, and test on base first prior to going out on the range -- regardless of what you are doing. Isn't this standard practice?
Thanks for the info. It's very helpful.

Just a follow-up on the above. Yes, I test on base as best I can, but lots of stuff comes up out on the range. The last time I was out at China Lake about three days into the exercise a situation came up that needed me to do some stuff that I wasn't expecting to do and I used some programs that I had written a couple years prior and didn't expect to ever use again. I happened to have the executable files on the machine but not the source code. If those executables hadn't worked because of an OS update to the machine, it would have seriously impacted what I was doing.
 

hrs

Joined Jun 13, 2014
179
Regarding the Python issue, I think almost every current linux distribution has both Python2 and Python3 installed by default. Python2 scripts start with
#!/usr/bin/env python
or alternatively
#!/usr/bin/python

and Python3 scripts start with
#!/usr/bin/env python3
or alternatively
#!/usr/bin/python3

Some distributions may have a different path for the python run-time but that's another issue.

EDIT: One more thing you might want to consider, WBahn, is to set up a separate partition for your /home dir if you have a sufficiently large hard drive. Maybe 10G for the system, 5G for /home and the rest for data or whatever tickles your fancy.
 
Last edited:

joeyd999

Joined Jun 6, 2011
4,287
Regarding the Python issue, I think almost every current linux distribution has both Python2 and Python3 installed by default.
Confirmed:

Code:
joeyd999@dcqc:~$ which python
/usr/bin/python
joeyd999@dcqc:~$ which python3
/usr/bin/python3
I don't write Python, so I didn't know this. See, I still learn things after 15+ years on Linux.
 
Top