POV-Ray : Newsgroups : povray.unix : compiling 3.5 with debug info ? Server Time
5 Jul 2024 14:38:06 EDT (-0400)
  compiling 3.5 with debug info ? (Message 1 to 7 of 7)  
From: Thierry Boudet
Subject: compiling 3.5 with debug info ?
Date: 27 Jul 2003 06:51:22
Message: <3f23aeaa@news.povray.org>
EHLO

did you know a way to go thru the
    $ ./configure
    $ make
way, and adding the -g option needed
for gdb ?

Th.


Post a reply to this message

From: Micha Riser
Subject: Re: compiling 3.5 with debug info ?
Date: 27 Jul 2003 07:39:18
Message: <3f23b9e5@news.povray.org>
Thierry Boudet wrote:

> EHLO
> 
> did you know a way to go thru the
>     $ ./configure
>     $ make
> way, and adding the -g option needed
> for gdb ?
> 
> Th.

what does ./configure --help say? there is probably an option
--enable-debug=yes for configure.

- Micha
-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

From: Th Boudet
Subject: Re: compiling 3.5 with debug info ?
Date: 27 Jul 2003 08:41:01
Message: <3f23c85d$1@news.povray.org>
Micha Riser wrote:
> Thierry Boudet wrote:
> 
> 
>>EHLO
>>
>>did you know a way to go thru the
>>    $ ./configure
>>    $ make
>>way, and adding the -g option needed
>>for gdb ?
>>
>>Th.
> 
> 
> what does ./configure --help say? there is probably an option
> --enable-debug=yes for configure.
> 
    Yes, I've just try it now.
    No debug flag :)

c++ -DPREFIX=\"/usr/local\" 
-DPOV_LIB_DIR=\"/usr/local/share/povray-3.5\" 
-DCOMPILER_VER=\".Linux.gcc\" -DSYSCONFDIR=\"/usr/local/etc\" 
-DUSE_IO_RESTRICTIONS=\"\"     `if [ "Xgcc" = "Xgcc" ]; then echo 
"-Wno-multichar"; fi ` -O3 -finline-functions -ffast-math 
-fomit-frame-pointer -funroll-loops -fexpensive-optimizations 
-malign-double -foptimize-sibling-calls -minline-all-stringops 
-Wno-multichar -c bezier.cpp

   Th.


Post a reply to this message

From: Micha Riser
Subject: Re: compiling 3.5 with debug info ?
Date: 27 Jul 2003 08:57:49
Message: <3f23cc4d@news.povray.org>
Looks like this configure doesn't support it then. Maybe you can do it "by
hand" by edition the Makefile in the src/ directory and add "-g" to the
CPPFLAGS.

-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

From: fsdck
Subject: Re: compiling 3.5 with debug info ?
Date: 27 Jul 2003 16:30:49
Message: <3f243679@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Th Boudet <th.### [at] freefr> wrote:
>     Yes, I've just try it now.
>     No debug flag :)

debug is not a feature that can be set when building POVRay.  The safest
way to have a flag passed to the compiler, linker, etc. is to set the
appropriate FLAGS environment variable before running configure (in this
case setting CPPFLAGS).  Something like this should do the trick:

export CPPFLAGS="-g"
./configure --with-x # any other flags go here too

BEWARE: if you are using gcc, this will not turn off optimization.
POVRay is being compiled with -O3, the highest level of speed
optimization available on gcc.  In some cases, the code actually
generated may look very different from the original source as loops are
unrolled, function inlined, etc.

Good Luck,
  Karmix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/JC8Z8/zoYc8slRERAs65AJ9Mwe1Xh1eLTWpTS8UpkxuybcJeewCZAcFi
hreb2YzEI+sonf6BiAV+1mQ=
=XECj
-----END PGP SIGNATURE-----


Post a reply to this message

From: Spider
Subject: Re: compiling 3.5 with debug info ?
Date: 28 Jul 2003 21:02:20
Message: <pan.2003.07.29.01.02.43.643976@gentoo.org>
>> what does ./configure --help say? there is probably an option
>> --enable-debug=yes for configure.
>> 
>     Yes, I've just try it now.
>     No debug flag :)
> 
> c++ -DPREFIX=\"/usr/local\" 
> -DPOV_LIB_DIR=\"/usr/local/share/povray-3.5\" 
> -DCOMPILER_VER=\".Linux.gcc\" -DSYSCONFDIR=\"/usr/local/etc\" 
> -DUSE_IO_RESTRICTIONS=\"\"     `if [ "Xgcc" = "Xgcc" ]; then echo 
> "-Wno-multichar"; fi ` -O3 -finline-functions -ffast-math 
> -fomit-frame-pointer -funroll-loops -fexpensive-optimizations 
> -malign-double -foptimize-sibling-calls -minline-all-stringops 
> -Wno-multichar -c bezier.cpp
> 

First: 
be aware that -fomit-frame-pointer invalidates debugging (makes it
impossible in fact) on x86  

Also, I'd suggest you use :
CFLAGS="-march=i686 -g -O3"  CXXFLAGS="${CFLAGS} ./configure
on a clean set of sources, a check inside the config.log should show that
it compiles the test-programs with the right flags. Of course, the
-march=i686 is just a recommendation (take your normal ones here)

also, make sure you don't strip the binary.


//Spider


-- 
begin  .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end


Post a reply to this message

From: Wolfgang Wieser
Subject: Re: compiling 3.5 with debug info ?
Date: 14 Aug 2003 05:18:24
Message: <3f3b53e0@news.povray.org>
Micha Riser wrote:

> 
> Looks like this configure doesn't support it then. Maybe you can do it "by
> hand" by edition the Makefile in the src/ directory and add "-g" to the
> CPPFLAGS.
> 
It's CXXFLAGS, not CPPFLAGS. 

It's recommended to use 
./configure CFLAGS="-g -O -blah" CXXFLAGS="-g -O -blah -blah"

For good debugging, leave away any optimization flags. 

Wolfgang


Post a reply to this message

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