Categories
Game Development Geek / Technical Linux Game Development Marketing/Business

Linux Game Development: GLIBC_2.4 not found

The following describes a GNU/Linux game development problem I am still tackling have solved, although I’ve made progress and learned a lot. Hopefully the following information can be useful to you.

The Problem

A few weeks ago, one person informed me that Killer Kittens blew up on his Debian Stable machine:

./killerkittens.bin: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by ./killerkittens.bin)

Most of the dependency issues I’ve encountered involved changing flags used in my libraries, such as libSDL. Unfortunately, this issue was different. It was strange because I wasn’t sure why my game was depending on GLIBC_2.4 since I wasn’t explicitly linking to it.

Why This Problem Exists

Since then, I have learned that this is a common problem for GNU/Linux developers, especially when using C++. By default, the linker will use the latest versions of functions you are using. Let’s say that you used gcc v2.94 on your Red Hat 6.1 machine to create your binary years ago. It will link against version 1 of a function. Well, that binary will continue to run on newer systems since version 1 is kept around for backwards-compatibilty, which explains why older games such as Quake 3 Arena will still run just fine.

Now if you use your cutting-edge Ubuntu (8.04) Hardy Heron system to compile (I’m actually on 7.04), you’ll likely have gcc v4.1 or higher, along with its associated libraries. The linker will find version 2 of a function. That binary will work just fine on your system, and it will work just fine on systems that have been upgraded to use the latest libc libraries. The binary will NOT work on an older system, such as Debian Stable, which is still using version 1 functions. The binary will complain that it can’t find GLIBC_2.4 because Debian Stable may have only GLIBC_2.3.

Possible Solutions

To solve this problem, you could make GLIBC_2.4 a requirement to play your game, but frankly, it isn’t truly a requirement, and there is no reason why you should force your users to upgrade if they don’t have to. More likely, you will just cut off your potential audience. Even if you are releasing the source to your game so that your players can always recompile to get it to run on their system, people generally like games that work out of the box. It’s less effort, which means more of a chance for your game to stay on someone’s hard drive.

You could find an older distro and build your binaries on it, but you may not have a spare machine and may not want to go through the hassle. Also, even if you installed it on your current machine, why give up the power of your current updated system? Michael from Linux Game Publishing offered the following advice:

one extra thing I do – I build against a VERY old set of libraries. As in Red Hat 6.1. That is a ‘magic environment’ that ‘just works’ everywhere.

I would like to try setting up a sandbox environment on my system. I know you can setup a new filesystem and chroot to it, but I had trouble finding information on how to put one together. Since I wanted to release this game weeks ago, I decided against spending a lot of time learning how to do yet another thing to get something working just so I can do the thing I initially wanted to do. Look up Yak Shaving if you hadn’t heard of it before.

Hope!

One thing people told me to try was autopackage’s build tools apgcc and apg++. These are wrapper scripts around gcc/g++ that are used to get your binary to build using the older library symbols.

Hopes dashed!

I think they would have worked fine, but there was a problem with building the Kyra Sprite Engine. Building Kyra is supposed to produce two libraries, libengine and libkyra. For some reason, when I used apg++, it forgot to use files found in a util directory, and so it wouldn’t build the libraries. g++ worked just fine, but then I had a dependency on newer symbols. I spent a bit of time trying to figure out if it was a problem with apgcc/apg++ or a problem with Kyra. In either case, I didn’t want to deal with it longer than I had to, and I was getting a bit demoralized. I can’t use my regular compiler, and I can’t use the one tool that people have suggested to help solve this problem. Honestly, if it wasn’t for Kyra, which has been giving me headaches for the past few months, I bet everything would have been solved long ago, but to gut my project of this library would be a bit more work than I would like. There had to be a way to solve this issue.

When I read more about the C++ ABI Problem, I saw the following quote which gave me hope again:

GCC 3.4 is able to generate binaries with the GCC 3.2 ABI using a compiler switch.

A compiler switch? Seriously? After searching a bit and asking questions on IRC, I learned about the compiler flag -fabi-version. According to C++ Standard Library ABI:

Changes to the default compiler option for -fabi-version.

It is versioned as follows:

* gcc-3.0.x: (Error, not versioned)
* gcc-3.1.x: (Error, not versioned)
* gcc-3.2.x: -fabi-version=1
* gcc-3.3.x: -fabi-version=1
* gcc-3.4.x: -fabi-version=2

My installed compiler was gcc v4.1, and I found that passing in -fabi-version=1 by itself didn’t do anything that I could see. I did, however, install gcc-3.3 and g++-3.3, which also pulled down the appropriate stdc++ library. From my own tests, I learned that the compiler switch did nothing useful. So much for that research. Still, with the older compiler, I was able to get a working binary that should run on older systems.

Some Success!

Before switching to gcc-3.3/g++-3.3, I would get the following output from objdump -x libengine.so:


Version References:
required from libm.so.6:
0x0d696910 0x00 06 GLIBC_2.0
required from libgcc_s.so.1:
0x0b792650 0x00 10 GCC_3.0
0x0d696910 0x00 05 GLIBC_2.0
required from libstdc++.so.6:
0x056bafd3 0x00 07 CXXABI_1.3
0x08922974 0x00 03 GLIBCXX_3.4
required from libc.so.6:
0x0d696914 0x00 09 GLIBC_2.4
0x0d696911 0x00 08 GLIBC_2.1
0x09691f73 0x00 04 GLIBC_2.1.3
0x0d696910 0x00 02 GLIBC_2.0

After using the older compiler version:


Version References:
required from libm.so.6:
0x0d696910 0x00 06 GLIBC_2.0
required from libgcc_s.so.1:
0x0b792650 0x00 09 GCC_3.0
0x0d696910 0x00 05 GLIBC_2.0
required from libstdc++.so.5:
0x081a2972 0x00 07 GLIBCPP_3.2
0x056bafd2 0x00 04 CXXABI_1.2
required from libc.so.6:
0x0d696911 0x00 08 GLIBC_2.1
0x09691f73 0x00 03 GLIBC_2.1.3
0x0d696910 0x00 02 GLIBC_2.0

Now I can package up my game and expect that it should run on older systems without a problem. You should expect that most of your players will be running a system with GLIBC_2.3 or GLIBC_2.4, so targeting the former should still allow your project to run on the latter.

Your distribution should also allow you to install multiple versions of gcc and g++. To implement these changes, I simply made sure that I changed my build scripts to use CC=gcc-3.3 and CXX=g++-3.3. My game’s binary and each of the custom-built libraries, including Kyra, no longer depend on the newer symbols.

Not a Full Solution…

Unfortunately, now my custom libSDL has a dependency on libX11 and libXext, even though I am still passing in –enable-X11-shared, which is what I used when I was using gcc-4.1. I learned why when I read the changelog:

SDL 1.2.11 Release Notes

– Dynamic X11 loading is only enabled with gcc 4 supporting -fvisibility=hidden. This fixes crashes related to symbol collisions, and allows building on Solaris and IRIX.

Unfortunately, SDL 1.2.11 was also the release that builds the way you would expect. That is, 1.2.10 does not provide a configure script, and so downgrading to it isn’t going to be a simple matter. If I keep 1.2.11 or even use the latest stable version, 1.2.13, I still have to deal with dependencies if I use gcc-3.3 to get rid of GLIBC_2.4. If I use apgcc, I have to deal with Kyra not building, which requires working on Kyra to fix it or working on my game to get rid of Kyra. Someone on IRC did suggest that Kyra’s build scripts or the code itself might conditionally rely on “gcc” being used, so that’s where I will investigate next.

If you are not using Kyra, however, I imagine the above information should solve any GLIBC_2.4 dependency issues you may have, but you now have to deal with libX11 issues. In fact, if you’re not using Kyra, then the apgcc/apg++ solution should work for you. Once I solve this problem, I will write a follow-up article explaining how I did so.

In the meantime, I did find this post by Gerry JJ about a script he wrote based on apgcc. I’ll have to check out his apgcc-derived script later.

For more info on this issue:

[tags]linux, game development, business, programming [/tags]

Categories
Game Development Games Geek / Technical Linux Game Development

Download Ryan “icculus” Gordon’s Speech at UCLUG

Thanks to LinuxGames.com, I learned that you can now download the icculus UCLUG speech audio files.

If you don’t know, Ryan Gordon is a Loki alumnus who is well-known as the guy who ports commercial games to GNU/Linux. I liked hearing him on FLOSS Weekly a few years back. You can download the audio for that show at http://twit.tv/floss8.

The Upstate Carolina Linux Users Group had a few talks, and Ryan’s talk starts around 35 minutes into the almost 3 hour audio file.

How many of you think of yourselves as game developers? Alright. A lot more of you should be raising your hands. A lot more of you are game developers than you think you are.

He takes you through a very brief history of Linux-based gaming, from Cracked.com to Loki to Vicarious Visions. He talks about Loki’s business model, which was porting existing, shipped Windows titles to Linux. I wrote about the problem with this model in Why Aren’t There More Linux-Using Gamers?, and Ryan mentions how low the interest is for people to buy the games they already purchased. He describes how Linux-based game servers became popular compared to the unreliable Windows servers. He talks about APIs such as OpenAL and SDL, which is a Google Summer of Code project.

He also talks about the false perception that Linux users don’t respect intellectual property, and false impressions about Linux users in general.

He finishes the talk by asking developers to teach other people how to develop. After all, the ability to create something, whether it is a game or not, whether it is on Windows or GNU/Linux, is great. The Q & A session at the end is also fascinating.

You can find the links to the MP3 or OGG files at icculus.org.

[tags] linux games, game development, video games [/tags]

Categories
Game Development Personal Development

Thousander Club Update: April 14th

For this week’s Thousander Club update:

Game Hours: 409.25(previous two years) + 42.5 (current year) = 451.75 / 1000
Game Ideas: 710 (previous two years) + 35 (current year) = 745 / 1000

I finally managed to fix the major problem I had with Killer Kittens. It wouldn’t run on older systems because it depended on newer GLIBC versions, and it seems that gcc and glibc developers have made it difficult to have a universal binary available.

Well, it wasn’t that difficult. Once again, it was just a matter of learning about something I didn’t know existed before. I can package up my game and send it off to the beta testers who had encountered a GLIBC_2.4 dependency problem. Soon I can release my game to the public.

After I have a finished game out there, I can start worrying about making it better. I have a received a lot of feedback, some of it related to game play and some of it related to technical issues. One issue was that my game runs at 1024×768, but because there was no in-game fullscreen mode option, people with displays at 1024×768 found that the bottom of the window would get cut off by the edge of the desktop. I figure I should change the game to use 800×600 instead, but I should also provide an in-game fullscreen option. You could edit a config file to make it run in fullscreen, but it should be easier to do from within the game itself. And even if I don’t provide the fullscreen mode option, I can move the menu options to the center of the screen so that players can see them even if they do end up with a window that takes up the entire screen and won’t fit.

One concern I keep wrestling with is whether or not I should release the game with the intent to make it better later. The game is long overdue, and so I would love to get it out to the public sooner rather than later. On the other hand, I would rather have a polished game as my first public release. One of the common bits of feedback I got was related to the poor quality graphics, which was just programmer art that I always meant to replace. Still, I wanted to release v1.0 over a month ago, and if I keep finding reasons to delay, won’t it just mean that I’ve never finished this game? A finished game is much better than a game no one ever sees, but if the finished game isn’t of high quality, what does that say about me as the developer?

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Games Marketing/Business

Why Would You Buy an XBox 360 Again?

One of the things we talked about on the Chicago Game Developer Gathering panel was underserved markets. I didn’t get an opportunity to mention it at the time, but even if you assume that the current generation of consoles is meeting the demand, which it generally isn’t, you wouldn’t be able to play their offerings anyway.

If you don’t already own a Wii, you won’t anytime soon. Somehow Nintendo has had a supply problem for over a year now, which makes it impossible to find in stores unless you want to be that creepy person who is ALWAYS at Game Stop.
The PS3 is a great BluRay player that also happens to play a few games.
The XBox 360 and Live Arcade would be great…if the hardware wasn’t so flaky.

Seriously, 1 out of 3 XBox 360s have a hardware problem, and it sounds like someone needs to introduce Microsoft to Six Sigma. There have been reports that people have sent Microsoft their busted 360s only to get a new one back, which also ends up malfunctioning one-third of the time. Sometimes it isn’t a new one that gets sent back but a refurbished one…you know, one of the malfunctioning ones that people have sent in the first place.

And then there is Kevin, who has to deal not only with Microsoft’s support for the hardware but also has to deal with it’s so-called DRM.

The Consumerist’s Microsoft Has No Answer For Their Broken XBOX Live DRM summarizedthe story so far and allowed Kevin to gripe about his experience. See, Kevin also suffered the Red Ring of Death, and he sent the machine in and received a new one. A new machine, with a new serial number.

So what’s the problem? Well, Kevin had purchased a lot of content from XBox Live, which is tied to his ORIGINAL XBox 360 and won’t run on his new one, even though he owns it. Microsoft has done a horrible job of providing support for Kevin, too.

This new replacement console has a different serial number and as a result all of my downloaded content only works now when the purchasing profile is signed into Xbox live. Additional profiles on the system can no longer access the content. I can no longer access the content when I’m not signed into Xbox Live. So any internet issues with my system or Xbox Live (which experienced serious problems for most of last month) means I can no longer use the items I have purchased. As far as I’m concerned since the functionality I had before is now crippled my console has not been repaired.

My Atari 2600 still works. I have an original GameBoy that still runs. Is there a reason why consoles of this last generation are such a risk for the customer to purchase? You’re being asked to pay hundreds of dollars just for the system, and you have no realistic expectation that it will JUST WORK?

I was looking forward to getting a Wii, but I wanted to wait because the last time I purchased a console, I bought it one month before a price drop. I figured I would be able to purchase another game with the savings if I waited it out this time. Well, the Wii is in such high demand and has such a hard time fulfilling it that the price drop isn’t going to come anytime soon. I know some people have had hardware failures with the Wii as well, but I believe Nintendo has been better about making sure such problems don’t continue years into the Wii’s life. I have heard that there has been a lack of games for the system, but as I don’t own one yet, I haven’t done much research.

The PS3…well, I can’t recall getting excited about anything regarding this machine. I was in a Game Stop recently and was watching some kid play Super Smash Bros Brawl. I kept hearing a loud whirring noise, and when I turned to look, I realized I was hearing the PS3 on display. That thing is loud! If anything was ever a candidate for liquid cooling, this was it. Frankly, even if I was interested in any of the handful of games available for it, my wallet is protected by the Geneva Conventions for the kind of torture I would need to put it through to afford it.

So that leaves the XBox 360, which I think would make for a great system to own. XBLA alone would be worth it. Unfortunately, I can’t trust that the system I buy will actually work, especially not for the price. I only have a 66% chance that I will be able to play games on it, and that’s assuming that it doesn’t fail a few months down the road. If it does fail, I have no guarantee that Microsoft will stand behind it. I know one person who has had to return his machine 4 different times. He purchased a second machine because he didn’t want to wait for his first one to get fixed, and that machine also failed eventually. And if Kevin’s story is any indication, Microsoft’s DRM does more to lock you out of your purchases than anything else. What kind of value add is that?

With all of the problems with the console industry, why is anyone ringing the death knell for the PC as a gaming platform? A desktop computer seems the be the most stable “next-gen” platform out there, and there aren’t any supply problems preventing me from owning one. There isn’t a shortage of games, either.

[tags] xbox, xbox 360, ps3, wii, games, video games, market [/tags]

Categories
Game Development Games Geek / Technical Linux Game Development Marketing/Business

Why I Can’t Use Flash for Game Development

People everywhere love Flash. It has become the Web’s de facto standard for all manner of interfaces. From simple menus to full-blown games, you can bet that Flash is there. It has been called one of the best prototyping tools available, and game designers love it because they don’t need to be computer science graduates to use it. Most people browsing the web today have a Flash plugin installed, making it a fairly ubiquitous platform.

With all of these things going for it, why won’t I use it?

Because if I can’t even watch YouTube videos without it crashing Firefox on my Ubuntu system, then it can’t be that ubiquitous.

I thought the problem was that I was using an older version of Flash. I checked, and sure enough, there was a newer version available. I downloaded it, installed it, and put it through its paces. That is, went to YouTube and watched a few videos. Sometimes all I do is click a link to load a new page while a video is playing on the old page, and the next thing I know, I need to manually kill Firefox because it stops responding.

It doesn’t happen each time I watch a video, but it does happen often enough to be a source of frustration. Everything else on my system seems to be pretty stable. It’s just Flash support that isn’t.

It isn’t a consistent problem for everyone. It seems that when someone else updated to the latest version, it worked fine, although it did have the side-effect of hogging a lot of system resources. I’d argue that this is a problem, too, but at least it isn’t freezing Firefox for this person anymore.

Recently, Adobe announced it had joined the Linux Foundation “to collaborate on the advancement of Linux as a leading platform for rich Internet applications (RIA) and Web 2.0 technologies.” With people complaining that 64-bit Flash isn’t available and with the existing 32-bit version being too buggy for doing things as simple and as common as watching videos on YouTube, I’m curious how much progress will get made. It seems that almost everything available for Linux on Adobe’s site is “alpha-quality”, with a link to get the already-stable Windows or Mac version.

In any case, until Flash becomes more stable for Linux users, I have to look to other technologies to provide a more consistent experience across platforms. Java applets should be a better proposition, and languages such as Processing make it friendlier for prototyping. And since OpenJDK is Sun-supported, I can’t see it crashing as randomly as Flash does. Unfortunately, it seems that Java isn’t on as many systems as Flash is, and asking someone to download a plugin if it isn’t already installed is just asking too much if you are trying to attract the casual player.

I’d love to use Flash. It’s not a bad technology. It’s just disappointing that Linux support is so inconsistent. If I am going to make web games, I am definitely not going to use something that results in games that I can’t even play.

[tags] video games, game development, linux, flash, java, business [/tags]

Categories
Game Design Game Development Games Marketing/Business

Griefers and Online Games

Thanks to David Edery, I learned about an article on Gamasutra about fixing online gaming idiocy.

Bill Fulton wrote about the problems with griefers as well as people who are just plain rude.

Why do I care? Some gamers might be thinking “If he’s so thin-skinned that he can’t take the online banter, maybe he shouldn’t play online.” Unfortunately, many people do just that — they stop playing online.

Because the online behavior of our customers is dramatically reducing our sales, and continues to stunt the growth of our industry. Non-gamers simply don’t love games enough to put up with the crap they get online. The reason they would consider playing online is to have fun with other people — and right now, playing games online with strangers rarely delivers that for anyone outside the hardcore demographic.

If you’re not familiar with griefers, read Wired’s Mutilated Furries, Flying Phalluses: Put the Blame on Griefers, the Sociopaths of the Virtual World, as well as The Escapist’s 19th issue, Griefer Nation.

If you are familiar with griefers or at least the problems they can cause your online game, you might wonder what can be done about it. You don’t even need to have an MMO to deal with such issues. If your game includes a high score list that automatically gets published to a website, you may find your list the victim of griefers. A recent posting on PuppyGames.net puts future troublemakers on notice:

Now hear this: the online hiscores table is viewed by children and we’re really not going to accept any more of this stuff any longer. You will find yourself banned permanently (and all of your hiscores deleted permanently too) if you abuse the facility.

Fulton argued that yes, it is possible to solve this problem by designing the social environment and culture. He talked about changes that were made to Shadowrun to discourage griefing, and I think it is an encouraging article.

[tags] video games, business, griefing, game development, game design [/tags]

Categories
Game Design Game Development Games Linux Game Development Marketing/Business

CGDG Video Recap is Up

Thanks to the Game Development Society of DeVry DuPage, the video recap of the Chicago Game Developer Gathering is up, so if you missed the event, you can now un-miss it.

It is split into 10 separate videos, and you can see the first one below. I hope a single video can be released as well.

Wow, I sound weird. Maybe I should join Toastmasters.

Categories
Game Development Personal Development

Thousander Club Update: April 7th

For this week’s Thousander Club update:

Game Hours: 409.25(previous two years) + 40.25 (current year) = 449.5 / 1000
Game Ideas: 710 (previous two years) + 35 (current year) = 745 / 1000

A project at the day job has been taking up a lot of my time, so I hadn’t been able to dedicate much of it to my own projects. So far, I have found that trying to get Killer Kittens to build with AutoPackage‘s apgcc/apg++ is not going to work, and once again, it is due to a problem with the Kyra Sprite Engine. For some reason, when I compile with gcc/g++, it builds just fine, but when I use apgcc/apg++, it somehow loses everything in its util directory so that I get undefined references when trying to build anything based on libengine.

Every other library builds just fine. Why doesn’t Kyra just work correctly? I don’t know. I’ve spent a few hours trying to find out, and this is maybe the fifth time I’ve found a reason to stop using Kyra.

I was hoping to have released my game by now, so I didn’t think that my time would be well-spent trying to get rid of Kyra. Now I think it just might be. Let this be a lesson: use mature tools unless you want to spend a lot of time maintaining them yourself.

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Game Design Game Development Games Linux Game Development Marketing/Business

Chicago Game Developer Gathering Pictures and Recap Are Up

The Chicago Game Developer Gathering has posted pictures and a recap of the event. There is also a new web forum.

UPDATE 4/1/2008
The forum, pictures and recap are live! We are wrapping up some editing of the video footage and will be posting that soon as well.

The forums already have a few threads in them, including links to games people want feedback on, info on how to start your own business, and a notice about a LAN party coming up.

Check all of it out at Chicago Game Developer Gathering website.

[tags] video games, game development, indie, business [/tags]

Categories
General

Illinois Taxpayers, Government Programs Pay for Unconstitutional Video Game Law

Last week I learned from GamePolitics.com that the Illinois Governor has raided welfare funds to help pay for the ESA’s legal fees after his video game legislation was ruled unconstitutional. I’ve written previously about this law, and I was unsurprised to find that this law was merely pandering to fear.

I was also unsurprised, as Blagojevich should have been, that the law was deemed unconstitutional. I mean, every other state that passed similar laws saw them meet the same fate.

According to Ars Technica’s take on this situation:

It would be easier to defend the state’s efforts at fighting for the law if there weren’t so many strong precedents: by the time Illinois got around to writing its gaming law, Missouri, Indiana, and Washington had already tried to pass similar laws, only to fail on constitutional grounds. There was very little evidence that the law had any chance of succeeding in Illinois, but Gov. Blagojevich saw the law as a politically safe move.

Illinois owed about $1 million in legal fees. At the time, we already knew Illinois taxpayers would be the ones to take the punishment, but now we find that multiple departments had their budgets pillaged.

Let’s see if we can put these facts together:

  • Illinois has been having budget problems in general.
  • Blago went ahead with a bill that was just like unconstitutional laws from other states.
  • Now the legal fees need to be paid by grabbing money from departments that are already cash-strapped.

A different Ars Technica article has more details about the budget moves:

Some of the areas money was taken from included the public health department, the state’s welfare agency and even the economic development department.

A state representative who attended recent hearings on the issue said that Gov. Blagojevich’s staff simply spread the legal bills around by sticking them to agencies which had funds left in their budgets—even if the agencies had nothing to do with the issue or the litigation.

Is there a reason why this bit of news ends up in the Quad Cities Online but not in the Chicago Sun-Times or the Chicago Tribune? $1,000,000 is a lot of money for Illinois taxpayers to lose, especially when it didn’t have to.

[tags] illinois, government, taxes, video games, constitutionality [/tags]