Compiling NetRadiant in openSuse 11.4

VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

I had to do some digging to find something that'd fulfill the libgtkglext1-dev requirement, but I eventually did and I got it to compile....almost completely.

The compile errors out when it tries to put the Warsow game pack where it's supposed to go..

Code: Select all

+ pack=games/Quake2WorldPack
+ dest=install
+ '[' -d games/Quake2WorldPack/tools ']'
+ for GAMEFILE in '"$pack/games"/*.game'
+ cp games/Quake2WorldPack/games/q2w.game install/games/
+ for GAMEDIR in '"$pack"/*.game'
+ cp -r games/Quake2WorldPack/q2w.game install/
+ : cp
+ : cp -r
+ pack=games/WarsowPack
+ dest=install
+ '[' -d games/WarsowPack/tools ']'
+ for GAMEFILE in '"$pack/games"/*.game'
+ cp 'games/WarsowPack/games/*.game' install/games/
cp: cannot stat `games/WarsowPack/games/*.game': No such file or directory
make: *** [install-data] Error 1
When I go to run ./install/radiant.x86 I get an error that forces the application to quit

Code: Select all

This editor binary (1.5.0n-git-806e3fe) doesn't match what the latest setup has configured in this directory Make sure you run the right/latest editor binary you installed /home/volumetricsteve/netradiant/install/ 
is there a way to force it to not care about this problem? I can put the game-packs in myself by hand, too.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by ^misantropia^ »

It's a bug in the install script. I've fixed it here: https://github.com/bnoordhuis/netradiant

Just built it and it starts up without a hitch.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

How......You........cool!

I owe you a bugatti veyron

It works...ish, I get a whole mess of errors about the locations of the gamepacks, but netradiant does, infact, open now....the only game pack I care about is quake 3 so I'm just gounna try to inject that by hand.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Compiling NetRadiant in openSuse 11.4

Post by obsidian »

Just download and extract:
http://zerowing.idsoftware.com/files/ra ... -06.tar.gz
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

ok I've made some pretty solid progress, I've got Netradiant loading with all of the gamepacks I could find, and I've successfully compiled one of my smaller maps (minirazz) got it running in ioQuake3, and that's working fine as well.

However, some of my larger, less reasonable maps produce a general protection fault when it comes around to the light-compile. It looks like it hits a certain number of warnings (surfaces that need to have the number of samples scaled down to fit on my huge surfaces) and then I see "Connection closed" and eventually linux produces the general protection fault dump.

The windows and os x Q3map2 handle my maps...well enough...and only crash like that if I do something profoundly retarded. I recently crow-barred NetRadiant into Snow Leopard 10.6.7 which...produced weird results, but it works. It managed to run the light compile, but for some reason the same version numbered Linux Q3map2 can't process it. I'm new to compiling maps in linux so, is this a common issue or is the linux version of q3map2 just not as robust as the windows/osx versions? (i'd think the osx and linux versions would be similarly robust)
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by ^misantropia^ »

It could be the other way around: glibc on linux has a number of protection mechanisms built in that guard against (some types of) buffer overruns, use-after-free, etc.

Can you run q3map2 through gdb (`gdb --args /path/to/q3map2 [args]`) and type `bt` when it crashes? The stack trace might give a clue.

EDIT: an example of one such guard I ran into this week: https://savannah.gnu.org/bugs/?32969
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

I'll take a stab at it tomorrow, I'm hoping I can trick netradiant into invoking gdb with q3map2 the same way it invokes q3map2 already so I can just make debug runs of the same compiles I'm doing now.

Also, this might tell you something upfront, I've been using my 6-core workstation (which q3map2 starts in linux, it seems to want to run in 4 threads) and I'm running 64-bit openSuse 11.4 on the 2.6.37 kernel.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

Code: Select all

volumetricsteve@linux-z41f:/> gdb --args home/volumetricsteve/NetRadiant/q3map2.x86 -v -game quake3 -fs_basepath "/home/volumetricsteve/quake3/" -fs_game baseq3 -light -fast -filter "/home/volumetricsteve/quake3/baseq3/maps/corefault.map"                                                                                                                                                                                   
GNU gdb (GDB) SUSE (7.2-3.3)                                                                                                                                                                                       
Copyright (C) 2010 Free Software Foundation, Inc.                                                                                                                                                                  
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>                                                                                                                                      
This is free software: you are free to change and redistribute it.                                                                                                                                                 
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"                                                                                                                                         
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/volumetricsteve/NetRadiant/q3map2.x86...done.
(gdb) bt
No stack.
(gdb) 
I sense I didn't invoke q3map2 correctly, because it's not even trying to run, I've been combing over this and I'm not seeing what I'm doing wrong, I'm gounna keep trying different things though.


*Update

since I couldn't kick off q3map2 from gdb, I wondered if I was kicking off q3map2 the wrong way (I was), so I gave the command line:

Code: Select all

./home/volumetricsteve/NetRadiant/q3map2.x86 -v -game quake3 -fs_basepath /home/volumetricsteve/quake3/ -fs_game baseq3 -light -fast -filter /home/volumetricsteve/quake3/baseq3/maps/corefault.map 
just to see if it'd at least get q3map2 rolling..and it did, it rolled all the way through the light compile with no errors, and faster than I've seen it go in ages.

This leads me to wonder, since I can invoke q3map2 just fine (it seems) from the terminal, perhaps the logging function...constantly sending data back to netradiant during the compile is causing the general protection fault?

I'm gounna try throwing a much more complicated order to q3map2 to see if I can make it freak out, but it looks like it'll be ok.....The issue that remains is kicking q3map2 off correctly from within NetRadiant I guess.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by ^misantropia^ »

Sorry, I forgot an essential step: after starting up `gdb`, type `run` to actually run the program. =)
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

d'oh! I was actually about to try that but I thought I should investigate my q3map2.x86 commands first to make sure I wasn't herping and derping (and I totally was) but I'm running...let's see...

-light -bounce 8 -bouncegrid -fastbounce -filter

the absence of the -fast argument hardly seems to matter.....it's not even using 6 threads and it's beating my windows compile times hands down.

also, if the issue causing the general protection fault exists between netradiant and the console logging, how would I go about getting gdb to open netradiant, compile my map the same way it does internally, and then produce the same error all from the command line?

once I have this "pretty" compile done, I'm gounna see if netradiant can kick off q3map2 correctly if I turn console logging off to confirm my theory....but if that's the issue, I don't know thing #1 about how to go about fixing it :/
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Compiling NetRadiant in openSuse 11.4

Post by obsidian »

-threads 6
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by ^misantropia^ »

also, if the issue causing the general protection fault exists between netradiant and the console logging, how would I go about getting gdb to open netradiant, compile my map the same way it does internally, and then produce the same error all from the command line?
Same as with q3map2: `gdb --args path/to/netradiant`, then type `run`.
once I have this "pretty" compile done, I'm gounna see if netradiant can kick off q3map2 correctly if I turn console logging off to confirm my theory....but if that's the issue, I don't know thing #1 about how to go about fixing it :/
The top of the stack trace is often a good indication of where the crash is happening. With `f` and `p` (short for `frame` and `print`) you select the stack frame and peek at the values of arguments and locals to find out why it's happening.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

obsidian wrote:-threads 6
I know, I just meant I wasn't sure why it was defaulting to 4 threads, I'd expect it to either default to 1 or 6 through auto-detection. What's REALLY weird is that I get the fastest compile times by running it with 12 threads.

^misantropia^ wrote: Same as with q3map2: `gdb --args path/to/netradiant`, then type `run`.
so gdb will catch anything that spawns from the main program? I'll give it a shot.

*update

I ran NetRadiant with build monitoring turned off and successfully built a map from bsp to light - it worked perfectly.

I need to re-do my gdb netradiant test though, I goofed and got the syntax messed up.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

ok....this is weird.....I got netradiant running from gdb...and the radiant GUI internal console stops working in the light-phase, as it did before...but it seems like gdb just picks up all of the other q3map2 console output, and netradiant doesn't crash...I just achieved a successful 'final build' from within gdb/netradiant. I don't know how I feel about that.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by ^misantropia^ »

Hah, a debugger heisenbug. I run into these from time to time, they're usually caused by the debugger laying out memory slightly different or zeroing unused memory so the bug doesn't get triggered.

Try running netradiant through valgrind. Post the output here if you can't make heads or tails of it.

EDIT: you can also attach gdb to an already running netradiant process: `gdb path/to/radiant.x86 $(pidof radiant.x86)`, then type `c` (for continue).
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

^misantropia^ wrote: EDIT: you can also attach gdb to an already running netradiant process: `gdb path/to/radiant.x86 $(pidof radiant.x86)`, then type `c` (for continue).
That's freakin' cool; I'll give valgrind a try when I get home. (idea: does the fact that gdb acts like this in reaction to netradiant tell you anything from a debugging perspective or is it still a situation where there's a mystery, we just have a program telling us it's a mystery too?)

Random thought : does running a program from gdb (say...q3map2 given a huge task) hinder performance noticeably? I was running a big compile last night, and I was expecting it to take a long time, but when I started it I forgot it was running through gdb. Just curious for future reference.

Another, albeit unrelated issue I'm having is with power-handling, even though it appears I've turned off all of the power-saving features via YaST, it still puts the display to sleep after 5 minutes or so, and if I leave it long enough it seems to slip into a deeper sleep which it can't recover from. So, things go great for as long as I want so long as someone's there nudging the mouse every so often :/
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by ^misantropia^ »

That's freakin' cool; I'll give valgrind a try when I get home. (idea: does the fact that gdb acts like this in reaction to netradiant tell you anything from a debugging perspective or is it still a situation where there's a mystery, we just have a program telling us it's a mystery too?)
It usually means a program is doing something undefined (reading uninitialized memory, for example) but as to where: no clue.
Random thought : does running a program from gdb (say...q3map2 given a huge task) hinder performance noticeably? I was running a big compile last night, and I was expecting it to take a long time, but when I started it I forgot it was running through gdb. Just curious for future reference.
Not really, unless you start tracing the program. That is, you can tell gdb 'run this program until variable x becomes 42' but even then it might still be fast, simple watches can be traced in hardware.

valgrind on the other hand is dog slow, it runs your program in a virtual machine and checks nearly every instruction. But it's the best thing for detecting memory corruption and a range of other bugs.
Another, albeit unrelated issue I'm having is with power-handling, even though it appears I've turned off all of the power-saving features via YaST, it still puts the display to sleep after 5 minutes or so, and if I leave it long enough it seems to slip into a deeper sleep which it can't recover from. So, things go great for as long as I want so long as someone's there nudging the mouse every so often :/
Can't help you there, I don't use SUSE.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

What distro do you prefer? I'm really just starting out in linux, I dabbled in it years ago(slackware, centOS, suse 6) but had too much going on to really dig in. Now I'm using it daily and picking up a lot, but I still don't have a sense of "oh, distro X would be AWESOME for task Y" because where I'm eventually heading is...I would like to have my 6-core machine be a dedicated q3map2 machine, and I'd just need it to have samba support and...boot into a command line, and I could just run q3map2 that way. (samba support so it could compile maps being built on a low-power laptop or something elsewhere on the network)
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by ^misantropia^ »

I'm probably a bit biased because I've been a Debian user since 1997 or thereabouts, but I wouldn't have used it for so long if I didn't think it was solid.

Nowadays I use Ubuntu, a Debian derivative. It aims to be feature complete and friendly to newbies. When I convinced my girlfriend to switch to Linux, I reckoned it'd be a good idea to have the same baseline system (for the inevitable support questions).

It all worked out. I haven't had to fix her computer ever since.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

Huh, I half expected to hear Gentoo - Ubuntu would have been my last guess; that's the first time I've heard a long-time developer paint Ubuntu in a good light. I used to use LinuxMint(worked like a dream on my pentium 3), which is based on Ubuntu but the hardware I'm using now nixed it as an option; it'd act funny or different programs would seem to work on a very random basis - window manager issues I think. I don't really get the extreme of the Ubuntu hate that's strewn about the internet...it's just another distro choice unless I'm missing something - perhaps my roommate is just overly passionate about his distaste for debian-based OSes(which constitutes most of what I hear about linux) I'd still be using mint if it worked reliably on my 6-core machine. *shrug* if it works, it works. By the way, how's your daughter doing? I caught a post elsewhere in the forum where you mentioned she was 4 months old already - I feel like it was only a week ago we were putting together BSPC for linux/mac. :dork:
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by ^misantropia^ »

She's doing great! Chubby, noisy, completely self-absorbed - a perfectly healthy baby.
Silicone_Milk
Posts: 2237
Joined: Sat Mar 12, 2005 10:49 pm

Re: Compiling NetRadiant in openSuse 11.4

Post by Silicone_Milk »

I've been using Debian for a while now also. Not nearly as long as misantropia here.

I first started with Red Hat 6. That was a nightmare trying to get cisco aironet adapters working on my laptop with RH.

I use Ubuntu on my laptop now and Debian on my PC.

I haven't heard hate towards Debian/Debian-derivatives before so that's news to me. I can't imagine why; they've all been a joy to work with for me.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Compiling NetRadiant in openSuse 11.4

Post by obsidian »

I've been running Ubuntu since 5.10, I used to have to fiddle with drivers and config files. It gets better with every release with all my hardware working right after a 10-min install.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Compiling NetRadiant in openSuse 11.4

Post by VolumetricSteve »

O_o

Well....alright then. That's a solid consensus if I ever heard one...I may take another stab at Debian sooner or later just to give it a whirl.

The 'power issue' I was having was actually a weird screensaver issue. There was no screensaver configured, but the 'screensaver' was still set to go after after 4 inactive minutes, and it was supposed to re-authenticate when activity was detected. Something about that process messed it up. Not sure what, but disabling the non-existant screen saver seems to have fixed it.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Compiling NetRadiant in openSuse 11.4

Post by obsidian »

BTW, Ubuntu 11.04 "Natty Narwhal" (currently beta) is scheduled for release on the 28th.

[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Locked