Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3940 - libmcrypt won't compile
Summary: libmcrypt won't compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-20 15:22 UTC by Jon Nelson (RETIRED)
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Nelson (RETIRED) 2002-06-20 15:22:45 UTC
Trying to build libmcrypt (2.5.1, no -r), yields me this:

configure: running /bin/sh './configure' --prefix=/usr  '--prefix=/usr'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share'
'--sysconfdir=/etc' '--localstatedir=/var/lib' '--disable-posix-threads'
'CFLAGS=-mcpu=i686 -O3 -pipe -g' 'LDFLAGS=-g' --enable-ltdl-install=no
--cache-file=/dev/null --srcdir=.
configure: warning: CFLAGS=-mcpu=i686 -O3 -pipe -g: invalid host type
configure: warning: LDFLAGS=-g: invalid host type
configure: error: can only configure for one host and one target at a time
configure: error: /bin/sh './configure' failed for libltdl

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_compile, Line -112, Exitcode 1
!!! (no error message)

!!! emerge aborting on  /usr/portage/dev-libs/libmcrypt/libmcrypt-2.5.1.ebuild .

SO....
I edited the ebuild (into -r1) and through trial and error and headache,
determined that the following changes are necessary to get it to work:

--- libmcrypt-2.5.1.ebuild      2002-06-17 10:19:59.000000000 -0500
+++ libmcrypt-2.5.1-r1.ebuild   2002-06-20 15:17:55.000000000 -0500
@@ -18,6 +18,8 @@
        # Doesn't work with --host bug #3517
         # econf --host=${CHOST} \ 
 
+    export WANT_AUTOMAKE_1_6=1
+       autoreconf --force --install --symlink || die
        econf --disable-posix-threads || die
 
        # PHP manual states to disable posix threads, no further explanation
given, but i'll



Also please note that AUTOMAKE-1.6 *should* be the default whenever 1.5 could be
used -- it's actually less buggy and scary and "more" compatible, but I'm sure
that's not your department.

;-)
Comment 1 Gabriele Giorgetti 2002-06-20 18:22:28 UTC
Patch applied.
I use automake and the other autotools in my C projects, but every version is
the same to me :) kidding.

How is it going with Boa ? :)
 
Comment 2 Jon Nelson (RETIRED) 2002-06-20 19:20:20 UTC
Boa is just peachy. Thanks for asking! Look for a new release RSN.
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2002-06-24 08:54:41 UTC
the configure fails for libltdl not libmcrypt.

Anyway, as for the libtool fixes you've proposed, that created a whole host of
other warnings.  Wasn't pretty at all with the output.  I've implemented an
alternate fix -- would you please test that? It's masked..
Comment 4 Jon Nelson (RETIRED) 2002-06-24 09:20:26 UTC
First, it's not masked!
Second, it doesn't work anymore.
As for the warnings, that shouldn't matter so long as warnings != errors. ;-)

configure: running /bin/sh './configure' --prefix=/usr  '--prefix=/usr'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share'
'--sysconfdir=/etc' '--localstatedir=/var/lib' '--disable-posix-threads'
'CFLAGS=-mcpu=i686 -O3 -pipe -g' 'LDFLAGS=-g' --enable-ltdl-install=no
--cache-file=/dev/null --srcdir=.
configure: warning: CFLAGS=-mcpu=i686 -O3 -pipe -g: invalid host type
configure: warning: LDFLAGS=-g: invalid host type
configure: error: can only configure for one host and one target at a time
configure: error: /bin/sh './configure' failed for libltdl

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_compile, Line -107, Exitcode 1
!!! (no error message)

!!! emerge aborting on  /usr/portage/dev-libs/libmcrypt/libmcrypt-2.5.1-r2.ebuild .
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2002-06-25 19:12:11 UTC
check -r2
Comment 6 Jon Nelson (RETIRED) 2002-06-25 19:22:18 UTC
Um, I *did*.  Pasting from my prior message:

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_compile, Line -107, Exitcode 1
!!! (no error message)

!!! emerge aborting on  /usr/portage/dev-libs/libmcrypt/libmcrypt-2.5.1-r2.ebuild .


Still not fixed.
Comment 7 Nicholas Jones (RETIRED) gentoo-dev 2002-06-29 14:21:43 UTC
What's your CHOST line? libtool doesn't do anything but i[3456]86.

Looks to me like that's what the complaint is...
Comment 8 Jon Nelson (RETIRED) 2002-06-29 16:57:27 UTC
CHOST=i686-pc-linux-gnu


The problem is *not* the CHOST variable.
It's the broken automake that was used when the package was originally built by
upstream. I really fail to see what's wrong with the patch I supplied - it fixes
the (underlying) problem and despite the "warnings" generated it is still a good
fix.  There might be a "better" solution out there, but not one that is likely
to work all the time.
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2002-06-29 21:56:53 UTC
Az,

Please have a look at this?

Thanks :)
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-30 08:36:10 UTC
Yo Jon, can you maybe just try -r2 again after a rsync or cvs update ?  I
updated our libtool stuff a day or two ago to fix a problem where some
deps was dropped.  Also maybe update libtool beforehand.
Comment 11 Jon Nelson (RETIRED) 2002-06-30 13:35:40 UTC
I am completely up-to-date as of 30 June 2002, roughly noon (CST).

I still get:

configure: running /bin/sh './configure' --prefix=/usr  '--prefix=/usr'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share'
'--sysconfdir=/etc' '--localstatedir=/var/lib' '--disable-posix-threads'
'CFLAGS=-mcpu=i686 -O3 -pipe -g' 'LDFLAGS=-g' --enable-ltdl-install=no
--cache-file=/dev/null --srcdir=.

and compilation fails.

Still no go.

Can we just please fix this problem and move on?
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-30 14:32:45 UTC
Hrm, to be honest, I dont have a problem fixing it.  The problem is that
I dont have your problem, so fixing without knowing what to fix is a bit
of a problem.
Comment 13 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-30 15:29:53 UTC
OK, try -r3, maybe just regeneration everything will do it.
Comment 14 Jon Nelson (RETIRED) 2002-06-30 16:20:08 UTC
-r3 works for me.
Yay!

There are some minor optimizations that could be made, but it looks good!

Note that my solution probably wouldn't be so noisy if WANT_AUTOCONF_2_5=1
was set also, and while I feel it's "cleaner" (and more correct), this works too.

Technically one *should* use autoreconf whenever possible, because it takes into
account when to use aclocal -I. and when not to, etc...

Perhaps using *both*
               export WANT_AUTOMAKE_1_6=1
               export WANT_AUTOCONF_2_5=1
then
       autoreconf --force --install --symlink || die

might work.

However, it's good to go for me!
Comment 15 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-30 16:26:19 UTC
Ok, great stuff.  Just to check, what CVS revision is that ebuild .. I must
confess I made changes afterwards :P
Comment 16 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-30 17:04:22 UTC
Anyhow, I did the other changes, and it works fine here.  The
autoreconf part should look as follow, so please update -r3 and test:


    # Try to fix some wierd build problems. See bug #3940.
    echo ">>> Reconfiguring package..."
    for x in $(find ${S} -name configure)
    do
        cd ${x%/*}
        export WANT_AUTOMAKE_1_6=1
        export WANT_AUTOCONF_2_5=1
        autoreconf --force --install --symlink &>${T}/autoreconf.log || ( \
            echo "DEBUG: working directory is: `pwd`" >>${T}/autoreconf.log
            eerror "Reonfigure failed, please attatch the contents of:"
            eerror
            eerror "  ${T}/autoreconf.log"
            eerror
            eerror "in your bugreport."
            # we need an error here, else the ebuild do not die
            exit 1
        ) || die "running autoreconf failed"
    done
Comment 17 Jon Nelson (RETIRED) 2002-06-30 19:02:11 UTC
revision 1.3
Comment 18 Jon Nelson (RETIRED) 2002-07-01 08:52:17 UTC
OK, one final note.
I updated this morning (Mon Jul  1 13:30 UTC 2002), and optimizied/fixed -r3 and
turned it into -r4.
The changes below are useful because *autoreconf* (note the 're'), automatically
recurses.  Other than that, the only "real" change is indenting. See below for
"real" patch and patch with diff told to ignore changes in whitespace.




--- libmcrypt-2.5.1-r3.ebuild   2002-07-01 08:36:15.000000000 -0500
+++ libmcrypt-2.5.1-r4.ebuild   2002-07-01 08:45:14.000000000 -0500
@@ -29,22 +29,18 @@

        # Try to fix some wierd build problems. See bug #3940.
        echo ">>> Reconfiguring package..."
-       for x in $(find ${S} -name configure)
-       do
-               cd ${x%/*}
-               export WANT_AUTOMAKE_1_6=1
-               export WANT_AUTOCONF_2_5=1
-               autoreconf --force --install --symlink &>${T}/autoreconf.log || ( \
-                       echo "DEBUG: working directory is: `pwd`"
>>${T}/autoreconf.log
-                       eerror "Reonfigure failed, please attatch the contents of:"
-                       eerror
-                       eerror "  ${T}/autoreconf.log"
-                       eerror
-                       eerror "in your bugreport."
-                       # we need an error here, else the ebuild do not die
-                       exit 1
-               ) || die "running autoreconf failed"
-       done
+       export WANT_AUTOMAKE_1_6=1
+       export WANT_AUTOCONF_2_5=1
+       autoreconf --force --install --symlink &>${T}/autoreconf.log || ( \
+               echo "DEBUG: working directory is: `pwd`" >>${T}/autoreconf.log
+               eerror "Reonfigure failed, please attatch the contents of:"
+               eerror
+               eerror "  ${T}/autoreconf.log"
+               eerror
+               eerror "in your bugreport."
+               # we need an error here, else the ebuild do not die
+               exit 1
+       ) || die "running autoreconf failed"
 }

 src_compile() {












--- libmcrypt-2.5.1-r3.ebuild   2002-07-01 08:36:15.000000000 -0500
+++ libmcrypt-2.5.1-r4.ebuild   2002-07-01 08:45:14.000000000 -0500
@@ -29,9 +29,6 @@
 
        # Try to fix some wierd build problems. See bug #3940.
        echo ">>> Reconfiguring package..."
-       for x in $(find ${S} -name configure)
-       do
-               cd ${x%/*}
                export WANT_AUTOMAKE_1_6=1
                export WANT_AUTOCONF_2_5=1
                autoreconf --force --install --symlink &>${T}/autoreconf.log || ( \
@@ -44,7 +41,6 @@
                        # we need an error here, else the ebuild do not die
                        exit 1
                ) || die "running autoreconf failed"
-       done
 }
 
 src_compile() {
Comment 19 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-01 13:06:54 UTC
Thanks Jon, guess I still have a lot to learn with the auto* sucko, but
with help well get there :)

Anyhow, I am commiting -r4, and closing this bug.
Comment 20 Jon Nelson (RETIRED) 2002-07-01 13:14:07 UTC
Has it actually been committed yet?
I just checked it out and no -r4 as yet.
This is -500 13:14