POV-Ray : Newsgroups : povray.bugreports : Parse error: Uncategorized error thrown at parser/parsertypes.cpp line 62 : Re: Parseerror:Uncategorizederrorthrownatparser/parsertypes.cppline62 Server Time
25 Apr 2024 02:39:12 EDT (-0400)
  Re: Parseerror:Uncategorizederrorthrownatparser/parsertypes.cppline62  
From: William F Pokorny
Date: 28 Mar 2019 06:49:32
Message: <5c9ca6bc$1@news.povray.org>
On 3/26/19 8:10 AM, clipka wrote:
> Am 26.03.2019 um 11:46 schrieb William F Pokorny:
> 
>> Quick additional question. Is it the --enable-debug configure flag 
>> that - normally - turns on the pov asserts? I've never verified this 
>> assumption of mine by creating a pov assert in the code I know should 
>> fail.
> 
> To be honest, I haven't a clue. I'm not sure what the `--enable-debug` 
> flag does exactly (it's some standard mechanism in the Automake tools), 
> nor whether and how assertions are enabled or disabled in Unix builds.
> 
> I'm pretty sure that `--enable-debug` does enable the creation of debug 
> information in the binaries, so that a debugging tool can correlate 
> binary code addresses with original source code lines, so that you can 
> e.g. set breakpoints and step through the code line by line with a 
> debugger. I also wouldn't be surprised if it turns off optimizations by 
> default, because those tend to re-order instructions and make a 
> line-by-line correlation impossible. Whether it does anything beyond 
> that I do not know. It might dictate whether `NDEBUG` is defined or not, 
> which would conceivably disable/enable assertions.

Back at it this morning.

First, flipping the file name compare so it's ahead of the file position 
compare (and assert) works fine too with all the test cases I have that 
fail.

Second, on enabling the POV_ASSERT source code mechanism, took the time 
to do some full compiles with a known fail assert of 1 == 0 and the 
short of it for *nix is doing something like:

./configure COMPILED_BY="wfp__POV_DEBUG" CXXFLAGS="-DPOV_DEBUG"

works. The -D<var> form on the define is added as a compiler flag to do 
the POV_DEBUG define, which, turns on the POV asserts that exist in the 
code (except I guess where not otherwise controlled or hard-set).

Lastly, on the --enable-debug flag, it is not today defining POV_DEBUG 
which is what turns on the POV_ASSERTs. Most of my actual debug compiles 
use a configure command like:

./configure COMPILED_BY="wfp" --disable-optimiz --disable-strip \ 
CXXFLAGS="-Og -ggdb fverbose-asm"

so --enable-debug isn't strictly needed for debugging though on line 
documentation I read just now indicates - by default anyway - it does 
something equivalent given certain arguments. Looks like you can select 
what sort of debugging gets turned on - and you can provide a second 
argument defining variables explicitly (ie POV_DEBUG) and there is the 
NDEBUG you mentioned (boost seems to use this some) getting set by 
default if the flag's argument turns debugging off (or the flag's not 
used but enabled?). What some documentation says only; Not sure what 
works or not for --enable-debug with our current set up without doing a 
bunch of compiles and tests. An investigation for another time. The flag 
doesn't control the POV_ASSERTs today via NDEBUG in any case - so at 
best it might provide another way to define POV_DEBUG using that second 
argument.

Bill P.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.