Joachim Durchholz
2008-Mar-19 15:59 UTC
[LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
Am Mittwoch, den 19.03.2008, 14:49 +0100 schrieb Holger Schurig:> > Just my two cents. From time to time I'm testing LLVM via > > compiling & running such big beasts as Qt and Mozilla. Also, > > at 2.0 time I tried to compile & test bunch of software from > > KDE and many others. > > I tried to compile the 3D game engine "darkplaces" with llvm-gcc > 4.2, but the produced binary didn't work."Didn't work" means... what? Compilation failed? Program doesn't work? Either way: what mesages do you get? Are there any differences when compiling with the standard 4.2 gcc? (Some distributions install gcc 4.0, you have to explicitly install gcc-4.2 to get the equivalent GNU compiler.)> However, I didn't find out how debug this further :-/No problem, just run a few preliminary tests. This will allow people to determine what component the problem is in: code generator (if gcc works but gcc-llvm doesn't), language semantics (if neither gcc nor llvm-gcc work - probably a gcc problem then, playing around with -O2 or -O0 might make the problem go away; if that still doesn't help, there's a real possibility that the 3D driver or hardware is broken). Darkplaces is probably not a good test for the LLVM test suite. Any failure may be due to problems with the 3D hardware or the drivers, Regards, Jo
Holger Schurig
2008-Mar-19 16:51 UTC
[LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
> "Didn't work" means... what? Compilation failed? Program > doesn't work? Either way: what mesages do you get?Hey, this was two weeks ago. Compilation was fine, I get a binary. The game engine also emits various log statemtens when it starts, but then stopped somehow. Sorry for being so scarce on details, but I did this at home and am now at work. At about 20:30 hours german time my kids are in bed and I can give more details, even the exact llvm svn revision that I used for my test.> Are there any differences when compiling with the standard 4.2 > gcc? (Some distributions install gcc 4.0, you have to > explicitly install gcc-4.2 to get the equivalent GNU > compiler.)I'm on debian unstable, so I have lot's of different GCCs to try against. Normally I compile with the debian brand of gcc-4.2 and there it works. It's an actively maintained project, it works even with gcc-4.3 (this is from hearsay, not my own experiments).> Darkplaces is probably not a good test for the LLVM test > suite.I tried darkplaces because a) it's a complicated program, b) I play it once in a while with the nexuiz data and c) it has a benchmark mode, called "time demo". However, I too think that darkplaces in it's current for isn't for the automatic test suite because of the 3D hardware requirements.> Any failure may be due to problems with the 3D hardware > or the drivers,Maybe, but the game works correctly with several gcc compilers.
Holger Schurig
2008-Mar-19 20:09 UTC
[LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
> "Didn't work" means... what? Compilation failed? Program doesn't work? > Either way: what mesages do you get?The graphical screen was just blank. darkplaces emits some log messages as usual. But step by step... Used LLVM-GCC ------------- The used llvm-gcc, when run with "llmv-gcc --version" shows "llvm-gcc (GCC) 4.2.1 (Based on Apple Inc. build 5546) (LLVM build 47212)". So it has been a month ago when I did this test. I'm building llvm and llvm-gcc with the attached Makefile. There you can see what I'm using for configure, but I guess that's nothing too fancy. Used Darkplaces --------------- I'm used darkplaces from SVN. Not sure what SVN revision it was a month ago, but the same problem happens with the current one. To get exactly the same engine source code that I currently have, do $ svn co -r8212 svn://svn.icculus.org/twilight/trunk/darkplaces Now apply the following attached "llvm.patch" to it. The patch changes: * DO_CC to be "llvm-gcc --emit-llvm" * DO_LD to be "llvm-ld -O2 -native -time-passes" * CPUOPTIMIZATIONS=-march=athlon * don't compile builddate.c on-the-fly at link time, because llvm-ld can't do that * don't set LDFLAGS_RELEASE to be the same as the compiler optimization flags Now do "make cl-release" and you should get an executable named "darkplaces-glx". Used Nexuiz data files ---------------------- Finally you need the nexuiz data files. They are rather huge, a whopping 363 MB. Get them like this from http://mesh.dl.sourceforge.net/sourceforge/nexuiz/nexuiz-24.zip. Extract it, e.g. with "unzip -x nexuiz-24.zip" Run the whole thing ------------------- I call the engine this way: $ ./darkplaces-glx \ -window -developer -nexuiz -basedir /usr/src/darkplaces/Nexuiz "-window" makes the program not use fullscreen, then you can still see the log output. "-developer" turns additional messages and warnings on. "-nexuiz" switches the engine into nexuiz mode, the mode must suit the data files. And for "-basedir" add the full path to the data files you downloaded and extract. Once started, the game will emit lot's of log output: Console initialized. Nexuiz Linux 20:12:44 Mar 19 2008 Trying to load library... "libz.so.1" - loaded. ... ========Initialized======== Client using an automatically assigned port Client opened a socket on address local:2 Client opened a socket on address 0.0.0.0:56687 Besides the log output to stdout, it also opens a graphical window. Then the engine should display a graphical, stylized "n" shortly before it emits the "Initialized" line. And this is the first difference between the llvm-gcc darkplaces-glx and the gcc-4.2 darkplaces. Later it should show another uglier "n", then three screens where you can use the mouse to select things. However, with the llvm-gcc version I just see a dark screen. And here it hangs and eat's CPU time. I must admit that I was too lazy to simply run the program under gdb's auspice and interrupt/backtrace it :-/ Used gcc-4.2 darkplace engine ----------------------------- To get a working engine from SVN, I keep the makefile/makefile.inc in it's (almost) original form and just make sure that CC=gcc-4.2 CPUOPTIMIZATIONS=-march=athlon Now I also compile with "make cl-release". The used compiler show fors "gcc-4.2 --version" the text "gcc-4.2 (GCC) 4.2.3 (Debian 4.2.3-2)". With this version, there is a graphical output, a stylized n, displayed even before the line "========Initialized=========" appears in the log. The gcc-compiled one emits some more messages to log: ========Initialized======== Client using an automatically assigned port Client opened a socket on address local:2 Client opened a socket on address 0.0.0.0:56687 Map farewell provides unknown info item author_email, ignored Map farewell provides unknown info item author_www, ignored Map warfare provides unknown info item author_email, ignored Map warfare provides unknown info item author_www, ignored Attempted division by zero in menu Attempted division by zero in menu Attempted division by zero in menu Attempted division by zero in menu ln: 5 iterations Sending extended response requests... Fake CD track 1 playing... At this time, I see the game menu and can select any options. -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile Type: text/x-makefile Size: 5945 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080319/f3bbb813/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch Type: text/x-diff Size: 3663 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080319/f3bbb813/attachment.patch>
Evan Cheng
2008-Mar-20 02:24 UTC
[LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
Let's use llvm to build more games! :-) How about Marathon? http://source.bungie.org/ Evan On Mar 19, 2008, at 1:09 PM, Holger Schurig wrote:>> "Didn't work" means... what? Compilation failed? Program doesn't >> work? >> Either way: what mesages do you get? > > The graphical screen was just blank. darkplaces emits some log > messages as usual. But step by step... > > > Used LLVM-GCC > ------------- > The used llvm-gcc, when run with "llmv-gcc --version" shows "llvm- > gcc (GCC) 4.2.1 (Based on Apple Inc. build 5546) (LLVM build 47212)". > > So it has been a month ago when I did this test. > > I'm building llvm and llvm-gcc with the attached Makefile. There you > can see what I'm using for configure, but I guess that's nothing too > fancy. > > > Used Darkplaces > --------------- > I'm used darkplaces from SVN. Not sure what SVN revision it was a > month ago, but the same problem happens with the current one. To get > exactly the same engine source code that I currently have, do > > $ svn co -r8212 svn://svn.icculus.org/twilight/trunk/darkplaces > > Now apply the following attached "llvm.patch" to it. The patch > changes: > > * DO_CC to be "llvm-gcc --emit-llvm" > * DO_LD to be "llvm-ld -O2 -native -time-passes" > * CPUOPTIMIZATIONS=-march=athlon > * don't compile builddate.c on-the-fly at link time, because > llvm-ld can't do that > * don't set LDFLAGS_RELEASE to be the same as the compiler > optimization flags > > Now do "make cl-release" and you should get an executable named > "darkplaces-glx". > > > Used Nexuiz data files > ---------------------- > Finally you need the nexuiz data files. They are rather huge, a > whopping 363 MB. Get them like this from http://mesh.dl.sourceforge.net/sourceforge/nexuiz/nexuiz-24.zip > . Extract it, e.g. with "unzip -x nexuiz-24.zip" > > > Run the whole thing > ------------------- > I call the engine this way: > > $ ./darkplaces-glx \ > -window > -developer > -nexuiz > -basedir /usr/src/darkplaces/Nexuiz > > "-window" makes the program not use fullscreen, then you can still > see the log output. "-developer" turns additional messages and > warnings on. "-nexuiz" switches the engine into nexuiz mode, the > mode must suit the data files. And for "-basedir" add the full path > to the data files you downloaded and extract. > > Once started, the game will emit lot's of log output: > > Console initialized. > Nexuiz Linux 20:12:44 Mar 19 2008 > Trying to load library... "libz.so.1" - loaded. > ... > ========Initialized========> Client using an automatically assigned port > Client opened a socket on address local:2 > Client opened a socket on address 0.0.0.0:56687 > > Besides the log output to stdout, it also opens a graphical window. > Then the engine should display a graphical, stylized "n" shortly > before it emits the "Initialized" line. And this is the first > difference between the llvm-gcc darkplaces-glx and the gcc-4.2 > darkplaces. Later it should show another uglier "n", then three > screens where you can use the mouse to select things. > > However, with the llvm-gcc version I just see a dark screen. And > here it hangs and eat's CPU time. I must admit that I was too lazy > to simply run the program under gdb's auspice and interrupt/ > backtrace it :-/ > > > > Used gcc-4.2 darkplace engine > ----------------------------- > To get a working engine from SVN, I keep the makefile/makefile.inc > in it's (almost) original form and just make sure that > > CC=gcc-4.2 > CPUOPTIMIZATIONS=-march=athlon > > Now I also compile with "make cl-release". The used compiler show > fors "gcc-4.2 --version" the text "gcc-4.2 (GCC) 4.2.3 (Debian > 4.2.3-2)". > > With this version, there is a graphical output, a stylized n, > displayed even before the line "========Initialized=========" > appears in the log. > > The gcc-compiled one emits some more messages to log: > > ========Initialized========> Client using an automatically assigned port > Client opened a socket on address local:2 > Client opened a socket on address 0.0.0.0:56687 > Map farewell provides unknown info item author_email, ignored > Map farewell provides unknown info item author_www, ignored > Map warfare provides unknown info item author_email, ignored > Map warfare provides unknown info item author_www, ignored > Attempted division by zero in menu > Attempted division by zero in menu > Attempted division by zero in menu > Attempted division by zero in menu > ln: 5 iterations > Sending extended response requests... > Fake CD track 1 playing... > > At this time, I see the game menu and can select any options. > <Makefile><llvm.patch>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- [LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
- [LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
- [LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
- [Bug 46956] New: Selecting 2xAntiAliasing causes Nexuiz to crash "X Error: BadMatch, failed request (X_CreateWindow)"
- Graphics Flickering Issue w/ Wine & ati Radeon HD 4870