Ticket #7832 (closed defect: duplicate)

Opened 3 years ago

Last modified 9 months ago

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: Work issues:
Report Upstream: Fixed upstream, in a later stable release. Reviewers: Stephen Montgomery-Smith
Authors: Merged in:
Dependencies: Stopgaps:

Description

By default, you get the following, which is corrected by the patch to singuname.sh:

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 singuname.sh
Unable to configure Singular.

Correct configure script for amd64 by patching the autoconf inputs and re-running autoconf. This corrects a problem where linking libsingular.so 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

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

Change History

Changed 3 years ago by pjeremy

comment:1 Changed 3 years ago by pjeremy

  • Status changed from new to needs_review

comment:2 Changed 3 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/mod_raw.cc src/kernel/mod_raw.cc

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

cp patches/configure src/

and created a diff file between the old configure.ac and the new configure.ac 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.

Dave

comment:3 Changed 17 months 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
 fi
 
-if test "$ac_cv_prog_AR" != ar; then
-  { echo "configure: error: *** ar program not found" 1>&2; exit 1; }
-fi
 for ac_prog in perl
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.

comment:4 Changed 15 months 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 14 months ago by kcrisman

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

I've reported this upstream at  this Singular ticket.

comment:6 Changed 13 months ago by roed

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

comment:7 Changed 12 months ago by kcrisman

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

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  
    108108 
    109109    patches="assert.h.diff sing_win.cc.diff Minor.h.patch os_x_ppc.patch \ 
    110110        Singular.configure.patch make_parallel.patch Singular.Makefile.in.shared.patch \ 
    111         factory.GNUmakefile.in.patch" 
     111        factory.GNUmakefile.in.patch omalloc.configure.patch" 
    112112 
    113113    if [ "$UNAME" = "CYGWIN" ]; then 
    114114        patches="$patches IntegerProgramming-Makefile.in.diff" 

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

comment:8 Changed 12 months ago by kcrisman

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

comment:9 Changed 9 months 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 months ago by kcrisman

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

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 months ago by jdemeyer

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

Indeed, see #13237.

Note: See TracTickets for help on using tickets.