Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 194456 - [patch] sci-mathematics/pari-2.3.2 fails to build on HPPA
Summary: [patch] sci-mathematics/pari-2.3.2 fails to build on HPPA
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: HPPA Linux
: High critical (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 194265
  Show dependency tree
 
Reported: 2007-10-01 21:36 UTC by Jeroen Roovers (RETIRED)
Modified: 2007-10-03 16:51 UTC (History)
2 users (show)

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


Attachments
pari-2.3.2.ebuild.patch (194456-pari-2.3.2.ebuild.patch,1.44 KB, patch)
2007-10-01 22:36 UTC, Jeroen Roovers (RETIRED)
Details | Diff
pari-2.3.2-strip.patch (194456-pari-2.3.2-strip.patch,293 bytes, patch)
2007-10-01 22:37 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2007-10-01 21:36:53 UTC
sparc64:
bender /var/tmp/portage/sci-mathematics/pari-2.3.2/work/pari-2.3.2 # ./config/arch-osname
sparcv9-linux

hppa:
elmer /mnt/alt/portage-tmp/portage/sci-mathematics/pari-2.3.2/work/pari-2.3.2 # ./config/arch-osname
hppa-linux

x86:
astrid /dev/shm/portage/sci-mathematics/pari-2.3.2/work/pari-2.3.2 # ./config/arch-osname
i686-linux

Seems to work fine on at least these three arches, whereas the `cut' approach currently used in the ebuild breaks hppa at src_test and src_install as follows:

>>> Source unpacked.
>>> Compiling source in /dev/shm/portage/sci-mathematics/pari-2.3.2/work/pari-2.3.2 ...
 * Building for hppa2.0-linux
...
>>> Source compiled.
 * Testing pari kernel ...
Making test-kernel in Olinux-hppa
Please run Configure first!
make: *** [test-kernel] Error 1
  [ !! ]

>>> Install pari-2.3.2 into /dev/shm/portage/sci-mathematics/pari-2.3.2/image/ category sci-mathematics
Making install in Olinux-hppa
Please run Configure first!
make: *** [install] Error 1

I suggest the ebuild is patched accordingly:

$ cvs diff pari-2.3.2.ebuild
Index: pari-2.3.2.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/pari/pari-2.3.2.ebuild,v
retrieving revision 1.8
diff -u -B -r1.8 pari-2.3.2.ebuild
--- pari-2.3.2.ebuild   1 Oct 2007 17:03:36 -0000       1.8
+++ pari-2.3.2.ebuild   1 Oct 2007 21:16:41 -0000
@@ -29,10 +30,8 @@
 }

 src_compile() {
-       # Special handling for sparc
        local myhost
-       [ "${PROFILE_ARCH}" == "sparc64" ] && myhost="sparcv9-linux" \
-               || myhost="$(echo ${CHOST} | cut -f "1 3" -d '-')"
+       myhost="$(./config/arch-osname)"
        einfo "Building for ${myhost}"

        #need to force optimization here, as it breaks without
@@ -47,7 +46,7 @@
                --prefix=/usr \
                --datadir=/usr/share/${P} \
                --libdir=/usr/$(get_libdir) \
-               --mandir=/usr/share/man/man1 || die "./configure failed"
+               --mandir=/usr/share/man/man1 || die "./Configure failed"

        if use hppa
        then

Btw, I already (revision 1.8) removed `> /dev/null' in src_test that prevented me (and, in the long run, the ebuild maintainers as well) from analysing the problem - that's worth more than a slick `ebegin; ...; eend'.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-01 22:05:59 UTC
On further inspection, it appears that --host= is ignored completely by the Configure script, so I will attach an improved patch for the ebuild to this bug shortly.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-01 22:30:54 UTC
(In reply to comment #1)
> On further inspection, it appears that --host= is ignored completely
s|completely|partly|
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-01 22:36:33 UTC
Created attachment 132342 [details, diff]
pari-2.3.2.ebuild.patch
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-01 22:37:15 UTC
Created attachment 132343 [details, diff]
pari-2.3.2-strip.patch
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-02 04:28:54 UTC
make bench fails on both hppa and sparc, by the way. test-kernel doesn't really do anything until you run it, either, except prove that you can compile something against libpari.
Comment 6 Markus Dittrich (RETIRED) gentoo-dev 2007-10-02 12:38:19 UTC
(In reply to comment #5)
> make bench fails on both hppa and sparc, by the way. test-kernel doesn't really
> do anything until you run it, either, except prove that you can compile
> something against libpari.
> 

Thank you very much for your detailed testing on hppa and sparc. 
Unfortunately, I don't have access to either of this arches so I can't
really provide much good feedback. Much of the sparc stuff (which
you propose to remove in your patch) came from the kind help of
Ferris and was needed to get the src_test stuff running on sparc 
(see bug #141206). 
Hence, I am afraid that just removing it will break things again. 

Regarding the tests. At least on my machine "make test-kernel" does
test the kernel and compare the resulting output against some reference
data. Here's the relevant part from the makefile on x86

---------------- SNIP -------------------------------------------
test-kernel:: kerntest
        @./kerntest > gp.out;   diff -c gp.out ../src/test/32/kernel > kern.dif;        if test -s kern.dif; then echo "KERNEL BUG"; else echo OK; fi
-------------------------------------------------------------------

Clearly, pari has more testing capabilities (like make bench and such).
But until I "understand" what is going on there and what a potential
failure would mean for the functionality of pari as a whole I am hesitant to
just enable it by default.


Thanks,
Markus


Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-02 13:57:10 UTC
(In reply to comment #6)

> Clearly, pari has more testing capabilities (like make bench and such).
> But until I "understand" what is going on there and what a potential
> failure would mean for the functionality of pari as a whole I am hesitant to
> just enable it by default.

What are you talking about? The Summary still says that it doesn't even build because of the `echo | cut` logic. Even for sparc64 that logic isn't necessary and I proposed to use pari's own arch-osname logic instead of hacking something together in the ebuild.

Testing stuff is second to building it to begin with. There's a great lot with the test suite on both sparc and hppa, but this bug blocks the pari stabilisation bug because we NEED to get rid of the way $myhost is set up.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-03 04:58:13 UTC
Fixed in 2.3.2-r1...
Comment 9 Markus Dittrich (RETIRED) gentoo-dev 2007-10-03 12:56:04 UTC
(In reply to comment #7)
> What are you talking about? The Summary still says that it doesn't even build
> because of the `echo | cut` logic. Even for sparc64 that logic isn't necessary
> and I proposed to use pari's own arch-osname logic instead of hacking something
> together in the ebuild.
> 

This was part of my response to your comment that the current test routine
does not do anything.

> Testing stuff is second to building it to begin with. There's a great lot with
> the test suite on both sparc and hppa, but this bug blocks the pari
> stabilisation bug because we NEED to get rid of the way $myhost is set up.
> 

I very much agree! As I said before, I have no way of testing on sparc
and hppa. The part of the ebuild that seems to be the issue was provided
by sparc to get the testing routines to run on their arch. If they break the 
actual build process on hppa then removing them is prudent. 
It would be nice though to resurect testing on sparc and hppa at some
point.

Thanks again for your help,
Markus


Comment 10 Ferris McCormick (RETIRED) gentoo-dev 2007-10-03 13:36:06 UTC
pari-2.3.2-r1 installs fine on sparc.  As to the extended tests:  If I go the build directory (/var/tmp/portage/sci-mathematics/pari-2.3.2-r1/work/pari-2.3.2) and try 'make bench', it seems that the last test (nfields, run with ../src/test/dotest 32 nfields_200 from the Olinux-sparcv9 directory) never terminates.  Since it does terminate on amd64, it is hard to see where the problem lies, and if this is actually an indication of problems with pari, or if it is an architectural quirk.  As time permits, I'll look at it.  But the nfields script is quite long, so I do not promise a resolution.
Comment 11 Markus Dittrich (RETIRED) gentoo-dev 2007-10-03 13:44:58 UTC
(In reply to comment #10)
> pari-2.3.2-r1 installs fine on sparc.  As to the extended tests:  If I go the
> build directory

Thanks for looking into this Ferris, and this is good to know :)
Please let me know if I can be of any help.

cheers,
Markus

Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-03 14:21:35 UTC
(In reply to comment #10)
> pari-2.3.2-r1 installs fine on sparc.  As to the extended tests:  If I go the
> build directory
> (/var/tmp/portage/sci-mathematics/pari-2.3.2-r1/work/pari-2.3.2) and try 'make
> bench', it seems that the last test (nfields, run with ../src/test/dotest 32
> nfields_200 from the Olinux-sparcv9 directory) never terminates.  Since it does
> terminate on amd64, it is hard to see where the problem lies, and if this is
> actually an indication of problems with pari, or if it is an architectural
> quirk.  As time permits, I'll look at it.  But the nfields script is quite
> long, so I do not promise a resolution.

It's interesting to make test-compat too - both bench and test-compat show that either the tests are bad or that beyond x86 nothing was ever tested. There are just too many tests failing.
Comment 13 Markus Dittrich (RETIRED) gentoo-dev 2007-10-03 14:29:39 UTC
(In reply to comment #12)
> 
> It's interesting to make test-compat too - both bench and test-compat show that
> either the tests are bad or that beyond x86 nothing was ever tested. There are
> just too many tests failing.
> 

I'll ping upstream about this tonight; maybe they can shed some light
on the status of the test routines on arches other than x86.

Thanks,
Markus
Comment 14 Ferris McCormick (RETIRED) gentoo-dev 2007-10-03 15:55:16 UTC
pari-2.3.2-r1 installs fine on sparc.  As to the extended tests:  If I go the build directory (/var/tmp/portage/sci-mathematics/pari-2.3.2-r1/work/pari-2.3.2) and try 'make bench', it seems that the last test (nfields, run with ../src/test/dotest 32 nfields_200 from the Olinux-sparcv9 directory) never terminates.  Since it does terminate on amd64, it is hard to see where the problem lies, and if this is actually an indication of problems with pari, or if it is an architectural quirk.  As time permits, I'll look at it.  But the nfields script is quite long, so I do not promise a resolution.
Comment 15 Ferris McCormick (RETIRED) gentoo-dev 2007-10-03 15:59:40 UTC
Go bugzilla!  Thanks for re-adding my comment --- I guess your changes aren't perfect yet.

For me on sparc, test-compat seems to be another test which never terminates.

Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2007-10-03 16:51:02 UTC
(In reply to comment #13)
> I'll ping upstream about this tonight; maybe they can shed some light
> on the status of the test routines on arches other than x86.

Please ping them as well about the --host option not working properly -- the reason this bug exists is because --host is honoured for the compile targets but not for (some of) the test and install targets. Maybe it's a good idea to open a new (Gentoo) bug -- in the long run that should help us get src_test working properly, too.