Re: [Plib-devel] Patches for FreeBSD
Brought to you by:
sjbaker
From: Bert D. <dri...@pl...> - 2004-12-30 17:14:15
|
Hi Martin, >> One change should not be committed, which is the change that takes out >> the call to glIsValidContext(). Not all patches in the ports tree are >> desirable or even well thought out. > > I must admit that I can't tell if these patches conform with the PLIB > developers' sense of doing "the right thing". Actually, it sometimes happens that ugly hacks sneak into the ports collection that "make it work" without fixing the underlying cause. This is one such case. > I simply realized that > applying all of these patches to the current CVS source tree make > things work on FreeBSD and appear not to break anything on other Unix > platforms I have access to (well, PLIB doesn't build at all on certain > platforms ....). So I assume they're not a bad choice. And here too, each change has to be evaluated individually. You cannot make an omelet without breaking eggs, but even simple changes like the "#include <netinet/in.h>" one will have to be announced on the list so that people can be prepared for potential breakage, or have the chance to recommend against the change. Of course, if no-one in the Plib team uses FreeBSD themselves, such changes tend to fall by the wayside, which is why I volunteered. I have lots of experience in being conservative in applying patches. It's a skill I acquired when working for chemical plants :-) > I'll investigate on the glIsValidContext call next year (what a funny > phrase :-) > 'My' FreeBSD box is currently turned off and out of reach. I can tell you off the top off my head (and hopefully correctly :-) glIsValidContext() fails when there is a mismatch in the pthread implementation between different libraries used by Plib. By commenting out this call, the application will start up even if conflicting pthread libraries are being used. Needless to say, the conflicting libraries can still blow up in your face, only you won't know what caused it. My memory may be off so please research it anyway. I'd really have to do a fresh FlightGear build to verify the above assertion. In the case of FlightGear on FreeBSD, all of plib, simgear and flightgear _must_ be built with the -pthread flag. I've not come round to building the whole thing recently so I don't know how things are currently (last time I tried, I gave up after some code in Flightgear wouldn't build on FreeBSD 5.3, but I will try again soon). Cheers, -- Bert -- Bert Driehuis -- dri...@pl... -- +31-20-3116119 If the only tool you've got is an axe, every problem looks like fun! |