|
Home > Archive > Debian Developers > May 2005 > Uploading a perl module compiled with -O0
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Uploading a perl module compiled with -O0
|
|
| Enrico Zini 2005-05-28, 7:48 am |
| Hello,
I'm maintaining a swig-generated PERL module (libdebtags-perl, in
experimental) which when compiled with -O2 causes the PERL program to
segfault on exit (some memory gets garbled and the destructors choke).
Compiled with -O0, no problems.
I've noticed that the PERL policy at "4.3. Vendor Installation" wants me
to compile with -O2. Is this segfault issue enough to have an
exception, or are there more reasons for -O2 besides performance?
If it's ok to upload with -O0, I'm now doing it like this (with CDBS):
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/perlmodule.mk
# I need -O0 or I have a segfault on exit on all programs using TagDB
CFLAGS=-O0 -g -Wall
Should I do 'DEB_BUILD_OPTIONS = "noopt"' instead of setting CFLAGS?
Ciao,
Enrico that would like to spend his time as upstream developer of
Debtags, and has always to choke on some obscure packaging stuff
--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico@debian.org>
| |
| Steve Langasek 2005-05-28, 5:49 pm |
| On Sat, May 28, 2005 at 12:52:22PM +0200, Enrico Zini wrote:
> I'm maintaining a swig-generated PERL module (libdebtags-perl, in
> experimental) which when compiled with -O2 causes the PERL program to
> segfault on exit (some memory gets garbled and the destructors choke).
> Compiled with -O0, no problems.
> I've noticed that the PERL policy at "4.3. Vendor Installation" wants me
> to compile with -O2. Is this segfault issue enough to have an
> exception, or are there more reasons for -O2 besides performance?
AFAIK the -O2 recommendation is primarily because it's a reasonable default
optimization level for software; packages frequently use -O0 on one
architecture or another to work around toolchain bugs.
But it doesn't sound like what you have here is a toolchain bug, it sounds
like you have a source bug that manifests differently under different
optimization levels. Could you please try to debug the memory error instead
of working around it? You may find valgrind useful for this.
--
Steve Langasek
postmodern programmer
| |
| Enrico Zini 2005-05-30, 5:52 pm |
| On Sat, May 28, 2005 at 01:47:11PM -0700, Steve Langasek wrote:
> But it doesn't sound like what you have here is a toolchain bug, it sounds
> like you have a source bug that manifests differently under different
> optimization levels. Could you please try to debug the memory error instead
> of working around it? You may find valgrind useful for this.
I had done that already: valgrind only shows a few issues inside the
Perl code.
Ciao,
Enrico
--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico@debian.org>
|
|
|
|
|