#7440 closed defect (fixed)
optional valgrind-3.3.1 spkg doesn't build with newer GCC's
Reported by: | was | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-4.3.1 |
Component: | packages: optional | Keywords: | |
Cc: | was, david.kirkby@… | Merged in: | sage-4.3.1.rc1 |
Authors: | Tim Dumol | Reviewers: | David Kirkby |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
I tried to build the valgrind_3.3.1 spkg on ubuntu-9.10 and it quickly fails with
configure: error: Valgrind requires glibc version 2.2 - 2.7 error configuring valgrind 3.3.1 real 0m10.843s user 0m2.928s sys 0m6.640s sage: An error occurred while installing valgrind_3.3.1
Change History (20)
comment:1 Changed 13 years ago by
- Summary changed from optional valgrind spkg doesn't build with newer GCC's to optional valgrind-3.3.1 spkg doesn't build with newer GCC's
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
- Cc was added
- Report Upstream set to N/A
- Status changed from new to needs_review
A new package with the latest version of valgrind is here: http://sage.math.washington.edu/home/timdumol/valgrind-3.5.0.p0.spkg.
comment:4 Changed 13 years ago by
- Status changed from needs_review to needs_work
I tried installing this on Mac OS X 10.6 and got an error during the "configure" process:
checking build system type... i686-apple-darwin10.2.0 checking host system type... i686-apple-darwin10.2.0 checking for a supported CPU... ok (i686) checking for a 64-bit only build... no checking for a 32-bit only build... no checking for a supported OS... ok (darwin10.2.0) checking for the kernel version... unsupported (10.2.0) configure: error: Valgrind works on Darwin 9.x (Mac OS X 10.5) error configuring valgrind 3.5.0
Seems to build correctly on sage.math, for what that's worth.
Once the OS X issue is worked out, other people should definitely look at this; I don't think I'm qualified to review it properly.
comment:5 Changed 13 years ago by
Despite the message "Valgrind works on Darwin 9.x", that Valgrind spkg has never built on OS X. Valgrind was Linux only. I recently heard that it was ported to OS X, but I'm not sure if that is really the case. Mabshoff used to tell me that it would be ported any day now...
comment:6 Changed 13 years ago by
- Status changed from needs_work to needs_review
I believe OS X 10.6 is Darwin 10.x, which Valgrind indeed does not support. I have uploaded a new version of the package which checks for the release version here: http://sage.math.washington.edu/home/timdumol/valgrind-3.5.0.p0.spkg.
comment:7 follow-up: ↓ 11 Changed 13 years ago by
- Status changed from needs_review to needs_work
This has a portability bug. 'uname' will will called with the '-p' option on any non-Linux system. But '-p' is not a POSIX option for uname.
http://www.opengroup.org/onlinepubs/9699919799/utilities/uname.html
so there is no reason any system should support the -p option. If you need to test the processor type, make sure the test is only done on platforms where you know the -p option is supported. HP-UX is one platform where this will fail, and I expect there are others too.
$ uname -a HP-UX hpbox B.11.11 U 9000/785 2016698240 unlimited-user license $ uname -p uname: illegal option -- p usage: uname [-amnrsvil] [-S nodename]
Dave
comment:8 Changed 13 years ago by
- Cc david.kirkby@… added
comment:9 Changed 13 years ago by
- Reviewers set to David Kirkby
comment:10 Changed 13 years ago by
FYI: Valgrind doesn't make any sense on any platforms that don't support 'uname -p'. The only supported platforms for the latest Valgrind are: X86/Linux, AMD64/Linux, PPC32/Linux, PPC64/Linux, and X86/Darwin (Mac OS X). These all support uname -p.
comment:11 in reply to: ↑ 7 Changed 13 years ago by
- Status changed from needs_work to needs_review
Replying to drkirkby:
This has a portability bug. 'uname' will will called with the '-p' option on any non-Linux system. But '-p' is not a POSIX option for uname.
I do not believe this is a problem, since uname -p
will only be called on Linux and Darwin platforms because of boolean logic shortcircuiting, e.g.:
[timdumol@tim-pc sage]$ if [ -z "" ] && [ -z "`error`" ]; then echo "Success"; fi bash: error: command not found Success [timdumol@tim-pc sage]$ if [ -n "" ] && [ -z "`error`" ]; then echo "Success"; fi
comment:12 Changed 13 years ago by
- Status changed from needs_review to positive_review
First, merry Christmas to you both.
William asked me the other day to check what optional packages installed on Solaris. Valgind did not install, but did give a helpful error message, indicating why. That's much better than executing a command which will fail. So I believe the fact Valgind does not work on Solaris, AIX, HP-UX etc is a not an excuse for sloppy programming - there is enough of that in Sage anyway!
William's use of:
elif [ `uname` = "SunOS" -a "`uname -p`" != "sparc" ]; then
in an early version of 'prereq' did cause an issue on HP-UX, with the -p option creating problems - see #7156.
Tim's version is written slighlty different, using the preffered '&&' instead of '-a'. The use of '-a' is deprecated and discouraged by POSIX
http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
so perhaps Tim's arugument is valid. On reflection, I agree with Tim.
However, as my grandmother used to say, the proof of the pudding is in the eating, so I tested this on HP-UX, where sage-4.2.1 is installed.
valgrind-3.5.0.p0/patches/sage.supp Finished extraction **************************************************** Host system uname -a: HP-UX hpbox B.11.11 U 9000/785 2016698240 unlimited-user license **************************************************** **************************************************** CC Version gcc -v Using built-in specs. Target: hppa1.1-hp-hpux11.11 Configured with: /tmp/gcc-4.3.3.tar.gz/gcc-4.3.3/configure --host=hppa1.1-hp-hpux11.11 --target=hppa1.1-hp-hpux11.11 --build=hppa1.1-hp-hpux11.11 --prefix=/opt/hp-gcc-4.3.3 --with-gnu-as --without-gnu-ld --enable-threads=posix --enable-languages=c,c++ --with-gmp=/proj/opensrc/be/hppa1.1-hp-hpux11.11 --with-mpfr=/proj/opensrc/be/hppa1.1-hp-hpux11.11 Thread model: posix gcc version 4.3.3 (GCC) **************************************************** Sorry, Valgrind only works on X86/Linux, AMD64/Linux, PPC32/Linux, PPC64/Linux and X86/Darwin 9.x (Mac OS X 10.5.x) real 0m0.020s user 0m0.020s sys 0m0.010s sage: An error occurred while installing valgrind-3.5.0.p0
So I would have to agree, the spkg-install does work properly, even on HP-UX. The error message is helpful too. The spkg-install does not fail as I initially expected it would, so I'm changing this to positive review.
Dave
comment:13 follow-up: ↓ 15 Changed 13 years ago by
- Status changed from positive_review to needs_work
BTW, I just noticed that Michael Abshoff is the noted as the package maintainer in SPKG.txt. #7738 says he should be removed from all packages, and specificially lists Valgrind. Hence I believe this would be a good oppotunity to remove Michael's name. Does time want to take on the role?
As such, I'm swapping this back to 'needs work'. It would seem silly to update a package, without addressing this minor issue. Otherwise, I'm happy with this, so will change it back to positive when its done.
Dave
comment:14 Changed 13 years ago by
That was supposed to be 'does Tim want to take on the role?', not 'time' as I said.
comment:15 in reply to: ↑ 13 Changed 13 years ago by
- Status changed from needs_work to needs_review
Replying to drkirkby:
BTW, I just noticed that Michael Abshoff is the noted as the package maintainer in SPKG.txt. #7738 says he should be removed from all packages, and specificially lists Valgrind. Hence I believe this would be a good oppotunity to remove Michael's name. Does time want to take on the role?
As such, I'm swapping this back to 'needs work'. It would seem silly to update a package, without addressing this minor issue. Otherwise, I'm happy with this, so will change it back to positive when its done.
Dave
Sure, I'll be glad to. New version of spkg up at http://sage.math.washington.edu/home/timdumol/valgrind-3.5.0.p0.spkg
comment:16 Changed 13 years ago by
- Status changed from needs_review to positive_review
Due to the problems with Sage (disk related I believe), I unable to download this. But since the only issue was changing someone name in a text file, I'm sure there will be no problem, so I'm changing it to positive review.
comment:17 Changed 12 years ago by
- Merged in set to sage-4.3.1.rc1
- Resolution set to fixed
- Status changed from positive_review to closed
comment:18 follow-up: ↓ 20 Changed 12 years ago by
- Status changed from closed to needs_work
Now this package has a problem with the new glibc version as well.
I get:
checking for a supported CPU/OS combination... ok (amd64-linux) checking for use as an inner Valgrind... no checking for egrep... grep -E checking the GLIBC_VERSION version... unsupported version configure: error: Valgrind requires glibc version 2.2 - 2.10 error configuring valgrind 3.5.0
I use Ubuntu 10.04, and the glibc version is 2.11 .... Valgrind 3.6.0 is already out
comment:19 Changed 12 years ago by
- Status changed from needs_work to closed
Sorry I oversaw ticket #7766: http://trac.sagemath.org/sage_trac/ticket/7766
comment:20 in reply to: ↑ 18 Changed 12 years ago by
Replying to maldun:
Now this package has a problem with the new glibc version as well.
As a general rule, don't reopen a ticket once it is closed. Open a new ticket instead.
I sent this email to sage-devel: