Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wishlist: Configure option to fatalize if certain extensions cannot be built #11958

Open
p5pRT opened this issue Feb 14, 2012 · 7 comments
Open

Comments

@p5pRT
Copy link

p5pRT commented Feb 14, 2012

Migrated from rt.perl.org#110706 (status was 'open')

Searchable as RT110706$

@p5pRT
Copy link
Author

p5pRT commented Feb 14, 2012

From mark-csn59xt9@mstier.de

This is a bug report for perl from perlbug.8496723@​mstier.de,
generated with the help of perlbug 1.39 running under perl 5.14.2.


No DB_File.pm after installation when running config like​:

./Configure -dse -Dusethreads -Duselargefiles -Dinc_version_list=none
-Dprefix=$PREFIX \
  -Accflags='-DPERL_USE_SAFE_PUTENV' \
  -Dnoextensions=ODBM_File -Di_db -Di_dbm -Di_ndbm -Di_gdbm \
  -A prepend​:ccflags=" -fPIC -I$PREFIX/include " \
  -A prepend​:cppflags=" -fPIC -I$PREFIX/include " \
  -A prepend​:ldflags=" -L$PREFIX/lib "

This should definitely throw an error, but gets silently dropped when
libdb-dev is not available in Debian 6.0 i586 build env.



Flags​:
  category=core
  severity=low


Site configuration information for perl 5.14.2​:

Configured by root at Wed Jan 11 14​:16​:18 UTC 2012.

Summary of my perl5 (revision 5 version 14 subversion 2) configuration​:

  Platform​:
  osname=linux, osvers=3.1.0-1.2-default,
archname=x86_64-linux-thread-multi
  uname='linux build24 3.1.0-1.2-default #1 smp thu nov 3 14​:45​:45 utc
2011 (187dde0) x86_64 x86_64 x86_64 gnulinux '
  config_args='-dse -Dusethreads -Dinc_version_list=none
-Dprefix=/opt/perl-5.14.2 -Accflags=-DPERL_USE_SAFE_PUTENV
-Dnoextensions=ODBM_File -Di_db -Di_dbm -Di_ndbm -Di_gdbm -A
prepend​:ccflags= -fPIC -I/opt/perl-5.14.2/include -A
prepend​:cppflags= -fPIC -I/opt/perl-5.14.2/include -A
prepend​:ldflags= -L/opt/perl-5.14.2/lib '
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC
-I/opt/perl-5.14.2/include -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-fPIC -I/opt/perl-5.14.2/include -D_REENTRANT -D_GNU_SOURCE
-fPIC -I/opt/perl-5.14.2/include -DPERL_USE_SAFE_PUTENV
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.6.1', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/opt/perl-5.14.2/lib -fstack-protector
-L/usr/local/lib'
  libpth=/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib
  libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.13'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/opt/perl-5.14.2/lib
-L/usr/local/lib -fstack-protector'

Locally applied patches​:


@​INC for perl 5.14.2​:
  ~/mysvn/scripts/perl
  /opt/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux-thread-multi
/opt/perl-5.14.2/lib/site_perl/5.14.2
  /opt/perl-5.14.2/lib/5.14.2/x86_64-linux-thread-multi
  /opt/perl-5.14.2/lib/5.14.2
  .


Environment for perl 5.14.2​:
  HOME=/home/stier
  LANG=de_DE.UTF-8
  LANGUAGE (unset)
  LC_ALL=de_DE.UTF-8
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/opt/perl-5.14.2/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/games​:/home/stier/bin​:/usr/local/share/myscripts/cmdline-tools​:/sbin​:/usr/sbin
PERL5LIB=~/mysvn/scripts/perl
  PERL_BADLANG (unset)
  SHELL=/bin/bash

--
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC-2119
[http​://www.ietf.org/rfc/rfc2119.txt].

@p5pRT
Copy link
Author

p5pRT commented Feb 14, 2012

From @doughera88

On Tue, 14 Feb 2012, Mark wrote​:

# New Ticket Created by "Mark"
# Please include the string​: [perl #110706]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=110706 >

This is a bug report for perl from perlbug.8496723@​mstier.de,
generated with the help of perlbug 1.39 running under perl 5.14.2.

-----------------------------------------------------------------

No DB_File.pm after installation when running config like​:

./Configure -dse -Dusethreads -Duselargefiles -Dinc_version_list=none
-Dprefix=$PREFIX \
-Accflags='-DPERL_USE_SAFE_PUTENV' \
-Dnoextensions=ODBM_File -Di_db -Di_dbm -Di_ndbm -Di_gdbm \
-A prepend​:ccflags=" -fPIC -I$PREFIX/include " \
-A prepend​:cppflags=" -fPIC -I$PREFIX/include " \
-A prepend​:ldflags=" -L$PREFIX/lib "

This should definitely throw an error, but gets silently dropped when
libdb-dev is not available in Debian 6.0 i586 build env.

I'm don't think there's really much that Configure should do here. I
tried to reproduce your situation. Here's what Configure reported​:

  <db.h> NOT found.
  Hmm. Based on the hints in hints/linux.sh,
  the recommended value for $i_db on this machine was "define"!
  Keep the recommended value? [y]

The "Based on the hints ... " text is misleading here. The
recommended value actually came from the command line, where I told
it that I have <db.h>, even though I don't.

Here's the critical part​:

  Checking Berkeley DB version ...
  try.c​:11​:16​: error​: db.h​: No such file or directory
  I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB.

This is what Configure is supposed to do. It tests for features, and
then enables or disables things based on what it finds. Since you don't
have DB installed, Configure won't try to build it. That's not a fatal
error; it's a supported configuration. It's not "silently dropped",
though I readily agree that ordinary message is mixed in with all the
other ordinary messages about various things found or not found.

If you had *also* inluded -ldb in your list of libraries, then Configure
would have aborted as you wished. As it is, I don't think it's a bug in
Configure.

--
  Andy Dougherty doughera@​lafayette.edu

-----------------------------------------------------------------
---
Flags​:
category=core
severity=low
---
Site configuration information for perl 5.14.2​:

Configured by root at Wed Jan 11 14​:16​:18 UTC 2012.

Summary of my perl5 (revision 5 version 14 subversion 2) configuration​:

Platform​:
osname=linux, osvers=3.1.0-1.2-default,
archname=x86_64-linux-thread-multi
uname='linux build24 3.1.0-1.2-default #1 smp thu nov 3 14​:45​:45 utc
2011 (187dde0) x86_64 x86_64 x86_64 gnulinux '
config_args='-dse -Dusethreads -Dinc_version_list=none
-Dprefix=/opt/perl-5.14.2 -Accflags=-DPERL_USE_SAFE_PUTENV
-Dnoextensions=ODBM_File -Di_db -Di_dbm -Di_ndbm -Di_gdbm -A
prepend​:ccflags= -fPIC -I/opt/perl-5.14.2/include -A
prepend​:cppflags= -fPIC -I/opt/perl-5.14.2/include -A
prepend​:ldflags= -L/opt/perl-5.14.2/lib '
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler​:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC
-I/opt/perl-5.14.2/include -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fPIC -I/opt/perl-5.14.2/include -D_REENTRANT -D_GNU_SOURCE
-fPIC -I/opt/perl-5.14.2/include -DPERL_USE_SAFE_PUTENV
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.6.1', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries​:
ld='cc', ldflags =' -L/opt/perl-5.14.2/lib -fstack-protector
-L/usr/local/lib'
libpth=/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib
libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.13'
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/opt/perl-5.14.2/lib
-L/usr/local/lib -fstack-protector'

Locally applied patches​:

---
@​INC for perl 5.14.2​:
~/mysvn/scripts/perl
/opt/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux-thread-multi
/opt/perl-5.14.2/lib/site_perl/5.14.2
/opt/perl-5.14.2/lib/5.14.2/x86_64-linux-thread-multi
/opt/perl-5.14.2/lib/5.14.2
.

---
Environment for perl 5.14.2​:
HOME=/home/stier
LANG=de_DE.UTF-8
LANGUAGE (unset)
LC_ALL=de_DE.UTF-8
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/opt/perl-5.14.2/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/games​:/home/stier/bin​:/usr/local/share/myscripts/cmdline-tools​:/sbin​:/usr/sbin
PERL5LIB=~/mysvn/scripts/perl
PERL_BADLANG (unset)
SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Feb 14, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 14, 2012

From @ap

* Andy Dougherty <doughera@​lafayette.edu> [2012-02-14 15​:55]​:

Here's the critical part​:

Checking Berkeley DB version \.\.\.
try\.c&#8203;:11&#8203;:16&#8203;: error&#8203;: db\.h&#8203;: No such file or directory
I can't use Berkeley DB with your \<db\.h>\.  I'll disable Berkeley DB\.

This is what Configure is supposed to do. It tests for features, and
then enables or disables things based on what it finds. Since you
don't have DB installed, Configure won't try to build it. That's not
a fatal error; it's a supported configuration. It's not "silently
dropped", though I readily agree that ordinary message is mixed in
with all the other ordinary messages about various things found or not
found.

If you had *also* inluded -ldb in your list of libraries, then
Configure would have aborted as you wished. As it is, I don't think
it's a bug in Configure.

Being able to tell Configure “I need DB_File and if you can’t build it
then there is no point in continuing” is a reasonable thing to want.

Having to use `-ldb` strikes me as a rather obscure way of saying that.

Regards,
--
Aristotle Pagaltzis // <http​://plasmasturm.org/>

@p5pRT
Copy link
Author

p5pRT commented Feb 14, 2012

From @doughera88

On Tue, 14 Feb 2012, Aristotle Pagaltzis wrote​:

* Andy Dougherty <doughera@​lafayette.edu> [2012-02-14 15​:55]​:

Here's the critical part​:

Checking Berkeley DB version \.\.\.
try\.c&#8203;:11&#8203;:16&#8203;: error&#8203;: db\.h&#8203;: No such file or directory
I can't use Berkeley DB with your \<db\.h>\.  I'll disable Berkeley DB\.

This is what Configure is supposed to do. It tests for features, and
then enables or disables things based on what it finds. Since you
don't have DB installed, Configure won't try to build it. That's not
a fatal error; it's a supported configuration. It's not "silently
dropped", though I readily agree that ordinary message is mixed in
with all the other ordinary messages about various things found or not
found.

Being able to tell Configure “I need DB_File and if you can’t build it
then there is no point in continuing” is a reasonable thing to want.

Perhaps, but that's not what the original poster did. The original
poster lied to Configure and said "I have <db.h>" but decided to allow
Configure to check whether he had -ldb or not.

If you had *also* inluded -ldb in your list of libraries, then
Configure would have aborted as you wished. As it is, I don't think
it's a bug in Configure.

Having to use `-ldb` strikes me as a rather obscure way of saying that.

Yes. My point wasn't that it was a good interface, but merely that
if the user had at least lied consistently to Configure, it would have
aborted as apparently expected.

I recognize this probably came about because Configure doesn't offer any
obvious command-line flag to require specific extensions. I suppose
someone could implement a generic -Drequireextensions= directive (the
opposite of the current -Dnoextensions= directive), but I question
whether such a feature would really ever get much use. Meanwhile,
a simple customized config.over script can easily handle any special
needs, and is an easy workaround.

Back to this specific ticket. The -D and -U flags are not assertions
intended to cause abort; they are overrides intended to correct
Configure's guesses. I don't think inserting special case
code for aborting when the user says -Di_db, but they don't have <db.h>,
is warranted.

--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Feb 14, 2012

From @ap

* Andy Dougherty <doughera@​lafayette.edu> [2012-02-14 19​:15]​:

On Tue, 14 Feb 2012, Aristotle Pagaltzis wrote​:

Being able to tell Configure “I need DB_File and if you can’t build
it then there is no point in continuing” is a reasonable thing to
want.

Perhaps, but that's not what the original poster did.

Having to use `-ldb` strikes me as a rather obscure way of saying that.

Yes. My point wasn't that it was a good interface […] I don't think
inserting special case code for aborting when the user says -Di_db,
but they don't have <db.h>, is warranted.

Sorry that in trying to avoid taking up room for a marginal point I was
evidently too brief to be clear. I know it is not what the OP did, and
I did not mean to imply you were defending the interface.

I wanted merely to observe that the OP had a reasonable desire and that
the currently available means to achieve it are obscure, i.e. there is
a sensible wishlist item in here. (I have no opinion on whether or how
that should be implemented.) That’s all.

@p5pRT
Copy link
Author

p5pRT commented Sep 20, 2016

From @dcollinsn

I am modifying this ticket from "extensions silently get dropped" - it isn't silent, and it isn't a bug - and making it a wishlist ticket. The wishlist item is to add a -Dneed_extensions= or similar flag to ./Configure, which will cause Configure to exit with an error if one of the selected extensions is not being built.

No comment on whether that's actually necessary or useful, just making this ticket actionable.

--
Respectfully,
Dan Collins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants