Opened 11 years ago

Closed 9 years ago

#7832 closed defect (duplicate)

singular-3-1-0-4-20090818.p2 - fix compilation on FreeBSD

Reported by: pjeremy Owned by: pjeremy
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: porting: BSD Keywords:
Cc: Merged in:
Authors: Reviewers: Stephen Montgomery-Smith
Report Upstream: Fixed upstream, in a later stable release. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


By default, you get the following, which is corrected by the patch to

make[2]: Entering directory `/home/peter/sage/sage-4.3/spkg/build/singular-3-1-0-4-20090818.p2/src'
make[2]: *** No rule to make target `distclean'.  Stop.
make[2]: Leaving directory `/home/peter/sage/sage-4.3/spkg/build/singular-3-1-0-4-20090818.p2/src'
rm: /home/peter/sage/sage-4.3/local/bin/Singular*: No such file or directory
creating cache ./config.cache
checking uname for singular... unknown
configure: error: Unknown architecture: Check
Unable to configure Singular.

Correct configure script for amd64 by patching the autoconf inputs and re-running autoconf. This corrects a problem where linking reports lots of undefined references to both internal om* functions and functions within libncurses.

Several other trivial fixes to support dynamic linking on FreeBSD/amd64.

Attachments (1)

7832.singular.patch (4.3 KB) - added by pjeremy 11 years ago.

Download all attachments as: .zip

Change History (12)

Changed 11 years ago by pjeremy

comment:1 Changed 11 years ago by pjeremy

  • Status changed from new to needs_review

comment:2 Changed 11 years ago by drkirkby

  • Status changed from needs_review to needs_work

Unless I am mistaken, you have modified the singular sources directly, which is not permitted. Instead, you should create new versions of the files, put them in the 'patches' directory, and have something in spkg-install like

cp patch/ src/kernel/

Likewise, you should not change the configure script, or, but instead have

cp patches/configure src/

and created a diff file between the old and the new and put that in the patches directory.

Once that is done, it would need testing on Solaris, OS X and Linux in addition to FreeBSD.


comment:3 Changed 9 years ago by kcrisman

Apparently the following attached patch was all that was needed for now by Stephen Montgomery-Smith. This could be due to the fairly major upgrades in Singular.

--- singular-3-1-3-3.p3/src/omalloc/configure-orig	2012-01-21 19:51:08.000000000 +0000
+++ singular-3-1-3-3.p3/src/omalloc/configure	2012-01-21 19:51:32.000000000 +0000
@@ -1293,9 +1293,6 @@
   echo "$ac_t""no" 1>&6
-if test "$ac_cv_prog_AR" != ar; then
-  { echo "configure: error: *** ar program not found" 1>&2; exit 1; }
 for ac_prog in perl
 # Extract the first word of "$ac_prog", so it can be a program name with args.

comment:4 Changed 9 years ago by stephen

The patch by Stephen Montgomery-Smith, reported above by kcrisman, is only needed because when building using the FreeBSD port math/sage, the program ar is replaced by another program.

It would be really great if these three lines could be removed from the configure file. As best as I can tell, they serve no purpose whatsoever for any OS.

comment:5 Changed 9 years ago by kcrisman

  • Authors Peter Jeremy deleted
  • Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. Little or no feedback.

I've reported this upstream at this Singular ticket.

comment:6 Changed 9 years ago by roed

  • Report Upstream changed from Reported upstream. Little or no feedback. to Reported upstream. No feedback yet.

comment:7 Changed 9 years ago by kcrisman

  • Authors set to Stephen Montgomery-Smith
  • Report Upstream changed from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.

I quote from the ticket:

fixed: do not abort configure, if ar is not found

This allows to define a different ar program
but if none is found, you are on your own.
Will be changed with the new version anyway.

This is pretty enigmatic.

Anyway, this patch and the following diff for spkg-install are doing it for the FreeBSD port.

  • singular-3-1-3-3.p6/

    old new  
    109109    patches="assert.h.diff Minor.h.patch os_x_ppc.patch \
    110110        Singular.configure.patch make_parallel.patch \
     111 omalloc.configure.patch"
    113113    if [ "$UNAME" = "CYGWIN" ]; then
    114114        patches="$patches"

This would have to be made into an spkg, of course.

comment:8 Changed 9 years ago by kcrisman

Okay, here is the current Singular code, which raises a message but doesn't stop compiling.

comment:9 Changed 9 years ago by stephen

This has been fixed in sage-5.4, because it is fixed singular-3-1-5.p1.

So I suppose this ticket can be closed.

comment:10 Changed 9 years ago by kcrisman

  • Authors Stephen Montgomery-Smith deleted
  • Milestone changed from sage-5.4 to sage-duplicate/invalid/wontfix
  • Report Upstream changed from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.
  • Reviewers set to Stephen Montgomery-Smith
  • Status changed from needs_work to positive_review

Good catch! Sorry I haven't been better about helping move the !FreeBSD stuff along; I was nearly offline much of the summer, and since you are one of the only people to have such a machine easily available who frequents these tickets, it's hard to get independent review of the tickets. Please please please keep reporting when these fixes are adopted upstream, it's so helpful! Thanks.

comment:11 Changed 9 years ago by jdemeyer

  • Resolution set to duplicate
  • Status changed from positive_review to closed

Indeed, see #13237.

Note: See TracTickets for help on using tickets.