Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136643 - bc --mathlib doesn't work with bc-1.06.94
Summary: bc --mathlib doesn't work with bc-1.06.94
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 136847 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-13 05:01 UTC by Robin Stocker
Modified: 2006-09-05 08:15 UTC (History)
7 users (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 Robin Stocker 2006-06-13 05:01:45 UTC
# Previous version works as expected

$ bc --mathlib
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
1 / 2
.50000000000000000000
scale
20
s(1)
.84147098480789650665


# Newest one doesn't load mathlib.

$ bc --mathlib
bc 1.06.94
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
1 / 2
0
scale
0
s(1)
Runtime error (func=(main), adr=3): Function s not defined.
Comment 1 Robin Stocker 2006-06-13 05:12:27 UTC
The following change to the ebuild fixes it, but it isn't very nice:

--- /usr/portage/sys-devel/bc/bc-1.06.94.ebuild 2006-06-11 16:07:20.000000000 +0200
+++ /usr/local/portage/sys-devel/bc/bc-1.06.94.ebuild   2006-06-13 14:04:30.000000000 +0200
@@ -30,6 +30,7 @@
        fi
        use static && append-ldflags -static
        econf ${myconf} || die
+       touch bc/libmath.b
        emake || die
 }


The problem is that libmath.h (in the bc folder) isn't built because its timestamp is newer than the one of libmath.b and libmath.h is a useless file.

$ ls -l libmath.*
-rw-r--r-- 1 robin robin 7110 2006-06-09 19:09 libmath.b
-rw-r--r-- 1 robin robin    4 2006-06-09 19:25 libmath.h

$ cat libmath.h
{0}
Comment 2 Ken Pizzini 2006-06-14 23:40:12 UTC
I'm not sure how that version of libmath.h got into the source tarball --- it should either be the fully built libmath.h or _no_ libmath.h, not that stub version used in bootstrapping.  In the short term, yes that ugly touch command, or even a "rm -f bc/libmath.h" should serve as a work-around.  For the real fix, I'll make sure that 1.06.95 gets packaged correctly.  Thanks for pointing this out.
Comment 3 SpanKY gentoo-dev 2006-06-15 00:58:18 UTC
*** Bug 136847 has been marked as a duplicate of this bug. ***
Comment 4 Wonko 2006-09-04 16:28:19 UTC
Any idea when 1.06.95 will be available in the portage tree? Or what about a fixed 1.06.94-r1? Most people won't notice this bug, but still I consider it quite severe when basic tools like bc suddenly behave wrong.
Yeah, it's ~x86, but still...
Comment 5 Ken Pizzini 2006-09-04 16:52:34 UTC
Good question... and as fate would have it I was finally getting back to working on the .95 release.  I hope to have it out within the week.
Comment 6 SpanKY gentoo-dev 2006-09-05 00:03:07 UTC
nothing is stopping you from downgrading
Comment 7 Wonko 2006-09-05 05:53:47 UTC
I did not even upgrade yet :)  I was just wondering, no offense intended.
Comment 8 SpanKY gentoo-dev 2006-09-05 08:15:05 UTC
things get upgraded when i get time

1.06.95 now in portage