Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383547 - net-misc/aria2 passes false parameters to ./configure
Summary: net-misc/aria2 passes false parameters to ./configure
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-18 22:37 UTC by Yuriy Taraday
Modified: 2016-05-24 12:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
aria2-1.10.0.ebuild (aria2-1.10.0.ebuild,2.83 KB, text/plain)
2011-09-18 22:37 UTC, Yuriy Taraday
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy Taraday 2011-09-18 22:37:40 UTC
Created attachment 286929 [details]
aria2-1.10.0.ebuild

ebuild in this port tries to pass arguments to configure script in wrong way.
For example, to specify path to find OpenSSL, it passes "--with-openssl=${EPREFIX}/usr/lib" argument while script expects two separate arguments "--with-openssl --with-openssl-prefix=${EPREFIX}".
I tried to fix it, it worked, but still needs polishing. My ebuild is in attachment.
I also noticed that list of enabled functions after configure still does not correspond to list of USE flags.
Comment 1 Sebastian Pipping gentoo-dev 2011-12-31 18:08:59 UTC
Hello!

(In reply to comment #0)
> ebuild in this port tries to pass arguments to configure script in wrong way.
> For example, to specify path to find OpenSSL, it passes
> "--with-openssl=${EPREFIX}/usr/lib" argument while script expects two separate
> arguments "--with-openssl --with-openssl-prefix=${EPREFIX}".

Is there a specific error that you get without the patch, anythig that we can test against?


> I tried to fix it, it worked, but still needs polishing. My ebuild is in
> attachment.

Thanks.  In the future, please attached patches rather than ebuilds.  Thanks!


> I also noticed that list of enabled functions after configure still does not
> correspond to list of USE flags.

I'm not sure what you mean by that.  could you explain in more detail, please?
Comment 2 Tiziano Müller (RETIRED) gentoo-dev 2012-01-15 12:34:34 UTC
The parameters are indeed --openssl-prefix=... (same for others), see './configure --help' output:


Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-cppunit-prefix=PFX   Prefix where CppUnit is installed (optional)
  --with-cppunit-exec-prefix=PFX  Exec prefix where CppUnit is installed (optional)
  --with-gnutls           Use gnutls if it is installed.
  --with-libnettle        Use libnettle if it is installed.
  --with-libgmp           Use libgmp if it is installed.
  --with-libgcrypt        Use libgcrypt if it is installed.
  --with-openssl          Use openssl if it is installed.
  --with-sqlite3          Use sqlite3 if it is installed.
  --with-libxml2          Use libxml2 if it is installed.
  --with-libexpat         Use libexpat if it is installed.
  --with-libcares         Use libcares if it is installed.
  --with-libz             Use libz if it is installed.
  --with-ca-bundle=FILE   Use FILE as default CA bundle.
  --with-xml-prefix=PFX   Prefix where libxml is installed (optional)
  --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)
  --with-libexpat-prefix=PREFIX  Prefix where libexpat installed (optional)
  --with-sqlite3-prefix=PREFIX  Prefix where SQLite3 installed (optional)
  --with-openssl-prefix=PREFIX  Prefix where OpenSSL installed (optional)
  --with-libgcrypt-prefix=PFX
                          prefix where LIBGCRYPT is installed (optional)
  --with-libcares-prefix=PREFIX  Prefix where libcares installed (optional)
  --with-libz-prefix=PREFIX  Prefix where zlib installed (optional)
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
  --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
  --without-libpth-prefix     don't search for libpth in includedir and libdir
  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
  --with-included-gettext use the GNU gettext library included here
  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
  --without-libintl-prefix     don't search for libintl in includedir and libdir

@prefix-guys: your turn, I don't have a prefix system
Comment 3 Yuriy Taraday 2012-01-15 13:04:26 UTC
Sorry for delay. Long New Year holidays was here.

(In reply to comment #1)
> Hello!
> 
> (In reply to comment #0)
> > ebuild in this port tries to pass arguments to configure script in wrong way.
> > For example, to specify path to find OpenSSL, it passes
> > "--with-openssl=${EPREFIX}/usr/lib" argument while script expects two separate
> > arguments "--with-openssl --with-openssl-prefix=${EPREFIX}".
> 
> Is there a specific error that you get without the patch, anythig that we can
> test against?
> 

When I try to emerge aria2-1.10.0 with flags:
USE="bittorrent metalink nls ssl -ares -expat -gnutls -scripts -sqlite -test -xmlrpc"

, I get error on configure phase:
configure: error: bittorrent is requested but cannot be enabled with current configuration. Make sure that dependent libraries are installed and configure script options are correct.

It's caused by absence of SSL library since there was bad parameters passed to configure script ("--with-openssl=/Gentoo/usr/lib" instead of "--with-openssl --with-openssl-prefix=/Gentoo")
 
> 
> > I tried to fix it, it worked, but still needs polishing. My ebuild is in
> > attachment.
> 
> Thanks.  In the future, please attached patches rather than ebuilds.  Thanks!
>

Was too lazy. Sorry, won't happen again :)
 
> 
> > I also noticed that list of enabled functions after configure still does not
> > correspond to list of USE flags.
> 
> I'm not sure what you mean by that.  could you explain in more detail, please?

My ebuild manages to emerge aria2, but with wrong set of features. With the same USE-flags:
USE="bittorrent metalink nls ssl -ares -expat -gnutls -scripts -sqlite -test -xmlrpc"

configure script is started with parameters:
./configure --prefix=/Gentoo/usr --build=x86_64-apple-darwin9 --host=x86_64-apple-darwin9 --mandir=/Gentoo/usr/share/man --infodir=/Gentoo/usr/share/info --datadir=/Gentoo/usr/share --sysconfdir=/Gentoo/etc --localstatedir=/Gentoo/var/lib --enable-epoll --enable-threads=posix --with-libz --enable-nls --enable-metalink --without-sqlite3 --enable-bittorrent --without-libcares --without-libexpat --with-libxml2 --without-gnutls --with-openssl --with-openssl-prefix=/Gentoo

and the final set of features are:

Build:          x86_64-apple-darwin9
Target:         x86_64-apple-darwin9
Install prefix: /Gentoo/usr
CXXFLAGS:       -O2 -pipe -march=nocona
CFLAGS:         -O2 -pipe -march=nocona
CPPFLAGS:       -I/Gentoo/usr/include   -I/Gentoo/usr/include   -I/Gentoo/usr/include/libxml2 
LDFLAGS:        -Wl,-dead_strip_dylibs
LIBS:           -L/Gentoo/usr/lib -lz   -L/Gentoo/usr/lib -lssl -lcrypto -lz   -L/Gentoo/usr/lib -lxml2 -lz -lpthread -liconv -lm 
DEFS:           -DHAVE_CONFIG_H
SQLite3:        
GnuTLS:         
OpenSSL:        yes
CA Bundle:      
LibXML2:        yes
LibExpat:       
LibCares:       
Zlib:           yes
Epoll:          
Bittorrent:     yes
Metalink:       yes
XML-RPC:        yes

XML-RPC is on despite of turned off USE-flag.
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2012-01-16 03:11:17 UTC
First the prefix overlay needs to be synced (updated) to match gentoo-x86.
Comment 5 Fabian Groffen gentoo-dev 2012-01-16 07:49:54 UTC
I synced, then committed this diff:

--- aria2-1.14.1.ebuild (revision 60314)
+++ aria2-1.14.1.ebuild (working copy)
@@ -59,11 +59,13 @@
 src_configure() {
        local myconf="--without-gnutls --without-openssl"
        use ssl && \
-               myconf="$(use_with gnutls) $(use_with !gnutls openssl "${EPREFIX}"/usr/$(get_libdir))"
+               myconf="$(use_with gnutls) \
+               $(use_with !gnutls openssl) \
+               $(use_with !gnutls openssl-prefix "${EPREFIX}")"
 
        local xmllib="--without-libexpat --without-libxml2"
        if use metalink || use xmlrpc ; then
-               xmllib="$(use_with expat libexpat "${EPREFIX}"/usr/$(get_libdir)) $(use_with !expat libxml2)"
+               xmllib="$(use_with expat libexpat) $(use_with expat libexpat-prefix "${EPREFIX}") $(use_with !expat libxml2)"
        fi 
 
        use doc || export ac_cv_path_ASCIIDOC=
@@ -81,9 +83,11 @@
                --with-libz \
                $(use_enable nls) \
                $(use_enable metalink) \
-               $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir)) \
+               $(use_with sqlite sqlite3) \
+               $(use_with sqlite sqlite3-prefix "${EPREFIX}") \
                $(use_enable bittorrent) \
                $(use_with ares libcares "${EPREFIX}"/usr/$(get_libdir)) \
+               $(use_with ares libcares-prefix "${EPREFIX}") \
                --without-libnettle --without-libgmp \
                ${xmllib} \
                ${myconf}
Comment 6 Tiziano Müller (RETIRED) gentoo-dev 2012-01-16 08:07:04 UTC
Well, --with-libgcrypt-prefix=... is probably also needed when using gnutls instead of openssl.

I just added the "--with-libgcrypt" to make it obvious (wouldn't be needed as the gcrypt-dep only is being used when gnutls is selected), but for prefix it's probably more important.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-24 12:00:07 UTC
Seems to no longer apply to current versions.