Saturday, June 25, 2016

OpenIndiana Hipster: Hello, GCC 4.8!

This is just a quick update in case anyone out there is holding their breath until I provide an update on my efforts to get GCC working.

____


I have to be honest - I was just about to give up on OpenIndiana Hipster yesterday due to what seemed like a wild goose chase when it comes to getting a working compiler installed on that system. Throughout all of my previous OI installations (151a8 or Hipster), I had never (not once!) been able to get GCC or even Sun Studio up and running. It would often appear to be installed, but then nothing would happen when I'd try to use it.

Over time, I had come to assume that working GCC on OI was but a grand joke played on unwitting newbies who thought they'd like a SunOS 5.11 platform on which to learn C programming. The gullible naifs! Ha! Ha!

This was further exacerbated by the muddle of information online, none of which seems definitive. And then, while doing a search for GCC at the sfe.opencsw.org package repo, I saw a package for GCC 4.8, at which point I opened a terminal window, became root, and took a shot in the dark:

# pkg install gcc-48

At this point the system asked me to choose gcc-48 from either sfe.opencsw.org or the main OpenIndiana Hipster repo, and so I decided to stay close to home:

# pkg install pkg://openindiana.org/developer/gcc-48

Success!





And so it is with a deep and abiding sense of closure that I can proceed with learning C via Teach Yourself C in 21 Days. This will turn up the heat in a different way, as I'll only have my sense of procrastination to blame for further delays on that front. (I bought that book in the mid-1990s, prior to my UNIX enlightenment, whereupon I spent the rest of that decade locked in a cage match with the Borland C compiler installation CD that came with the book, as it didn't seem to work on any Windows machine. Then again, as I vaguely remember hearing Eric S. Raymond put it in a speech I saw online a few years ago, learning to program in Windows is like learning to dance while wearing a full body cast: it can be done, but it's not nearly as much fun.)

You can breathe now.

Thursday, June 23, 2016

OpenIndiana Hipster: SunOS 5.11 + awesome sauce

A brief (if circuitous) history


For the uninitiated, OpenIndiana Hipster is preceded by a long and winding historical road, which I'll attempt to recap here with the caveat that this is only my own understanding of a fascinating but complicated story.

Early 1970s: UNIX is developed at Bell Labs (owned by AT&T) by Ken Thompson, Dennis Ritchie, and other brilliant engineers.

Mid to late 1970s: UNIX installations start proliferating at universities and other institutions. At UC Berkeley, student Bill Joy helps maintain that school's UNIX installation, and begins writing some extra software tools, an effort that will expand in scope to become "Berkeley UNIX", or the Berkeley Software Distribution (BSD). Initially known as a set of extensions for use with AT&T UNIX installations, BSD will go on to become a wholly separate UNIX-derived operating system in its own right. Meanwhile, much of the BSD source code finds its way into AT&T UNIX, thus blurring the line between the two. (In other words, while today's BSD-derived systems can't legally call themselves UNIX, they are just as UNIX in spirit and source code genetics as their "official" UNIX cousins.)

Early 1980s: Bill Joy is lured to the fledging Sun Microsystems early enough to be considered a "founder". One of his tasks is to adapt his BSD for use on Sun's line of workstations. This modified version of BSD is christened "SunOS".

Early 1990s: Sun Microsystems decides to merge SunOS's BSD-derived codebase with AT&T's SVR4-derived codebase. While the post-merge UNIX base of their product continues to be called SunOS, the entire operating system (comprised of SunOS plus the GUI and a multitude of extra tools and utililties) is now marketed as "Solaris". (I'll avoid a rundown of the version numbering here. It's complicated.)

Early to mid 2000s: Sun begins the process of open-sourcing as much of Solaris as possible, an initiative that will culminate in the release of OpenSolaris, a binary distribution codenamed internally as "Project Indiana". The idea is that the work done on OpenSolaris by Sun engineers and the wider community will find its way into Solaris 11.0 (as undergirded by what will be known as SunOS 5.11).

Mid to late 2000s: OpenSolaris takes flight, only to have its wings clipped by muddled thinking and short-sighted decisions from the suits at Sun.  I guess that's why the men in the corner offices make the big bucks.

2010: Sun Microsystems is bought by Oracle. One of Oracle's first orders of business is to kill OpenSolaris. On an unforgivable note, Oracle decides that any updated versions of open source code created by the OpenSolaris community will henceforth become closed source. (Bryan Cantrill's rant on this is as epic as it is cathartic.) Meanwhile, some former Sun engineers (and other soon-to-be-disenfranchised members of the OpenSolaris community) have already seen this coming, and set about preparing the OpenIndiana project to ensure that the OpenSolaris codebase will continue to be maintained and improved independently of Oracle. (To make matters a little more confusing for those who don't eat, sleep and breathe this stuff, OpenIndiana, a full desktop OS, is shepherded by the illumos Project, which oversees the open source version of the SunOS 5.11 code, which is also used by other OpenSolaris distributions such as OmniOS, SmartOS and Tribblix.)

2013: The OpenIndiana project introduces "Hipster", its fast-moving development branch following a rolling-release model. This is where the latest OI and illumos stuff happens, though with the caveat that you can expect breakages every now and then due to things occuring at a full gallop. Users are advised to use the Legacy branch (151a8) for production purposes.

Some bumps on the road back


As for my own recent personal history, I'm now running Hipster for the first time in a few months, and so far it has been a very smooth experience after a previous one that was quite dodgy - I was unable to go to console mode and thus switch to an alternate desktop or window manager, and the screensaver would lock up if I didn't remember to at least jiggle the mouse every now and then.

After filing bug reports for both of those issues, I found wasn't able to upgrade from the 2015.10 iso to the newest build in order see if said bugs were fixed. Shortly after entering the upgrade commands (pfexec pkg refresh --full and pfexec pkg image-update -v), the process would halt with an error message reading "Segmentation Fault (core dumped)". Not cool.

And so I had spent the intervening months with a waning sense of enthusiasm for the project, thinking that perhaps it was in too much of an experimental state to be remotely useful for reliable daily use. A few days ago, however, I downloaded the newest iso (2016.04), hoping this cut would resolve my issues, only to find my ThinkPad T61p wouldn't even boot the live DVD. Waning enthusiasm was now turning to outright frustration at a system that I otherwise knew to be a jewel within the UNIX world.

What happened since then to turn the tide?

After the non-booting iso fiasco, I then noticed that other newly-burned iso images were also failing to boot, indicating there could be a hardware problem on my end. This lead me to think that perhaps I should retry upgrading from the bootable OI Hipster image already on hand. After installing from the DVD and trying to upgrade anew, I got the same error message noted above, but this time resolved to do some reading, and on the OI Hipster wiki saw that the package repository had changed since the 2015.10 iso. And so I changed from the old repository to the new one as follows:

# pfexec pkg unset-publisher openindiana.org
# pfexec pkg set-publisher -O http://pkg.openindiana.org/hipster openindiana.org

And wouldn't you know it, I was then able to upgrade to the latest build as of June 22. (I have since upgraded again, and am working from a build that is current as of two hours ago.) Upon checking that everything worked, I was finally able to close off the two delinquent bug reports.


The (open source) SunOS also rises


All-in-all, I am absolutely smitten with OpenIndiana Hipster, and am very pleasantly surprised by how polished it now seems compared to my previous experiences. I now have most of my favorite stuff installed, and am happy to report that with the upgrade from 2015.10, the Firefox version jumped from 24.something to 45.2.0. With this newer version, YouTube videos play on this machine with maximum smoothness, even in fullscreen mode.

Any complaints or issues I do have are as follows:

Support for Flash - My initial Google searches for Flash on OI Hipster are giving me a tension headache. I suppose it can be done, but I'll have to really dig in to make it happen.

Emacs not booting in GUI mode - I can start Emacs either in the console (i.e. without booting X11 first), or by entering emacs -nw in gnome-terminal. How am I supposed to play Snake? Very troubling, indeed.

gcc can't even compile hello.c - For some reason, dev/gcc doesn't recognize stdio.h, and so for now my longstanding mission to knuckle down and learn C programming will have to wait (for now). 

The above issues aren't insurmountable, and will surely result in some bug reports in my near future. Otherwise, OI Hipster is now a thing of beauty.

Thursday, June 16, 2016

NetBSD: 7.0 to 7.0.1 upgrade, working YouTube audio

It has been over a week and I'm still hanging in there with this NetBSD install. So far my distro-hopper's trigger finger is decidedly unitchy. (The DSM-5 is drastically incomplete without some sort of spectrum disorder to account for those who compulsively reinstall their operating system every other day. The first step towards people like us getting the help we need is being able to put a name to our condition.)

This time around, I'm remembering to breathe first and then find a way around (or through) problems as they arise. Since my last NetBSD-related post, I have been more or less using it to get mundane (but necessary) things done, mostly involving Thunderbird and LibreOffice. On a geekier note, however, I have accomplished the following...

YouTube with audio!

After posting a link to the aforementioned NetBSD article in Reddit, a reader offered a solution in that forum (/r/NetBSD) on how to get audio working for YouTube. They said "as for audio on Firefox, it Just Works, but the default uses PulseAudio, which requires dbus running". They recommended these steps to get 'er done:

# cp /usr/pkg/share/examples/rc.d/dbus /etc/rc.d/
# echo "dbus=YES" >> /etc/rc.conf
# service dbus start

And so now I can hear what YouTube has to say, though the playback is a little choppy at times. (The helpful reader above mentioned that some sort of graphic acceleration may be needed to get games to play smoother as per my complaint in the previous post, and methinks this may help make videos have an easier time of it, too. Now I just need to dig in and learn about graphic acceleration and how to make it happen in NetBSD.)

Upgrading from 7.0 to 7.0.1 using sysupgrade

There's not much to say here, other than my upgrade from NetBSD 7.0 to 7.0.1 being as simple as:

# sysupgrade auto ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-7.0.1/amd64

I didn't think to take notes during this process, as I was on the phone the whole time. Nevertheless, I simply typed in the command above (as per the official upgrade instructions, modified to reflect the correct version number) and watched text flying around the screen as things were downloaded and installed, and then answered "d" for "don't replace existing config files" or some such. And then it was done! I rebooted the computer and checked to see that the upgrade didn't throw up on itself:

# uname -a
NetBSD darkstar 7.0.1 NetBSD 7.0.1 (GENERIC.201605221355Z) amd64

And so now I have a UNIX on this laptop that is current as of May 22, 2016. I'm a happy guy.

Loose ends

Two things on my wish list right now include getting working WiFi and figuring out how to get the laptop's built-in microphone to work in Audacity.

The microphone issue is a distant second to getting WiFi up and running, and on that front I am well on my way. I won't confuse the issue by going into detail here until I can say I've conquered this particular beast. I have gotten some good leads, am oh-so-close, and will report my findings here when the time comes.

Part of the problem is that mounting WiFi seems to require stimulation of the same part of the brain that helps one make heads or tails of Euchre. Needless to say, if ever you're in a situation where your life being spared somehow depends on a hero flexing his Euchre abilities, just know that I'm not that guy.

Monday, June 13, 2016

The right is wrong for politicizing Orlando mass shooting

It is amazing (yet predictable) how right wing pundits and public figures have rushed to politicize the June 12 mass shooting that killed 50 people at the Pulse nightclub in Orlando. Nary a beat was missed in the race to lay the blame for the shooting at the feet of President Obama, or to at least nit-pick his every utterance on the issue.

Donald Trump staffer Dan Scavino Jr., for one, was incensed that Obama called the incident "terrorism", rather than "RADICAL ISLAMIC TERRORISM". (Let's be honest – the real source of Scavino's ire is that Obama isn't using his presidential pulpit to stoke anger against Muslims. In fact, that Obama practices diplomacy in the face of the threat of terrorism at all is something to be held in suspicion by the right wing authoritarian followers that comprise Trump's base.)

Besides, I'm not sure that Scavino was really that upset about Obama's choice of words (or choice of omitted words), as this was like an opportunity to remind the aforementioned base about Trump's stance on Islam that was too good to pass up.

And after the non-stop marathon of half-literate and ill-informed tweets of the past year, it's no surprise that The Donald was quick to weigh in. Of course, if you've ever tried to sit through one of his campaign rally speeches, it shouldn't shock you that he led with a note of self-congratulation:

"Appreciate the congrats for being right on radical Islamic terrorism, I don't want congrats, I want toughness & vigilance."

So even in the face of the worst mass shooting in U.S. history, Trump first primped his unlikely hair in the mirror and then reframed the whole tragedy with him at center stage as hero and Greek chorus all in one. He is his own favorite topic. (What I'd like to know is who these people are whose first reaction was to congratulate Donald Trump while the bodies were still being counted.)

Meanwhile, over at Fox News, host Tucker Carlson was blaming Obama himself for the shooting, asserting that the President's tendency toward political correctness caused the event, as if a lack of chest-thumping belligerence is the root cause of Islamic terrorism, rather than interventionist foreign policy and a long history of the U.S. intentionally destabilizing the Middle East.

Lost in all of the above was an acknowledgement that the worst mass shooting in U.S. history also happened to have targeted the gay community, a fact that apparently takes a back seat to the all-important cause of promoting Islamophobia over on the right. Fortunately, this wasn't lost on the President, who hit a far more human note by saying this was "an especially heartbreaking day for all of our friends, our fellow Americans, who are lesbian, gay, bisexual, or transgender."

And while I certainly woudn't dream of diminishing this tragedy, let us not forget the 12,942 U.S. citizens who died from gun violence in 2015. Perhaps those deaths are of far less value because we can't hang an enemy ideology on them, ‘such as ‘radical Islamic terrorism'. An even greater inconvenience for the right is that excess public mourning of ‘vanilla' gun deaths would draw undue attention to the gun control debate.

It's hardly surprising, then, that when any Muslim is responsible for a mass killing, the right can be depended on to quickly grab the ball and run as hard as it can with it before the next white (non-Muslim) mass shooter changes the channel.

___


Originally published on the Drudge Retort.

Friday, June 10, 2016

How can supposed 'freedom lovers' oppose gun control and support the death penalty?

At first it is puzzling to consider that there can be people who are against gun control on the basis of it being an undue violation of personal freedom by the state while also being in favor of that same state carrying out executions of its own citizens despite statistical evidence clearly showing that the death penalty does not serve as a deterrent to murder. This seeming inconsistency is embodied in Senator Ted Cruz, to name but one example, who until last month was running to be the Republican nominee in the upcoming presidential election.

(My assumption here is that many conservatives are prone to oppose gun control but support the death penalty. I realize there are also those who oppose both, which I can at least understand and respect regardless of whether or not I agree with that position.)

Note the above usage, however, of the term 'seeming inconsistency' (italics added this time around for emphasis), as I believe the apparent contradiction (if freedom from government tyranny is really the lens through which gun control is seen as objectionable) can be explained or at least potentially understood if we ask who is opposed to gun control and who is more at risk of being executed by the state. The may be found in the contrast between the two answers.

In reference to a study by the Pew Research Center, the Washington Post's Adam Winkler writes:

Polls show that whites tend to favor gun rights over gun control by a significant margin (57 percent to 40 percent). Yet whites, who comprise 63 percent of the population today, won’t be in the majority for long. Racial minorities are soon to be a majority, and they are the nation’s strongest supporters of strict gun laws.

Mike Weisser put it even more succinctly in an opinion piece in the Huffington Post: "Most NRA members are older, White men who listen to country music and live in Southern states and smaller, Midwestern towns."

On the other hand, as noted in my May 9, 2014 letter to Oklahoma Governor Mary Fallin:

There is a sharp racial disparity among those sentenced to state execution, according to the Staff Report by the Subcommittee on Civil and Constitutional Rights Committee on the Judiciary (1994). According to the summary of that report, "Analysis of prosecutions under the federal death penalty provisions of the Anti-Drug Abuse Act of 1988 reveals that 89% of the defendants selected for capital prosecution have been either African-American or Mexican-American.

Taking the above into consideration, is it an oversimplification to say that the contradiction at hand (people who oppose gun control in the name of freedom from state intervention also being in favor of state executions of citizens) as being resolved by framing the freedom in question being that enjoyed by whites and others lucky enough to be considered "privileged" in our society? Only then does it seem plausible that such people could on the other hand be so blithe about the that same 'oppressive state' taking the life of one of its own citizens, non-white as they are so likely to be.

Tuesday, June 7, 2016

Donald Trump and the presidential-campaign-as-demolition-derby

I have given up on prognosticating on the prospects of Donald Trump's success in the 2016 race for the White House. I honestly thought he wouldn't have made it this far, and yet his juggernaut of bombast shows no signs of abating. The logical side of me wants to say that he's paving the way for Hillary, given that his polarizing brand of politics would seem to further solidify the Democrats' traditional support base as well as help it attract disaffected Republican moderates, if only as a one-time "Anyone But Trump" initiative.

But then logic seems to have no place in this contest.

The only sure thing anyone can say right now is that Trump has left the Republican Party as we know it in a confused and bloodied heap, not knowing what has hit it. If the party's 'establishment' and its preferred candidates came to this election season expecting a genteel road race, then surely their delicate Formula One cars have been repeatedly T-boned by Trump in a big ol' Made In America beater. By force of personality alone, this lone political maniac has declared the election a demolition derby rather than a race.

And the people who think Trump is the bee's knees aren't looking for nuanced rhetoric nor seasoned statecraft. No, they merely want to swill some beer, salute the flag, and see shit get smashed apart on the battlefield.




And that sums up his appeal to his rabid base, who seem to see bluster and belligerence as sacred virtues unto themselves. I've tried to sit all the way through live feeds of Trump rallies, and somewhere at the 20-minute mark my brain starts checking out, as there is only so long any sane person can tolerate non-stop vacillations between self-congratulations, vicious name-calling, and brazen crowd-baiting. Worse still is being presented with an audience that is all-too-eager to answer his every jolt of invective with mindless chants of "U-S-A! U-S-A! U-S-A!".

As for the Republican Party itself vis-à-vis Trump, I am reminded of John Carpenter's 1982 remake of The Thing, in which the denizens of an Antarctic research base are being usurped by an alien virus that enters a host's bloodstream, replicates its molecules one-by-one, and then transforms the host organism into an non-human creature that is vaguely familiar but deformed and revolting nonetheless.




And so the Republican Party's moderate and 'establishment' wings must look at the collective manifestation of Trump and his movement as some sort of alien being that has snuck into their DNA on the sly, transforming the GOP into a repulsive caricature of itself, one that may come to represent the party in the popular imagination for years to come. (With the possibility of this crazed circus continuing for four long years, a Trump victory may be even more damaging than a loss, which is why it's easy to imagine moderate Republicans holding their noses and voting for Hillary this time around.)

Like the desperate characters in The Thing, the GOP elite must wish they had a political flamethrower on hand, but just like in the movie it's too little, too late.

Monday, June 6, 2016

NetBSD: A new beginning?

After a few months of traipsing around the worlds of SunOS and Linux, I'm back to NetBSD for what I hope will be a lengthy return engagement. And while I'm enamored of NetBSD for all the previously-mentioned reasons, I'm already thinking ahead to some problems to solve, some of which have also been mentioned before.

On that note, here are some irritants currently jumping out at me:

No YouTube audio

After retracing the steps I took last time to install Adobe Flash, I'm finding that I can get audio from almost any website (using Firefox) except YouTube, or sites embedded with YouTube videos. This is a marked departure from my previous experience, and I suspect it may be a problem with Firefox (in this case, the version 46 "Nightly" build), or else an issue with (or lack of) some non-Flash plugin or package.

Sluggish game performance

I've installed Tux Racer, SuperTuxKart and Celestia, only to find the system performance too slow for adequate playability. Considering this is a "low overhead" OS running on a 64-bit machine, one would think these games would roar to life with maximum speed and smoothness. And for all the carping about how bloated Linux has become, I have never experienced any slowness in the above-mentioned games nor any others. This leads me to think that perhaps some driver is missing, or that a configuration file needs a tweak or two.

Wireless networking

This issue is an unresolved holdover from a previous installation. Any lack of a solution thus far has more to do with the low bandwidth of my chair-keyboard interface than anything else. (Put another way, a system that does as little hand-holding as NetBSD requires a bit of perseverance on the part of the user.)

Beyond these issues, this go-around with NetBSD is going swimmingly so far, as I have the usual applications I need or want, and furthermore it simply feels good to be back to a system that exemplifies traditional UNIX.



http://www.netbsd.org/



_____


I won't bore you with the details of my more recent distro-hopping other than to offer the following thoughts on Oracle Solaris:

Despite any lingering controversies and resentments surrounding Oracle's stewardship of Solaris, it is still a supremely put-together system even if it does take forever to boot on my laptop. That's not to say there aren't any imperfections, and I'd be more than happy to participate in any online fora or bug-reporting venues, but not under the current terms of the Solaris license. I could list the glitches I came across here but I won't. (If my free-of-charge usage of Solaris is strictly for "personal use", then it would also preclude unpaid product testing on my part.)