Opened 12 years ago
Last modified 10 years ago
#8783 closed defect
frobby optional spkg doesn't build with newer GCC's — at Version 13
Reported by: | was | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | packages: optional | Keywords: | sd32 |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Fixed upstream, in a later stable release. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
frobby-0.7.6/src/test/transform/t3.gen.m2 frobby-0.7.6/src/test/transform/t3.gen.nm Finished extraction **************************************************** Host system uname -a: Linux eno 2.6.32.10-90.fc12.x86_64 #1 SMP Tue Mar 23 09:47:08 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux **************************************************** **************************************************** CC Version gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/gcc-4.5.0/x86_64-Linux- core2-fc/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /usr/local/gcc-4.5.0/src/gcc-4.5.0/configure --enable- languages=c,c++,fortran --with-gnu-as --with-gnu- as=/usr/local/binutils-2.20.1/x86_64-Linux-core2-fc-gcc-4.4.3-rh/bin/as --with-gnu-ld --with-ld=/usr/local/binutils-2.20.1/x86_64-Linux-core2-fc- gcc-4.4.3-rh/bin/ld --with-gmp=/usr/local/mpir-1.2.2/x86_64-Linux-core2 -fc-gcc-4.4.2 --with-mpfr=/usr/local/mpfr-2.4.2/x86_64-Linux-core2-fc- mpir-1.2.2-gcc-4.4.2 --with-mpc=/usr/local/mpc-0.8.1/x86_64-Linux-core2 -fc-mpfr-2.4.2-mpir-1.2.2-gcc-4.4.3-rh --prefix=/usr/local/gcc-4.5.0/x86_64-Linux-core2-fc Thread model: posix gcc version 4.5.0 (GCC) **************************************************** mkdir -p bin/release/ g++ -Wall -ansi -pedantic -Wextra -Wno-uninitialized -Wno-unused- parameter -Werror -isystem /home/wstein/screen/eno/sage-4.3/local/include -O3 -c src/main.cpp -o bin/release/main.o src/main.cpp: In function ‘int main(int, const char**)’: src/main.cpp:30:16: error: ‘srand’ was not declared in this scope make: *** [bin/release/main.o] Error 1 Error building Frobby. real 0m0.614s user 0m0.283s sys 0m0.052s sage: An error occurred while installing frobby-0.7.6 Please email sage-devel http://groups.google.com/group/sag
Change History (13)
comment:1 Changed 12 years ago by
- Report Upstream changed from N/A to Reported upstream. Little or no feedback.
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
- Report Upstream changed from Reported upstream. Little or no feedback. to Fixed upstream, in a later stable release.
Hi William, Yes, it is just a question of a few extra includes. I haven't fixed it since I was making a new release of Frobby anyway. That new release has become rather large since that has been convenient for my research, and so it is taking longer than expected. I'll submit a fix once I get back from this conference next week. Cheers Bjarke
comment:4 Changed 12 years ago by
The error in the ticket mentions srand. What I do is google srand and I get e.g. http://www.cplusplus.com/reference/clibrary/cstdlib/srand/ it says it is in cstdlib, so add #include <cstdlib> to the cpp file that is having a problem. Then likely another file will have the same problem due to the same or another missing header, and after a few iterations of this the problem should be solved. Most likely all the missing includes are in cpp files, though it is possible that a header might miss something too. The problem is caused by older versions of GCC having header A also pull in header B without the standard saying that it should do so (which is allowed but unfortunate). The newer version of header A in a newer GCC then stops pulling in header B, and suddenly it becomes apparent that header B should have been included where A was also included, but before it was invisible that this should have happened. Cheers Bjarke
comment:5 Changed 12 years ago by
Note, gcc 4.5 is not the latest gcc, but gcc 4.4.4 is: See
News April 29, 2010 GCC 4.4.4 has been released. April 14, 2010 GCC 4.5.0 has been released.
Dave
comment:6 follow-up: ↓ 7 Changed 12 years ago by
Even with gcc-4.4.3, Frobby doesn't build.
If somebody doesn't post a new frobby spkg on this ticket for review this week, I'm moving the frobby spkg to "experimental".
-- William
comment:7 in reply to: ↑ 6 Changed 12 years ago by
Replying to was:
Even with gcc-4.4.3, Frobby doesn't build.
If somebody doesn't post a new frobby spkg on this ticket for review this week, I'm moving the frobby spkg to "experimental".
-- William
I wish you would clarify in the developers handbook, or even just on sage-devel, what is the difference between "optional" and "experimental".
Dave
comment:8 Changed 12 years ago by
I have moved Frobby from optional to experimental. I'll move it back when this problem is addressed.
comment:9 Changed 12 years ago by
- Status changed from new to needs_review
I've had some problems on this because I don't have access to a computer that both has Sage on it and that at the same time has a recent enough version of GCC that this issue comes up. What I've done is patch the spkg so that the Frobby code in it compiles on a Cygwin machine I've got, and then I've tested that it still installs on sage.math, which I've recently gotten access to. So if we are lucky this will work, though someone with both Sage and a recent version of gcc should check it. I put the spkg here:
http://sage.math.washington.edu/home/bjarke/frobby-0.7.6.p1.spkg
comment:10 Changed 12 years ago by
- Status changed from needs_review to needs_work
I looked at this for 1 minute:
(1) There are some tmp ~ files laying around
wstein@sage:~/tmp/frobby-0.7.6.p1$ ls patches spkg-check spkg-install spkg-install~ SPKG.txt SPKG.txt~ src wstein@sage:~/tmp/frobby-0.7.6.p1$ rm *~
(2) The hg repo has lots of files that have been added but not checked in:
wstein@sage:~/tmp/frobby-0.7.6.p1$ ls patches spkg-check spkg-install SPKG.txt src wstein@sage:~/tmp/frobby-0.7.6.p1$ hg status M SPKG.txt M spkg-install A patches/Makefile A patches/Makefile.patch A patches/src/Action.cpp A patches/src/Action.cpp.patch A patches/src/BoolParameter.cpp A patches/src/BoolParameter.cpp.patch A patches/src/Ideal.h A patches/src/Ideal.h.patch A patches/src/IntegerParameter.cpp A patches/src/IntegerParameter.cpp.patch A patches/src/Minimizer.cpp A patches/src/Minimizer.cpp.patch A patches/src/Parameter.cpp A patches/src/Parameter.cpp.patch A patches/src/ParameterGroup.cpp A patches/src/ParameterGroup.cpp.patch A patches/src/Scanner.cpp A patches/src/Scanner.cpp.patch A patches/src/VarNames.cpp A patches/src/VarNames.cpp.patch A patches/src/dynamicFrobeniusAlgorithm.cpp A patches/src/dynamicFrobeniusAlgorithm.cpp.patch A patches/src/frobbyTest.cpp A patches/src/frobbyTest.cpp.patch A patches/src/main.cpp A patches/src/main.cpp.patch A patches/src/randomDataGenerators.cpp A patches/src/randomDataGenerators.cpp.patch wstein@sage:~/tmp/frobby-0.7.6.p1$
(3) I don't understand why *upstream* -- i.e., the *author* of frobby-- is adding a ton of patches to his own code. Why not just fix the src/ directly?
comment:11 Changed 12 years ago by
That said, Frobby *does* build with GCC-4.5.0, which is great news!!
if [ -f bin/release/frobby.exe ]; then \ mv -f bin/release/frobby.exe bin/release/frobby; \ fi strip bin/release/frobby cd bin; rm -f frobby; link ../bin/release/frobby frobby; cd .. real 0m47.042s user 0m40.332s sys 0m4.577s Successfully installed frobby-0.7.6.p1 Now cleaning up tmp files. Making Sage/Python scripts relocatable... Making script relocatable Finished installing frobby-0.7.6.p1.spkg [wstein@eno sage-4.4.4]$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/gcc-4.5.0/x86_64-Linux-core2-fc/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /usr/local/gcc-4.5.0/src/gcc-4.5.0/configure --enable-languages=c,c++,fortran --with-gnu-as --with-gnu-as=/usr/local/binutils-2.20.1/x86_64-Linux-core2-fc-gcc-4.4.3-rh/bin/as --with-gnu-ld --with-ld=/usr/local/binutils-2.20.1/x86_64-Linux-core2-fc-gcc-4.4.3-rh/bin/ld --with-gmp=/usr/local/mpir-1.2.2/x86_64-Linux-core2-fc-gcc-4.4.2 --with-mpfr=/usr/local/mpfr-2.4.2/x86_64-Linux-core2-fc-mpir-1.2.2-gcc-4.4.2 --with-mpc=/usr/local/mpc-0.8.1/x86_64-Linux-core2-fc-mpfr-2.4.2-mpir-1.2.2-gcc-4.4.3-rh --prefix=/usr/local/gcc-4.5.0/x86_64-Linux-core2-fc Thread model: posix gcc version 4.5.0 (GCC) [wstein@eno sage-4.4.4]$
comment:12 Changed 12 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
comment:13 Changed 12 years ago by
- Description modified (diff)
(Oops, I put my response as the description. Now fixed.)
Thanks for the prompt review. I committed the outstanding files in the repository and removed the two ~ files. The result is up in the same place:
http://sage.math.washington.edu/home/bjarke/frobby-0.7.6.p1.spkg
I'm adding patches rather than edit src/ because as I understand it the code in src/ must be an official release of the upstream code. No version 0.7.6 of Frobby exists that compiles under gcc 4.3.0, and I'd rather add some patches here than make an official release of an old version.
Note that this still builds on sage.math with GCC-4.2.4... But it doesn't build on Skynet with newer GCC's.