[Gentoo] Fixing parallel make

I’ve been trying to fix the Makefile for Gabedit, a computational chemistry GUI, for a few days. It was completely broken for parallel builds (make -j#). Finally I came across an excellent post by GNU make maintainer Paul D. Smith that allowed me to fix the problems. The key was a make-defined variable called MAKECMDGOALS, which is defined to whatever targets were set on the command line.

Will our spring break happen?

We’ve got Northwest Airlines tickets to go to Florida to spend spring break with my family. But now, I’m not even sure it’ll happen.

While the pilots stated Friday that they would have the right to strike, Northwest management has argued that a strike under these conditions would be illegal. Northwest has informed the bankruptcy court that it would seek an injunction to block a strike.

In 1998, Northwest pilots went on strike for about two weeks and the carrier lost about $1 billion.

A Northwest executive testified last month that a pilots strike could lead to liquidation of Northwest Airlines.

[Gentoo] Configuring what hardware to build X for

I’ve added VIDEO_CARDS capabilities to x11-drm and mesa in addition to xorg-x11 now, so you have complete control over which video cards and input devices your X will support. If you happen to use binary drivers, you’ll probably want to set VIDEO_CARDS=”none fglrx” or “none nvidia”; that will prevent the 3D drivers in mesa from building.

Makes for a nice reduction in space — each 3D driver on my system takes up about 13M, when built with debugging. Installing 7 instead of 15 makes quite a difference. Also there’s the savings in build time.

If people clamor enough, I might split ati out into r128, radeon and mach64, as well, but probably won’t split radeon up any further.

[Gentoo] E-Trade and Gentoo

I’ve come across an interesting via LWNeWeek article on their use of open source. It’s intriguing to see some of the reasoning that goes on in the minds of people like vice president of architecture Lee Thompson.

A couple of Gentoo-relevant excerpts follow my comments. The main gist is that the ability of your system to survive a larger rate of change is what makes it a survivor, that he wants a Gentoo server distro, and that his goal is to balance the agressive change of the first point and the stability of the second point.

OK, so you know the phenomenon—the phenomena is, the amount of change
that you are sustaining on a Gentoo system is orders of magnitude larger
than the amount of change that a typical proprietary operating system
from anybody—Solaris, HP-UX, mainframes, whatever—[would go through].

Whatever operating system, the rate of patches coming out of the vendor
is much lower than what you enjoy on, you know, my Gentoo laptop or your
Gentoo machine.

And then I started looking, kind of watching this, obviously, from a
technology management perspective. … If you can sustain change faster
than somebody else, you’re going to survive, and the person who can’t
sustain the change is not going to evolve, and they’re going to die off.
This is almost more important a realization than the direct cost
savings, which is still phenomenal.

Yeah, I’ve been running Gentoo for the 2002 to 2003 time frame, and I’ve
had several issues. I’ve said to myself, well, you know, the change rate
is worth it. Change destabilizes, but change is good, and that’s kind of
a classic problem. I don’t want to suffer from innovator’s dilemma at
E-Trade. I want to keep pushing this company very, very hard. So I want
to drive change. The downside of that is if you try to change, you can
destabilize the system.

[Gentoo’s Chief Architect] Daniel Robbins always wanted to do a server
variant of Gentoo, which the project, I don’t think, ever started, but
it’s always been something that was kind of on the mind of the Gentoo
community—that there should be the top-of-tree distro, and behind it
something a little more stable, almost exactly mirroring what the Fedora
community project is and the Red Hat AS series of servers.

So, here I am, the guy who’s trying to push change. I work on a Gentoo
box, while our production system is Red Hat AS 3.4, which is very
stable. And so that’s kind of a good way of balancing aggressive change
and stability, in our mind.

[Gentoo] Stereo OpenGL update

Discovered that fglrx (ATI binary drivers) only enable stereo for cards with a physical stereo connector (a mini-DIN port). This is annoying, because a number of stereo goggles have VGA pass-throughs to get the sync. That means there’s a little plug that plugs directly into the monitor VGA port on the computer, and it has a plug on it for your monitor cable. It also has a little cable going off for the stereo goggles.

This came up because I thought stereo should be enabled (the X log said so), but in reality I didn’t get any stereo visuals. I’m trying to convince ATI to add a ForceStereo option that’s at least available for all FireGL cards, if not all cards their drivers support.

Also, a couple people asked what stereo is. Basically, it’s viewing a 3D object using a 2D screen and some special goggles. Usually, the screen alternates a “left eye” image and a “right eye” image at >=120Hz, and the goggles are required to blank out the wrong eye so you see a true stereo image at ~60Hz. It’s useful for visualizing any 3D objects (molecules, ocean simulations, buildings, probably geology for geoman), and some games can use it too. Tom’s Hardware has a decent review from May 2005.

[Gentoo] Doing my taxes on Linux

As the usual forms began showing up in the mail over the past week or two, I’ve been thinking about how to do taxes this year. A lot has changed with the move to Oregon a bit over a year ago. So this will be the first time figuring out how to deal with taxes on my own.

I initially thought to just hire a tax preparer, but TurboTax is pretty popular. I’d really prefer to find a Linux-based program. I discovered that there’s a Web version of TurboTax, but I also discovered there’s been some information leakage.

After some searching, I found TaxGeek. Out of everything on Freshmeat and SourceForge, it looked the most current and maintained. Still waiting for a release for this year’s tax forms, though. We’ll see what comes.

[Gentoo] r300 driver and gaming

Update: See my newer post — UT2003 runs again, and Quake4 also runs. Overall, lots of textures are screwed up, however, so you get strange colors.

Just updated my Mesa to CVS HEAD from 6.4.1. I’m very pleased to see that UT2004 is fast enough to be playable now.

Doom3 does a lot better, although still can’t play it. It starts up now and gets through most of the intro, but it dies when it’s about to start the actual level.

Update: Apparently Doom3 works in multiplayer mode, which I can’t test because I have the demo version.

Ends with:
*********************************WARN_ONCE*********************************
File r300_state.c function r300_setup_rs_unit line 1269
fragprog wants col0, vp doesn't provide it
***************************************************************************
*********************************WARN_ONCE*********************************
File r300_state.c function r300_setup_rs_unit line 1315
Don't know how to satisfy InputsRead=0x00000002
***************************************************************************
signal caught: Segmentation fault

Quake4 doesn’t screw up my resolution anymore when attempting to start, although it still doesn’t start at all. Lots of missing extensions at startup time:

X..GL_ARB_texture_non_power_of_two not found
X..GL_EXT_shared_texture_palette not found
X..GL_NV_float_buffer not found
X..GL_NV_register_combiners not found
X..NV_fragment_program not found
X..GL_EXT_stencil_two_side not found
X..GL_ATI_separate_stencil not found
X..GL_ATI_fragment_shader not found
X..GL_ATI_text_fragment_shader not found
X..GL_ARB_shader_objects not found
X..EXT_depth_bounds_test not found

Ends with:
reloading gfx/guis/scrollbar_down.
*********************************WARN_ONCE*********************************
File r300_ioctl.c function r300Clear line 555
CB_DPATH has been enabled.
Please let me know if this introduces new instabilities.
***************************************************************************
signal caught: Segmentation fault

One major and unfortunate regression: UT2003 no longer runs.

Xlib: extension "XiG-SUNDRY-NONSTANDARD" missing on display ":0.0".
*********************************WARN_ONCE*********************************
File r300_ioctl.c function r300Clear line 555
CB_DPATH has been enabled.
Please let me know if this introduces new instabilities.
***************************************************************************

Backtrace:
[ 1] ./Core.so [0xb751778a]
[ 2] [0xffffe420]
[ 3] [0xb68ea00a]
Signal: SIGSEGV [segmentation fault]

Other games:
America’s Army is faster, but the colors are totally screwed up on many of the menu screens.

In another regression, Cube is now unplayably slow. Cube console output:

*********************************WARN_ONCE*********************************
File r300_ioctl.c function r300Clear line 555
CB_DPATH has been enabled.
Please let me know if this introduces new instabilities.
***************************************************************************
*********************************WARN_ONCE*********************************
File r300_render.c function r300Fallback line 793
fallback:ctx->Polygon.OffsetLine
***************************************************************************

Legends plays great with both 6.4.1 and CVS HEAD, as does Enemy Territory.

Summary:

6.4.1 HEAD
UT2004 Too slow Works
Doom3 Doesn’t start at all, screws up resolution Can’t begin first mission
UT2003 Works Works
Quake4 Doesn’t start at all, screws up resolution Works
Quake3 Works Works
America’s Army Too slow Faster, colors weird
Enemy Territory Works Works
Cube Works Too slow
Legends Works Works

Kudos to everyone working on the r300 driver. Keep up the good work!

Stereo OpenGL

I need to get stereo 3D going for work, because it’s very important to what we do. For us to move more workstations from old SGI IRIX boxes to new Linux once, it’s critical that stereo 3D work on them. As far as stereo 3D goes on Linux, a few options exist:

  • Use nvidia binary drivers
  • Use ati binary drivers
  • Go find patches against Radeon or Matrox drivers on some unspecified date, and either find that date of X release or forward port them

I started out with the third approach and a FireGL 8800, but I’ve gradually moved to the second approach because the third was too much work. Found a nice link to an SGI page on setting up fglrx (ATi’s binary drivers) for stereo 3D, FSAA, multiple monitors, and more. Got the 120hz mode working on the monitor, which is what we require for stereo (60hz for each eye, alternating). Next step is getting the drivers to recognize that stereo should be available, and making it available to Coot through GtkGLExt.

Exercise

So, like a lot of open-source developers, I’m a bit overweight. (The rest are all insanely skinny — there seems to be nobody in the middle.) A couple weeks ago, I got a treadmill from Costco for $1000 (on sale, regularly $1500). Then, two days ago, I bought the latest DDR game for Playstation 2 for $60, and another $25 for a second dance pad. Guess which one I spend more time on?

The reason we got DDR is some news story talked about how a video game fanatic and couch potato lost 70 pounds playing it. And it’s definitely addictive — I’m about a third of the way up the difficulty levels now, and it’s already insanely hard.