Opened 12 years ago

Closed 19 months ago

#8973 closed defect (invalid)

surf does not build (gcc 4.4.4)

Reported by: mmezzarobba Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: experimental Keywords: sd40.5
Cc: benjaminfjones, dimpase Merged in:
Authors: Benjamin Jones Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


The experimental spkg "surf-1.1" does not build with gcc-4.4.4. The following patch works for me.

diff -ru a/surf/draw/ b/surf-1.1/surf/draw/
--- a/surf/draw/  2004-11-08 11:00:43.000000000 +0100
+++ b/surf-1.1/surf/draw/ 2010-05-15 17:48:38.663596876 +0200
@@ -38,6 +38,7 @@
 #include <IO.h>
 #include <math.h>
+#include <cstring>
 extern double Y_AXIS_LR_ROTATE;
diff -ru a/surf/image-formats/ b/surf-1.1/surf/image-formats/
--- a/surf/image-formats/ 2003-04-14 17:12:37.000000000 +0200
+++ b/surf-1.1/surf/image-formats/        2010-05-15 17:47:47.707096842 +0200
@@ -26,7 +26,8 @@
 #include <AvailableImageFormats.h>
+#include <iostream>
+#include <cstring>
 namespace ImageFormats {
@@ -87,7 +88,7 @@
                // just look for "*.extension"
-               char* ext = strrchr(filename, '.');
+               const char* ext = strrchr(filename, '.');
                if (ext == 0) {
                        return 0;
diff -ru a/surf/misc/ b/surf-1.1/surf/misc/
--- a/surf/misc/   2006-02-12 14:36:26.000000000 +0100
+++ b/surf-1.1/surf/misc/  2010-05-15 17:49:12.939096803 +0200
@@ -27,6 +27,8 @@
 #include <errno.h>
+#include <cstdlib>
 #  include <unistd.h>
diff -ru a/surf/src/ b/surf-1.1/surf/src/
--- a/surf/src/   2002-06-09 15:29:17.000000000 +0200
+++ b/surf-1.1/surf/src/  2010-05-15 17:45:32.318586702 +0200
@@ -32,8 +32,8 @@
 #include <monomarith.h>
 #include <AvailableImageFormats.h>
+#include <cstdio>
+#include <cstring>
 using namespace ScriptVar;

Change History (14)

comment:1 Changed 10 years ago by benjaminfjones

  • Cc benjaminfjones added
  • Keywords sd40.5 added

comment:2 Changed 10 years ago by benjaminfjones

  • Authors set to Benjamin Jones

I've produced a new spkg for surf-1.1 called surf-1.1.p0.

This the first spkg I've "packaged", but I followed the developer's guide so I think it's close to being proper. The existing surf-1.1.spkg was produced in 2006 and doesn't conform at all to the current standards (including not having any hg repo, no SPKG.txt, etc..) I've checked that it builds successfully on Mac OS X, sage-5.1.beta0.

On debian linux, there is a problem during ./configure. I don't have much experience with autotools, so need some help there.

configure: error: cannot find install-sh or in "." "./.." "./../.."

Please test and report back.

comment:3 Changed 10 years ago by kcrisman

I'm wondering whether we might as well use surf 1.0.6, since apparently 1.1 never appeared.

Testing nonetheless...

comment:4 Changed 10 years ago by kcrisman

On sage.math:

Making all in docs
make[2]: Entering directory `/home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/spkg/build/surf-1.1.p0/src/docs'
Updating ./version.texi
restore=: && backupdir=".am$$" && \
	am__cwd=`pwd` && cd . && \
	rm -rf $backupdir && mkdir $backupdir && \
	if (/bin/bash /home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/spkg/build/surf-1.1.p0/src/missing --run makeinfo --version) >/dev/null 2>&1; then \
	  for f in[0-9][0-9][0-9] surf.i[0-9] surf.i[0-9][0-9]; do \
	    if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
	  done; \
	else :; fi && \
	cd "$am__cwd"; \
	if /bin/bash /home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/spkg/build/surf-1.1.p0/src/missing --run makeinfo   -I . \
	 -o surf.texi; \
	then \
	  rc=0; \
	  cd .; \
	else \
	  rc=$?; \
	  cd . && \
	  $restore $backupdir/* `echo "./" | sed 's|[^/]*$||'`; \
	fi; \
	rm -rf $backupdir; exit $rc
/home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/spkg/build/surf-1.1.p0/src/missing: line 54: makeinfo: command not found
WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
make[2]: *** [] Error 1
make[2]: Leaving directory `/home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/spkg/build/surf-1.1.p0/src/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/spkg/build/surf-1.1.p0/src'
make: *** [all] Error 2
Error building PACKAGE_NAME.

real	0m33.030s
user	0m19.410s
sys	0m8.280s
Error installing package surf-1.1.p0

But the package itself built.

comment:5 Changed 10 years ago by kcrisman

Successful build all the way on Mac OS X 10.6 - it ignored a warning about help2man, otherwise seems fine.

comment:6 Changed 10 years ago by benjaminfjones

Repackaged version at now passes ./configure on debian squeeze with autoconf installed. Still working on getting it to build.

comment:7 Changed 10 years ago by kcrisman

See also #6316. Apparently Surf has become slightly higher priority since then, given that this was a "high priority" bug at Sage Days 40.5.

Also, "surfer" and even more recent post-surf things building on it might be more useful in any case.

comment:8 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:9 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:10 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:11 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:12 Changed 21 months ago by mkoeppe

  • Cc dimpase added
  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

Outdated spkg or build system ticket, should be closed

comment:13 Changed 19 months ago by mmezzarobba

  • Status changed from needs_review to positive_review

comment:14 Changed 19 months ago by chapoton

  • Resolution set to invalid
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.