I claim absolutely no credit for this, but a reader called Younes El-karama has been in touch to offer additions to the fixup script which Atlas sometimes creates when preparing for Oracle 12cR2 installations onto assorted distros, such as Ubuntu, Mint, Peppermint and so on.
Younes originally did this specifically to make Atlas work properly for 12cR2 on Linux Mint. I am not entirely sure if he realised, however, that his work actually makes Atlas function properly for 12cR2 on any Ubuntu-based distro… but he’s clearly a smart guy, so I suspect he did 🙂
The short version is, anyway, that thanks to Younes, the list of which distros can have Atlas help get 12c Release 2 running on them, which I mentioned in a previous post, now looks like this:
Debian 8.2+ ............................ Works fine
Linux Mint 18+ ......................... Works fine
Mint Debian Edition 2+ ................. Works fine
Red Hat ES 7.0+ ........................ Works fine
Scientific Linux 7.0+ .................. Works fine
CentOS 7.0+ ............................ Works fine
OpenSuse Leap 42+ ...................... Works fine
Antergos 2016.11+ ..................... Works fine
elementary OS 0.4+ ..................... Works fine
Mageia 5+ .............................. Works fine
Korora 25+ ............................. Works fine
Zorin Core 12 .......................... Works fine
Ubuntu 16+ ............................. Works fine
Manjaro 15+ ............................ Works fine
Fedora 23+ ............................. Works fine (*)
Peppermint Linux 7+ .................... Works fine
GeckoLinux Static 422+ ................. Works fine
Chapeau Linux 24+ ...................... Works fine
PCLinuxOS 2016+ ........................ Works fine
That is, Atlas works fine on getting 12c Release 2 installed on all its target distros. There’s just one exception, indicated by that asterisk: Fedora 26 wasn’t around at the time I prepared the original list …and it still doesn’t work as yet. Younes’ fix doesn’t help there, since Oracle 12c R1 and R2 both compile fine on it, but then fail to create a database. The Younes Fix as I’ve taken to calling it, on the other hand, solves a compilation problem that bedevilled all Ubuntu-based distros when trying to compile Oracle 12c Release 2 binaries.
To be clear, the Oracle 12c Release 2 linking phase still fails on all the Ubuntu-based distros, but Atlas knows this will happen and therefore creates a fixup.sh script in your oracle user’s Documents directory, just as it has always done. The Younes Fix, however, means that the script contains more lines in it than before. It’s those extra lines which make a 12c R2 installation possible:
So, my abundant thanks to Younes, and he gets the appropriate credit at the top of the Atlas scripts. It is nice to see open source collaboration working so well! Atlas itself is now bumped to version 1.5 in consequence; the new version is automatically downloaded when you do the standard Atlas stuff:
Let me start by wishing a happy New Year to all my readers, complete with fireworks from our local council’s display!
And then let’s swiftly move on to the bad news!
If you are interested in installing Oracle onto non-approved Linux distros, you are very soon going to have to contend with this sort of error message:
/usr/bin/ld: /u01/app/oracle/product/12.1.0/db_1/lib//libpls12.a(pci.o): relocation R_X86_64_32 against `.rodata.str1.4' can not be used when making a shared object; recompile with -fPIC
This will be found in the Oracle installer’s log immediately after the “linking phase” of the Oracle installation starts.
Unfortunately, the error message dialog that appears at this point looks like this:
…and that particular error message has long been familiar from 188.8.131.52 installs on assorted distros. The workarounds then were to add various compilation flags to assorted makefiles.
But in this case, the graphical error dialog deceives: for a start, this is happening on 184.108.40.206, and although the dialog text is the same as back in the 220.127.116.11 days, the underlying cause is completely different. It’s only when you inspect the installActions log do you (eventually!) see the error text I showed above, which tells you that this is no “ordinary” compilation problem.
Putting it as simply as I know how, the basic idea of position-independent code is that it allows execution of code regardless of its absolute memory address. It’s thus a ‘good thing’, on the whole.
Trouble is, if objects within the code you’re trying to compile haven’t themselves been compiled to be position-independent, then you aren’t yourself allowed to compile the code that references them into shared libraries.
As the error message above says, since “pci.o” isn’t position-independent, you can’t compile references to it into the libpls12 library. Note that the error message does not mean that your attempt to compile libpls12 should use fPIC: if it meant that, you could do something about it. No: it’s telling you that pci.o was compiled by Oraclewithout fPIC. Only if they re-compile that object with the fPIC compiler option switched on would you then be able to compile it into the libpls12 library successfully.
If you’re best mates with Larry, then, perhaps you’ll be able to get him to do the necessary recompilations for you! Mere mortals, however, are stuck with the unhappy fact that vast swathes of the Oracle 12c code-base has not been compiled to be position-independent… and there’s nothing you can do to fix that when your version of gcc insists that it should be.
The problem doesn’t manifest itself on all distros: Ubuntu 16.04, for example, has no problem installing 12c at all (apart from the usual ones associated with not using a supported distro, of course!) But Ubuntu 16.10 does have this fatal problem. Similarly, Debian 8 is fine with Oracle 12c, but Debian 9 (the testing branch, so not yet ready for mainstream release) fails. And whereas Manjaro didn’t have a problem earlier in the year when I first released my mercury pre-installer script, it does now.
This, of course, gives us a clue: there’s clearly some component of these distros which is being upgraded over time so that later releases fail where earlier ones didn’t. So what’s the upgraded component causing all the trouble?
Perhaps unsurprisingly, given that it’s a compilation error that shows you there’s a problem in the first place, it turns out that the gcc compiler is the culprit.
If you do a fresh install of Ubuntu 16.04 (the long-term support version, so still very much current and relevant), whilst making sure NOT to update anything as part of the installation process itself, issuing the command gcc -v will show you that version 5.4.0 is in use. Do the same thing on Ubuntu 16.10, however, and you’ll discover you’re now using gcc version 6.2.0.
A fresh Debian 8.6 install, subjected to an apt-get install gcc command, ends up running gcc version 4.9.2. The same thing done to a fresh Debian 9 install results in a gcc version of 6.2.1.
Manjaro is a rolling release, of course, so it’s software components are forever being incrementally upgraded: it makes finding out what gcc version was in use at the start of the year rather tricky! So I don’t have hard evidence for the gcc version shift there -but my main desktop is currently reporting version 6.2.1, so I’ll stick my neck out and say that I would lay odds that, had I checked back in January 2016, I think I would have found it to be around version 5.something.
In short, for all three distros currently under my microscope, a shift from gcc 4- or 5-something to 6-something has taken place… and broken Oracle’s installation routine in the process.
It means that all distros will eventually come across this compilation problem as they eventually upgrade their gcc versions. Expect Fedora to keel over in short order, for example, when their version 26 is released next April (assuming they go for a late-release version of gcc 6.something, which I expect they will). No doubt we’ll have all moved on to installing Oracle 12c Release 2 by then, which is probably suitably position-independent throughout… so maybe no-one will ever have to worry about this issue again. But in the meantime… the constantly changing nature of gcc is a problem.
So, what’s to be done if you want Oracle 12c installed on these distros with their fancy new gcc versions? Nothing I could really think of, except to ensure that the old, functional versions of gcc and related development tools are installed …and that can be easier said than done!
On Debian 9 (‘testing’), for example, instead of just saying apt-get install gcc, you need to now say apt-get install gcc-5, which ensures the ‘right’ compiler version is installed, with which the Oracle installer can live. Thus can this screenshot be taken:
…which shows me happily querying the EMP table on 18.104.22.168 whilst demonstrating that I’m running Debian Testing (codenamed “Stretch”). That’s only possible by careful curating of your development tool versions.
The same sort of ‘install old gcc version and make it the default’ trick is required to get 12c running on Ubuntu 16.10 too:
-though I had to specifically install gcc-4.9 rather than “gcc-5”, since the compilation error still arose when ‘gcc-5’ was installed. These things get tricky!
Anyway: there it is. Gcc’s constant version increments create havoc with Oracle 12c installations. Coming to a distro near you, soonish!
Picture the scene. My HP server has just had its set of 4 x 3TB disks replaced, so there is a pile of 3TB disk sitting there, spare, on my desk.
Around the same time, as a result of seeing a work colleague’s high def monitor, I decide that I want one too. The annual hardware budget having been blown getting the new 4TB disks for the server, however, the chances of me soon acquiring a shiny new monitor of whatever definition are exceedingly slim. But I have a degree in cunning, so I decide to install a new NVidia graphics card into my OpenSuse-running main PC to prepare it to drive a shiny new high-def monitor. At which point, OpenSuse chokes, explodes and otherwise kicks the bucket: where previously my OpenSuse desktop had been glitz and glamour personified, now the drop-shadows around windows have gone; wobbly windows have stopped wobbling; the desktop cube has started pining for the fjords; and, generally, the entire OS I’ve been happy with for 8+ weeks now looks completely awful.
Faced with a spare pile of hard disks and a screwed-up PC O/S install: What would you do?
Me? I decided to swap in the four drives to make a new RAID array for my PC and take the opportunity whilst I’m at it to ditch OpenSuse Leap 42 and experiment instead with Ubuntu 16.04. This was probably a bit perverse on my part, since I’ve been delighted with OpenSuse for most of the time I’ve had it, and generally regard it as pretty wonderful. So parting with it was a bit hard -but inevitable, given its new-found graphical screwiness. Besides, I’m a sucker for trying new things out and Ubuntu 16.04 (codename: Xenial Xerus, apparently meaning, roughly, “friendly squirrel”) was released to the world just three weeks ago and most of the reviews of it sounded interesting.
I last used Ubuntu back in 2006 and/or 2008, so it’s been a while! I swore off it when they introduced Unity, the ghastly launcher-thing that sits on the side of your screen, vertically; that always struck me as determinedly awkward, given most people have horizontally-oriented monitors. I only considered Ubuntu 16.04 because, for the first time ever, the Unity launcher can be configured to display horizontally, where it makes much more sense and looks just like the launcher of any Windows or “normal” Linux distro you care to mention.
The other real reason for thinking of Ubuntu today? In a word: ZFS. Ubuntu integrates ZFS tightly into itself in a way that OpenSuse never does. So where on Suse I had to script the importation of my music zpool after every PC reboot, Ubuntu just mounts it automatically without me (almost) having to lift a finger. ZFS is important to me for data integrity reasons: a Linux distro that treats it as practically a native file system gets my interest.
But I’m getting a little ahead of myself: first, I had to install the thing. And I have to say, it was an atrocious installation process. I was installing from a DVD I’d burnt from a downloaded 16.04 ISO. Every time I tried, it kept stalling on the ‘file 60 of 60’ mark. By (1) not selecting the option to update software as part of the install, nor to install third-party multimedia codecs; and (2) manually configuring a wireless network to my mobile phone acting as an access point, I finally managed to get this to stop being a problem. But even when, under these circumstances, the install sailed through to completion, the OS would fail to reboot properly when prompted and I was required to manually switch the PC off and on again. Short version: it was long, slow and flakey.
I subsequently tried installing it on a variety of old PCs, spare laptops and virtual machines …and the story was completely different. So it must just have been bad luck (or poor install media: those other installations were done from a bootable USB stick, not the DVD). But it left a poor impression, anyway.
So what’s it like when finally installed?
Well, for starters, I find Ubuntu to be nicely presented (once you change the slightly-hideous purple desktop background!), with a good choice of default fonts for the GUI and the terminal. OpenSuse is attractive in quite a flat way (the modern æsthetic, I guess), but Ubuntu feels attractive in quite a normal way by comparison. The only two exceptions to this are (1) the windows decorations (minimise, maximise, close) are on the left-hand side of the window, not the right and this cannot be changed in 16.04; and (2) Ubuntu’s use of ‘global menus’ and/or menus in the toolbar of application windows is pretty bad.
The global menu is just madness: if you’ve got a text document open in the bottom right-hand corner of your 32″ screen, you have to navigate all the way up to the top-left of the screen before you even see a ‘File’ menu. No thanks. Happily, in System Settings -> Appearance -> Behavior you can click the option to ‘show the menus for a window… in the window’s title bar’ and that problem is fixed. But don’t close the appearance configuration tool just yet, because another annoyance with Ubuntu’s application menus can be sorted whilst you’re here: by default, they remain hidden until you mouse over the application window’s header bar. Even when you hover, there’s a momentary wait before the menus appear… it’s jarring and slightly unnerving. It also means you have to aim your mouse at ‘nothing’, hoping you end up in the vicinity of the ‘File’ menu (or whatever you were hoping to hit). Chances are, you will miss, most often by quite a large amount! It seems a preposterous way of doing things to me. Fortunately, in the Appearance tool, there’s the option to set ‘Menus visibility … Always displayed’ -and then, finally, Ubuntu behaves as most other operating systems do!
So that is all fixable, but the windows controls are permanently placed where Mac users and southpaws will enjoy them …and I don’t! I am hopeful that the ability to move the window controls back over to the right will soon return. It was certainly possible to put them there in previous Ubuntu versions; hopefully it’s just a tweak or twiddle that will do the job once someone, somewhere figures it out…
As a bonus, Ubuntu loves my new graphics card and wobbles its windows alluringly and spins its desktop cube speedily, which makes me happy. Graphically, it’s pretty slick. Its choice of wallpapers and other theme-able elements is a bit lacking, however (Xubuntu 16’s selection is a lot nicer, in my view. Fortunately, it’s trivial to download the Xubuntu ones and back-load them onto Ubuntu by copying the contents of /usr/share/xfce4/backdrops to /usr/share/backgrounds, as root).
What Windows users would call the ‘start menu’ is, in Ubuntuland, called ‘the Dash’. I find it a bit of a problem, since it doesn’t present a nice hierarchical menu of application types into which you can drill at leisure. So you don’t get a small, simple, all-over view of what programs you’ve installed. Instead you get a ‘home page’ that lists recently-used applications and files/folders, which might be moderately useful if it displayed more, but its icons are huge and the data density is exceedingly low.
To see anything more, you have to click various icons at the bottom to activate various “lenses”: there is a specific one for searching for videos; another for music; another for files… and there’s one that looks like an artist’s easel which is actually an ‘A’ for applications. That’s what will show you all your installed apps in one go, provided you (a) go on to click the ‘Installed’ option rather than accept the default recently used/installed/dash plugins view; and (b) don’t mind huge icons and a lot of scrolling.
I don’t find it very useful; I rather think you’re supposed to type what you want in the search filter instead (but if you want to compose music, you have to know to type ‘m…u…s…e’ for ‘musescore’, which I don’t think works for a lot of things whose specific names I neither know nor remember).
There seems no easy way to alter the size of the Dash icons (changing the size of the launcher icons (i.e., the icons in what Windows would call the ‘quick launcher’) is a piece of cake: System Settings -> Appearance -> Look -> Launcher icon size. But that does nothing for Dash icons, leaving the Dash an extremely poor way of launching things (for me, at least: your mileage might well vary, of course).
By default, Ubuntu only enables one virtual desktop (a curious choice in my view: I regard virtual desktops as one of Linux’s best features). But it’s easy enough to switch them back on, at which point the Workspace Switcher button becomes meaningful. Sort of…
The equivalent 4-pane switch in OpenSuse lets you click on any of the quadrants to immediately switch to that virtual desktop; and if you’ve got a Desktop Cube effect switched on, the desktop will be ‘travelled to’ by spinning the cube. But not so in Ubuntu. Click one of those panels in the switcher button and you get this:
So I now have to click one of the displayed virtual desktops to switch to it. No Cube effect kicks in, and I’ve had to use my mouse once more than necessary. I wasn’t impressed.
Whether it’s a failing of Gnome or Unity or just of Ubuntu, I couldn’t say, but the notification system seems weak. In point of fact, there don’t seem to be many notifications in the first place, but when they do arrive (to tell you that there are software updates available, for example), you can’t do anything with them. You’d think (well, I would anyway!) that you would be able to click the notice to launch the software upgrade process, but you can’t. Instead, the notice just fades into a blur if you hover your mouse anywhere near it, so that you can’t meaningfully click it at all. You can’t dismiss the notice, either: it just sits there, pointlessly, until it decides to vanish in its own good time. I was fortunately able to install CustomizeNotifyOSD to fix that last issue (now I can ‘click to dismiss’ notifications), but it’s not ideal.
A word about stability: on both my main PC and my vintage 2012 HP laptop, Ubuntu has crashed since I performed a fresh install. I can’t say any more than that: there was no common factor I could identify and it could well have been an application common to both installs that was responsible in any case, rather than the OS itself. But I don’t remember OpenSuse ever crashing.
Finally: does it run Oracle? Why, yes it does… though I don’t think I’ve ever seen so many linking errors in one install before (I did the 22.214.171.124 install)! I’ll have to see if I can automate the fixes required, because there are more than a dozen of them! But yes, if you persist, you do get it installed OK:
…and the database actually works and returns results when asked nicely:
Ubuntu 16.04 is an “LTS” release -Long-term Support- which means it will be patched and supported until 2021. I barely keep an O/S long enough to make it to month 3, let alone year 5, but it’s a nice concept if you value stability and predictability over the new shiny.
Anyway, it’s now been a week. The main PC is functional; the two laptops are good. I can’t say I love Ubuntu: there are annoyances (chiefly the right-hand placement of the windows controls, I think). But there are pleasures too, and overall I’m enjoying it.
Summing up, then:
Weird Global and disappearing application menus can be fixed
Oracle 12c runs on it
Window controls unmovable on the left-hand side,
Dash icon size: big and un-alterable,
The workspace switcher doesn’t switch between virtual desktops… extra clicking is required!
Oracle 12c has to be arm-twisted to run on it!
Some crashes (not sure if it’s O/S’s fault, though)
Relatively poor choice of default wallpapers (fixable by borrowing Xubuntu’s, and others)
Slow and flakey installation process
The Global Application Menu (which can fortunately be turned off)
Notifications are visually intrusive and not very functional
I took the opportunity to do a couple of things with Gladstone, the Oracle pre-installer -to deal with issues arising from me testing a bunch of other distros which I haven’t otherwise touched in a while.
First, Gladstone now works on Centos 6.3 and Scientific Linux 6.3. For some reason, I had forgotten to add these new point-releases to the list of “acceptable distros”. Now fixed.
Second, Gladstone now works on Oracle Enterprise Linux 6.3, using the free update repositories provided by Oracle Corporation. Thanks to Ales for hassling me nicely enough (via the comments pages hereabouts) that I felt it might be useful after all:
I have to say I have seldom installed OEL… and I can confidently assert that I am grateful for that, since my eyes would bleed if it were otherwise. Radioactive Red-on-White is the opposite of calm, soothing… or pleasant! Thank God it cools down quite nicely once the thing’s installed and you’re sitting at the Gnome Desktop! But anyway, Gladstone now does for OEL what it does with the other Red Hat Clones -though it assumes you’ve done a “Desktop” installation (Basic Server, the default, doesn’t come with any X or window managers, and Gladstone’s not going to plug that gap).
Third, I realised that whilst Gladstone claimed to work on Linux Mint Debian Edition (LMDE), and did actually do so about 18 months ago, it has been broken for quite a while, since it sought to download a version 18 library for gcc++ which is no longer available. I have thus refreshed the code so that the newest version of that library (version 25) is downloaded instead. Gladstone (and Oracle 11g) therefore works on LMDE once more:
Finally, I haven’t touched Ubuntu in a long while, so Gladstone has not worked on anything Ubuntu-ish since version 10.10, which is an eternity ago. Thanks to the installfest, that’s now changed, and Gladstone now prepares Ubuntu 12.04 for running Oracle 11g effectively:
The Oracle installations on both Ubuntu and Linux Mint Debian Edition both generate an error at link time, similar to the one experienced at the same point by Fedora. This is a feature of the way newer Linuxes do indirect linking. Gladstone deals with this ahead of time by writing a small shell script to your Desktop. When the linking error happens, you just launch that fix-it shell script (by double-clicking, as yourself) and then you can switch back to the Oracle installer and click ‘Retry’: the thing then sails through to completion without further trouble.
I ran into some interesting problems getting Oracle onto these…, er, “niche distros”, the principle one being that quite often their highly-convenient ability to install in ‘Live’ mode means that they don’t prompt you for everything that a standard installer might. Thus, I inadvertently ended up running LMDE with a DHCP-assigned IP address… which wouldn’t have mattered if the IP address used when Gladstone ran (and wrote into the hosts file) was the same IP address the box got assigned after its Gladstone-triggered reboot. Unfortunately, however, it wasn’t. The net result was that my Oracle installation failed at the point where it tries to start a listener …because it was trying to start it on an IP address which was no longer used by the server.
I’ve therefore added a couple of checks into Gladstone regarding networking. First, it checks you have a live Internet connection by counting packet loss when pinging Google: some packet loss is OK, but 100% loss makes it think no Internet connectivity exists at all and it therefore quits.
Second, it checks if you’re using DHCP. Now this is actually very difficult to do (especially if you try to make it work cross-distro). So difficult, in fact, that it’s actually impossible to do it reliably. You can check for the presence of various lease files, or the contents of various interface files… but no such check can be relied on 100%, especially since you can use tools like ifconfig to switch between a static and a DHCP IP address without causing the contents of those files to change at all. So, Gladstone cheats: it tests for the presence of a DHCP client process (dhclient), and if it finds it running, it will warn you and offer to quit. However, since it’s not a 100%-guaranteed test that DHCP was actually used to acquire your current IP address, you can ignore the warning and continue if you like.
Finally, I took the opportunity to tidy up a host of ‘quirks’. The thing is now a lot more consistent and less prone to flooding your terminal with irrelevant garbage messages.
Anyone experiencing difficulties with the script: let me know and I’ll see what can be done.
A slightly annoying error message always appears whenever you boot Ubuntu 11.04 Server as a guest O/S in VirtualBox:
piix4_smbus 0000.00.07.0: SMBus base address uninitialized - upgrade bios or use force_addr=0xaddr
It doesn’t actually do any harm to the guest (as far as I can tell), so one could perfectly well leave it alone. But it’s possible to get rid of it altogether simply by issuing three commands and editing one configuration file. First:
sudo nano /etc/modprobe.d/blacklist.conf
Add the text
…to the end of the file. Finally, issue the commands:
sudo update-initramfs -u -k all
When the machine comes back up after that last reboot, you won’t see the error message. What this is doing is simply preventing an attempt to load the i2c_piix4 kernel module. VirtualBox doesn’t emulate the hardware for which this module is actually needed, but Ubuntu doesn’t know that and tries to load it anyway. Blacklisting the module prevents Ubuntu doing that and thus makes the error disappear.