Fwd: compiling FLTK with DWARF debugging options for RefPerSys

9 views
Skip to first unread message

Basile Starynkevitch

unread,
Apr 3, 2022, 12:31:01 PM4/3/22
to fltk.general




-------- Forwarded Message --------
Subject: compiling FLTK with DWARF debugging options for RefPerSys
Date: Sun, 3 Apr 2022 18:27:28 +0200
From: Basile Starynkevitch <bas...@starynkevitch.net>
Reply-To: refpers...@framalistes.org
To: te...@refpersys.org <te...@refpersys.org>, refpers...@framalistes.org


Hello all,


For RefPerSys (C++) we need to compile FLTK (from https://www.fltk.org/ ...  git clone https://github.com/fltk/fltk.git ...) with DWARF debugging symbol./



This is possible by editing the makeinclude file of FLTK to add, near  its line 65,  the appropriate options:

OPTIM        =  -O2 -g -Wall -Wunused -Wno-format-y2k  -fno-exceptions -fno-strict-aliasing -ffunction-sections -fdata-sections



Sadly, I still don't know if Abhishek was able and allowed to do so.


On my desktop machine, compilation (with a simple make without -j) took about 90 seconds. This for fltk  commit 9aba7c9db05bde2ac



I would be happy to know if Abhishek was allowed and able to recompile FLTK in that way.


Thanks


-- 
Basile Starynkevitch                  <bas...@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/

Albrecht Schlosser

unread,
Apr 3, 2022, 12:47:03 PM4/3/22
to fltkg...@googlegroups.com
On 4/3/22 18:29 Basile Starynkevitch wrote:
For RefPerSys (C++) we need to compile FLTK (from https://www.fltk.org/ ...  git clone https://github.com/fltk/fltk.git ...) with DWARF debugging symbol./

Emphasis on "debugging" or on "DWARF"?

Anyway...

This is possible by editing the makeinclude file of FLTK to add, near  its line 65,  the appropriate options:

OPTIM        =  -O2 -g -Wall -Wunused -Wno-format-y2k  -fno-exceptions -fno-strict-aliasing -ffunction-sections -fdata-sections

I would be happy to know if Abhishek was allowed and able to recompile FLTK in that way.


Everybody is allowed to do so. But there is a much easier way. Output from my Linux system:

$ ./configure --enable-debug --with-optim="-O2"
[...]

$ grep O2 makeinclude
OPTIM        = -g  -Wall -Wunused -Wno-format-y2k -O2 -fno-exceptions -fno-strict-aliasing -ffunction-sections -fdata-sections




Note that the combination of debugging and optimization is generally not recommended because optimization may change and reorder statements such that debugging can become difficult. But it's of course your choice.

Reply all
Reply to author
Forward
0 new messages