[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Filed under: General — Thomas @ 13:04

2003-12-31
13:04

chakie

Show us your Makefile.am file. The compile line looks ok, since setup.cpp probably is only one of the many files in your project, and it's compiling the one file into an executable.

Basically, your Makefile.am should look roughly like this

 bin_PROGRAMS = myapp

myapp_SOURCES = setup.cpp (other cpp files)

Replace "myapp" with whatever the name of your app is and add other cpp files.

You should use automake over standard Makefile. The syntax for Makefile.am is a lot easier than syntax for Makefile. automake has a better manual than make (see autobook on Red Hat's site). It generates more portable Makefiles than you could do by hand. And it adds in a lot of nifty stuff (everyone should run make distcheck before a release) that you will never do by hand.

Feel free to ask more questions if it doesn't work right away.

Dave/Dina

Made some good progress through the last week. Fixed up cd playback through a different application, hcd. There's nothing special about it except that it works. Really, I found more than ten console cd players, and most of them had "issues".

The default one, with Red Hat, is nice to look at, but unable to tell you if the disc in the drive is not a CD. When you try it on a DVD, for example, it just hangs. That's pretty unacceptable for our user interface.

I also found libcdaudio, but that had flaws too. I liked the way the reference application worked, but strangely enough it showed some obvious flaws in the program. For one thing, a part of the app (probably an externally spawned process) segfaults when you ask for CDDB information. I traced it down to

 fprintf(stdout, "%*s
", index, index, inbuffer);

That was something new to me - I had never seen the %*s before. In any case I browsed around, and noticed that there was one "index" too many. I can't really imagine how the author let that slip during testing.

In any case, it taught me that knowledge can come from fixing bugs. It's a heartening thing to know that sometimes finding and solving bugs brings you more than just another bug solved ;)

After this bug however, I found that gathering CDDB information was flakey at best - each time I asked for info, I either got the right information, or partially right information preceded by a random number of white lines. So something was not working very well. I decided to leave it at that and just not bother. Pity, I would have rather liked a simple library to code something on top of.

But I have to learn how to stabilize before adding features.

I also repackaged xawtv to work with lirc. For some reason totally lost on me, Gerd Knorr added another mechanism to handle lirc support. I think he wanted to channel all incoming "events" (key presses, mouse presses, midi events, lirc events) and act on them, but it doesn't look like it gains anything for the user.

I tried to figure out the most annoying thing in xawtv: when you switch channels the audio pops every time. Incredibly irritating, and what one would call a showstopper bug to actually use xawtv over a regular tv. I started jumping around the code. Man, xawtv is complicated - besides reinventing the wheel a few times too many. The mechanism to mute audio jumps through a few hoops, managing to actually be implemented in plug-ins (or maybe not, I couldn't figure out where the accessors were set in the code), and eventually totally obfuscating what mechanism it actually uses to mute audio.

A dead simple and dead ugly hack with system("aumix -l0"); before switching channels, and waiting a bit longer after switching, removed the annoying pop. But that's a very ugly hack, so I hope to replace that soon.

Someone stated an obvious fact about xawtv to me : it is a badly written program that everyone uses regardless anyway. There are more like these. The reasons seem simple : it is badly written because it tries to avoid using any other library as much as possible and thus ends up reimplementing lots of things that are already done better in other libraries. And the reason everyone uses it regardless anyway is precisely the same reason - because it's so easy to get running, since it doesn't depend on a bunch of other libraries.

Personally, I have been totally won over for the argument of having libraries do as much as possible.

Kristof fixed some more bugs in DAD related to Internet Explorer. Good stuff, time for another release.

Also finding out some issues with the SBLive card, not sure if it's my failure to understand how it works or other things. But currently I can't figure out how to record from the line in without having it actually *play* the line-in channel (so that I don't get live tv audio when recording in the background at the same time music is playing). And for some reason, the overall volume setting doesn't have any effect.

GStreamer

Figuring out some complex threading issues. Well, mostly providing debug info and trying to get GThreads to work in GTK when they use GStreamer. dschleef does most of the fixing work, bless him. He even went as far as install Red Hat 8.0 inside a chroot on his debian machine to test the bugs that seem to only come up with RH's glibc i686 optimizations.

bitches

Decided on a new name that hopefully is less offensive - mach, for Make A CHroot. I know there is a kernel with that name, but I don't care. I checked on SF, and there is already a project there with that name. Luckily, the project seems abandoned, it has been registered two years ago and it hasn't had a single CVS commit to it's name. Just like the three other projects registered by that developer. So I asked for a tekeover, hopefully that'll go through.

I also realized that it's trivial to use this for more than just package building. For example, you can build an image file for use with User-mode Linux, set up a chroot on a server to work in, and so on.

Movies

Went to see Insomnia last week. Pretty damn good. By the book, totally different from Memento, but still good. I'd like to see the original movie though to see how it's changed and how much of the goodness is due to the director or the script/story.

GTA: Vice City

I saw it at the store and couldn't resist buying it. It is amazing. I'm not really the 3D visceral type of person when playing games, and before getting a PS/2 I hadn't played any computer game in about a year or two, but GTA is absolutely wonderful.

It is 100% immoral, vicious, and incredible fun. When you're bored or stuck on missions, you can do silly stuff, like pester police officers, try to get six stars worth of police attention, go to the mall and shoot people, steal motorbikes and practice jumps, go fire truck/vigilante/taxi/paramedic driving, and so on. I still find silly stuff inside the game every few hours.

The music is just incredibly good. The game has about eight in-game radio stations, and they all contain really good music, with tongue-in-cheek presenters and commercials. I could go on for hours about what I like in this game.

It just throws out political correctness out of the window and I love it.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

picture