[edit]
Graf Zahl wrote:It should have been '-DNO_ASM=1'.
Moderator: GZDoom Developers
Graf Zahl wrote:It should have been '-DNO_ASM=1'.
Code: Select all
nero@svart:~/trunk/release$ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo DNO_ASM=1 ..
Code: Select all
*** Fatal Error ***
Integer divide by zero (signal 8)
Address: 0x82354fd
System: Linux svart 2.6.38-9-generic #43-Ubuntu SMP Thu Apr 28 15:25:15 UTC 2011 i686 i686 i386 GNU/Linux
ZDoom version 2.5.0 (r3221) (Jun 9 2011)
Compiler version: 4.5.2
Command line: ./zdoom
Wad 0: zdoom.pk3
Wad 1: DOOM2.WAD
Current map: MAP01
viewx = 0
viewy = 0
viewz = 0
viewangle = 0
Executing: gdb --quiet --batch --command=gdb-respfile-u0oEDj
[Thread debugging using libthread_db enabled]
[New Thread 0x4c8db70 (LWP 22419)]
[New Thread 0x2158b70 (LWP 22418)]
[New Thread 0x429db70 (LWP 22417)]
[New Thread 0x1957b70 (LWP 22416)]
0x00f00416 in __kernel_vsyscall ()
* Loaded Libraries
From To Syms Read Shared Object Library
0x002e3ac0 0x00586418 Yes (*) /usr/lib/libgtk-x11-2.0.so.0
0x00b05c50 0x00b62b88 Yes (*) /usr/lib/libgdk-x11-2.0.so.0
0x00be1190 0x00bee7b8 Yes (*) /usr/lib/i386-linux-gnu/libatk-1.0.so.0
0x0093ad20 0x009f5878 Yes (*) /usr/lib/i386-linux-gnu/libgio-2.0.so.0
0x00114f90 0x00131e58 Yes (*) /usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0
0x00cc8650 0x00ccd9a8 Yes (*) /usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0
0x0013be30 0x0014f1d8 Yes (*) /usr/lib/libgdk_pixbuf-2.0.so.0
0x0015e3f0 0x001f3498 Yes (*) /usr/lib/libcairo.so.2
0x00211640 0x00232fe8 Yes (*) /usr/lib/i386-linux-gnu/libpango-1.0.so.0
0x006716e0 0x006d8ed8 Yes (*) /usr/lib/i386-linux-gnu/libfreetype.so.6
0x007df030 0x007fa758 Yes (*) /usr/lib/i386-linux-gnu/libfontconfig.so.1
0x0024f6f0 0x002835f8 Yes (*) /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
0x006f1c40 0x006f2d78 Yes (*) /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0
0x006f8f60 0x006fa678 Yes (*) /usr/lib/i386-linux-gnu/libgthread-2.0.so.0
0x00cb58c0 0x00cb9578 Yes (*) /lib/i386-linux-gnu/librt.so.1
0x0070f790 0x007886a8 Yes (*) /lib/i386-linux-gnu/libglib-2.0.so.0
0x00a23a30 0x00a77338 Yes (*) /usr/lib/libSDL-1.2.so.0
0x0080e610 0x0081a9d8 Yes (*) /lib/i386-linux-gnu/libpthread.so.0
0x00824760 0x00831c98 Yes (*) /lib/i386-linux-gnu/libz.so.1
0x00856ea0 0x00870c48 Yes (*) /usr/lib/i386-linux-gnu/libjpeg.so.62
0x00d2d6e0 0x00e0f678 Yes (*) /usr/local/lib/libfmodex-4.26.36.so
0x00f452e0 0x00fb6d08 Yes (*) /usr/lib/i386-linux-gnu/libstdc++.so.6
0x008a54b0 0x008bfb38 Yes (*) /lib/i386-linux-gnu/libm.so.6
0x00839f50 0x00850418 Yes (*) /lib/i386-linux-gnu/libgcc_s.so.1
0x01002c10 0x0110d1c4 Yes (*) /lib/i386-linux-gnu/libc.so.6
0x099b6120 0x09a44d98 Yes (*) /usr/lib/i386-linux-gnu/libX11.so.6
0x007d4860 0x007d53e8 Yes (*) /usr/lib/i386-linux-gnu/libXcomposite.so.1
0x008757b0 0x008761e8 Yes (*) /usr/lib/i386-linux-gnu/libXdamage.so.1
0x00879e40 0x0087c2c8 Yes (*) /usr/lib/i386-linux-gnu/libXfixes.so.3
0x00abe5b0 0x00ac8b58 Yes (*) /usr/lib/i386-linux-gnu/libXext.so.6
0x008c92a0 0x008cf0d8 Yes (*) /usr/lib/i386-linux-gnu/libXrender.so.1
0x0087f750 0x008801f8 Yes (*) /usr/lib/i386-linux-gnu/libXinerama.so.1
0x008d37e0 0x008ddb48 Yes (*) /usr/lib/i386-linux-gnu/libXi.so.6
0x008e20e0 0x008e6bc8 Yes (*) /usr/lib/i386-linux-gnu/libXrandr.so.2
0x008eaa80 0x008f0088 Yes (*) /usr/lib/i386-linux-gnu/libXcursor.so.1
0x00c94a40 0x00c95998 Yes (*) /lib/i386-linux-gnu/libdl.so.2
0x00b8af40 0x00bb4c08 Yes (*) /lib/i386-linux-gnu/libpcre.so.3
0x008f5630 0x00901828 Yes (*) /lib/i386-linux-gnu/libresolv.so.2
0x00aceec0 0x00ae0468 Yes (*) /lib/i386-linux-gnu/libselinux.so.1
0x00bfab10 0x00c5cb08 Yes (*) /usr/lib/libpixman-1.so.0
0x00c667a0 0x00c824e8 Yes (*) /lib/i386-linux-gnu/libpng12.so.0
0x00908730 0x00908ff8 Yes (*) /usr/lib/i386-linux-gnu/libxcb-shm.so.0
0x0090e330 0x00911628 Yes (*) /usr/lib/i386-linux-gnu/libxcb-render.so.0
0x00c9eab0 0x00cad7f8 Yes (*) /usr/lib/i386-linux-gnu/libxcb.so.1
0x062e3f40 0x062fd568 Yes (*) /lib/i386-linux-gnu/libexpat.so.1
0x00884830 0x0089b4af Yes (*) /lib/ld-linux.so.2
0x00914ef0 0x00916358 Yes (*) /usr/lib/libpulse-simple.so.0
0x0394c7e0 0x0397be88 Yes (*) /usr/lib/libpulse.so.0
0x00aaa9c0 0x00aab748 Yes (*) /usr/lib/i386-linux-gnu/libXau.so.6
0x00aaeca0 0x00ab08a8 Yes (*) /usr/lib/i386-linux-gnu/libXdmcp.so.6
0x05790fa0 0x057c4578 Yes (*) /usr/lib/libpulsecommon-0.9.22.so
0x0028f390 0x0028f4b8 Yes (*) /usr/lib/i386-linux-gnu/libX11-xcb.so.1
0x00ee6fc0 0x00ef66c8 Yes (*) /usr/lib/i386-linux-gnu/libICE.so.6
0x00ab5410 0x00ab9908 Yes (*) /usr/lib/i386-linux-gnu/libSM.so.6
0x00ae6e70 0x00ae9a38 Yes (*) /usr/lib/libXtst.so.6
0x00aed4d0 0x00aedbb8 Yes (*) /usr/lib/libxcb-atom.so.1
0x05b75d30 0x05ba4a98 Yes (*) /lib/i386-linux-gnu/libdbus-1.so.3
0x00bcaed0 0x00bcf028 Yes (*) /lib/libwrap.so.0
0x024a23a0 0x024f1698 Yes (*) /usr/lib/libsndfile.so.1
0x00bd2ec0 0x00bd4b18 Yes (*) /lib/i386-linux-gnu/libuuid.so.1
0x02ab7130 0x02ac3c08 Yes (*) /lib/i386-linux-gnu/libnsl.so.1
0x07f661e0 0x07fa4f58 Yes (*) /usr/lib/libFLAC.so.8
0x02f86b20 0x02f88f78 Yes (*) /usr/lib/libvorbisenc.so.2
0x09967f70 0x0997c8c8 Yes (*) /usr/lib/libvorbis.so.0
0x00c89500 0x00c8bd98 Yes (*) /usr/lib/libogg.so.0
0x00cbde30 0x00cc2a28 Yes (*) /lib/i386-linux-gnu/libnss_compat.so.2
0x08890930 0x08896a68 Yes (*) /lib/i386-linux-gnu/libnss_nis.so.2
0x08b88a90 0x08b8ffe8 Yes (*) /lib/i386-linux-gnu/libnss_files.so.2
0x03440710 0x03445a38 Yes (*) /usr/lib/liboverlay-scrollbar-0.1.so.0
0x006f56e0 0x006f5908 Yes (*) /usr/lib/gtk-2.0/modules/librgba.so
0x0791e5f0 0x07920718 Yes (*) /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so
0x00c903d0 0x00c91918 Yes (*) /usr/lib/libcanberra-gtk.so.0
0x042a7f30 0x042b1e28 Yes (*) /usr/lib/libcanberra.so.0
0x0500b570 0x050105c8 Yes (*) /usr/lib/libvorbisfile.so.3
0x059918e0 0x0599c458 Yes (*) /usr/lib/libtdb.so.1
0x04485710 0x0448a018 Yes (*) /usr/lib/libltdl.so.7
0x02cf2e60 0x02d19db8 Yes (*) /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
0x0114e740 0x01153628 Yes (*) /usr/lib/gtk-2.0/2.10.0/engines/libpixmap.so
0x007d85e0 0x007d8ad8 Yes /home/nero/trunk/release/liboutput_sdl.so
0x0987e010 0x09914cb8 Yes (*) /usr/lib/libasound.so
0x09fb07d0 0x09fb2bb8 Yes (*) /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
(*): Shared library is missing debugging information.
* Threads
5 Thread 0x1957b70 (LWP 22416) 0x00f00416 in __kernel_vsyscall ()
4 Thread 0x429db70 (LWP 22417) 0x00f00416 in __kernel_vsyscall ()
3 Thread 0x2158b70 (LWP 22418) 0x00f00416 in __kernel_vsyscall ()
2 Thread 0x4c8db70 (LWP 22419) 0x00f00416 in __kernel_vsyscall ()
* 1 Thread 0xb77a1880 (LWP 22415) 0x00f00416 in __kernel_vsyscall ()
* FPU Status
R7: Empty 0x00000000000000000000
R6: Empty 0x00000000000000000000
R5: Empty 0x00000000000000000000
R4: Empty 0x00000000000000000000
R3: Empty 0x00000000000000000000
R2: Empty 0x00000000000000000000
R1: Empty 0x00000000000000000000
=>R0: Empty 0x00000000000000000000
Status Word: 0x0000
TOP: 0
Control Word: 0x037f IM DM ZM OM UM PM
PC: Extended Precision (64-bits)
RC: Round to nearest
Tag Word: 0xffff
Instruction Pointer: 0x00:0x00000000
Operand Pointer: 0x00:0x00000000
Opcode: 0x0000
* Registers
eax 0xfffffe00 -512
ecx 0x84de0dc 139321564
edx 0x0 0
ebx 0x5798 22424
esp 0x84de0a0 0x84de0a0
ebp 0x84de0f8 0x84de0f8
esi 0x5798 22424
edi 0x84de0dc 139321564
eip 0xf00416 0xf00416 <__kernel_vsyscall+2>
eflags 0x293 [ CF AF SF IF ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
* Backtrace
Thread 5 (Thread 0x1957b70 (LWP 22416)):
#0 0x00f00416 in __kernel_vsyscall ()
No symbol table info available.
#1 0x00817d46 in nanosleep () from /lib/i386-linux-gnu/libpthread.so.0
No symbol table info available.
#2 0x00a76b8e in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#3 0x00a76bd4 in ?? () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#4 0x00a2ce4e in ?? () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#5 0x00a7412d in ?? () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#6 0x0080fe99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
No symbol table info available.
#7 0x010bc73e in clone () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
Thread 4 (Thread 0x429db70 (LWP 22417)):
#0 0x00f00416 in __kernel_vsyscall ()
No symbol table info available.
#1 0x010adf76 in poll () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
#2 0x039744a2 in ?? () from /usr/lib/libpulse.so.0
No symbol table info available.
#3 0x039633a9 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
No symbol table info available.
#4 0x03963b84 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
No symbol table info available.
#5 0x03963c64 in pa_mainloop_run () from /usr/lib/libpulse.so.0
No symbol table info available.
#6 0x03974443 in ?? () from /usr/lib/libpulse.so.0
No symbol table info available.
#7 0x057c1a75 in ?? () from /usr/lib/libpulsecommon-0.9.22.so
No symbol table info available.
#8 0x0080fe99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
No symbol table info available.
#9 0x010bc73e in clone () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
Thread 3 (Thread 0x2158b70 (LWP 22418)):
#0 0x00f00416 in __kernel_vsyscall ()
No symbol table info available.
#1 0x010adf76 in poll () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
#2 0x098a6b8f in ?? () from /usr/lib/libasound.so
No symbol table info available.
#3 0x098a6d63 in snd_pcm_wait () from /usr/lib/libasound.so
No symbol table info available.
#4 0x098acfa0 in ?? () from /usr/lib/libasound.so
No symbol table info available.
#5 0x098f018a in ?? () from /usr/lib/libasound.so
No symbol table info available.
#6 0x098a5ac4 in snd_pcm_writei () from /usr/lib/libasound.so
No symbol table info available.
#7 0x00d885d7 in FMOD::OutputALSA::updateMixer() () from /usr/local/lib/libfmodex-4.26.36.so
No symbol table info available.
#8 0x00d82c8d in FMOD::Thread::callback(void*) () from /usr/local/lib/libfmodex-4.26.36.so
No symbol table info available.
#9 0x0080fe99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
No symbol table info available.
#10 0x010bc73e in clone () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
Thread 2 (Thread 0x4c8db70 (LWP 22419)):
#0 0x00f00416 in __kernel_vsyscall ()
No symbol table info available.
#1 0x01084fe6 in nanosleep () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
#2 0x010b61ac in usleep () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
#3 0x00d847e5 in FMOD_OS_Time_Sleep(unsigned int) () from /usr/local/lib/libfmodex-4.26.36.so
No symbol table info available.
#4 0x00d82ca3 in FMOD::Thread::callback(void*) () from /usr/local/lib/libfmodex-4.26.36.so
No symbol table info available.
#5 0x0080fe99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
No symbol table info available.
#6 0x010bc73e in clone () from /lib/i386-linux-gnu/libc.so.6
No symbol table info available.
Thread 1 (Thread 0xb77a1880 (LWP 22415)):
#0 0x00f00416 in __kernel_vsyscall ()
No symbol table info available.
#1 0x0081846b in waitpid () from /lib/i386-linux-gnu/libpthread.so.0
No symbol table info available.
#2 0x08111914 in crash_catcher (signum=8, siginfo=0x84de10c, context=0x84de18c) at /home/nero/trunk/src/sdl/crashcatcher.c:249
status = 0
dbg_pid = 22424
fd = {15, 16}
#3 <signal handler called>
No symbol table info available.
#4 0x082354fd in DivScale32 () at /home/nero/trunk/src/gccinlines.h:291
result = <value optimized out>
#5 R_InitTextureMapping () at /home/nero/trunk/src/r_main.cpp:490
i = <value optimized out>
fov = <value optimized out>
dfocus = <value optimized out>
x = <value optimized out>
hitan = 65536
#6 0x08235ade in R_SetWindow (windowSize=10, fullWidth=640, fullHeight=480, stHeight=403) at /home/nero/trunk/src/r_main.cpp:733
virtheight = 480
virtwidth = 640
trueratio = 0
virtwidth2 = <value optimized out>
virtheight2 = 128000
#7 0x08235d89 in R_ExecuteSetViewSize () at /home/nero/trunk/src/r_main.cpp:755
No locals.
#8 0x0814278d in D_Display () at /home/nero/trunk/src/d_main.cpp:665
wipe = <value optimized out>
hw2d = <value optimized out>
#9 0x08143b45 in D_DoomLoop () at /home/nero/trunk/src/d_main.cpp:1002
lasttic = 127
#10 0x08145b20 in D_DoomMain () at /home/nero/trunk/src/d_main.cpp:2343
iwad = {Chars = 0x84d46ec "", static NullString = {Len = 0, AllocLen = 2, RefCount = 3176, Nothing = "\000"}}
iwad_info = 0xa63fa9c
startupString = {0x8405c6d "STARTUP1", 0x8405c76 "STARTUP2", 0x8405c7f "STARTUP3", 0x8405c88 "STARTUP4", 0x8405c91 "STARTUP5"}
pwads = {Array = 0x0, Most = 0, Count = 0}
basewad = {Chars = 0xa62beac "/home/nero/trunk/release/zdoom.pk3", static NullString = {Len = 0, AllocLen = 2, RefCount = 3176, Nothing = "\000"}}
wad = 0xa63fa70 ""
execFiles = 0x0
args = 0x0
argcount = 174324380
#11 0x08114818 in main (argc=1, argv=0xbffc7da4) at /home/nero/trunk/src/sdl/i_main.cpp:325
program = "/home/nero/trunk/release/\000doom\000\267\060\232z\267\020\000\000\000(h\002\000(x\002\000\364\017\212\000 \274z\267\260\365z\267\200\325z\267", '\000' <repeats 20 times>"\241, \214\211\000\024n\374\277\326$\211\000\324{\374\277\000\000\000\000\024\001\000\000\024\001\000\000\364\017\212\000\240m\374\277\004\000\000\000lm\374\277ō\211\000\b\000\000\000$\000\000\000\364\017\212\000\020\000\000\000\246\f\211\000\034\232z\267\b\232z\267\020\000\000\000\364\017\212\000\225O\313\000\004|\374\277\372\v\211\000\001\000\000\000<\025\212\000pl\374\277\270m\374\277\200\325z\267\000\340z\267<\025\212\000\000\000\000\000\000\000\000\000\260n\374\277\230n\374\277\326$\211\000\324{\374\277\000\000\000\000\003\000\000\000GNU\000\367{\374\277\360{\374\277\241\214\211\000\214\030\212\000\215|ǔC\000\000\000\000\000\000\000\020\000\000\000\364\017\212\000\364\017\212\000\060n\374\277\006\000\000\000\024n\374\277ō\211\000\b\000\000\000"...
slash = 0x0

Code: Select all
viewingrangerecip = DivScale32(1, finetangent[FINEANGLES/4+(FieldOfView/2)]);

Release build works fine for me with Kubuntu 11.04 x86_64.nerotriple6 wrote:I wonder if anyone else uses this in Natty (Ubuntu 11.04) because it worked fine in 10.10..
Code: Select all
: "%cc");Code: Select all
g++ -vCode: Select all
nero@svart:~$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)



Code: Select all
static inline SDWORD DivScale32 (SDWORD a, SDWORD b)
{
SDWORD result, dummy;
asm volatile
("xor %%eax,%%eax\n\t"
"idivl %3"
:"=&a,a" (result),
"=d,d" (dummy)
: "d,d" (a),
"r,m" (b)
: "%cc");
return result;
}