Opened 10 years ago

Closed 10 years ago

#6451 closed defect (fixed)

[with spkg, positive review] Flint uses a non-portable option to 'cp' which fails on Solaris.

Reported by: drkirkby Owned by: drkirkby
Priority: major Milestone: sage-4.1.1
Component: porting: Solaris Keywords: solaris GNUism
Cc: Merged in: sage-4.1.1.alpha0
Authors: David Kirkby Reviewers: Bill Hart, John Cremona
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

I noticed a problem when building 'sage-4.1.alpha2.spkg'. It complains

ld: fatal: library -lflint: not found

But the flint package indicates it was installed. However, when I tried to build flint again, I see this error message:

Deleting old FLINT
Installing new library file
cp: illegal option -- a
Usage: cp [-f] [-i] [-p] [-@] f1 f2
        cp [-f] [-i] [-p] [-@] f1 ... fn d1
        cp -r|-R [-H|-L|-P] [-f] [-i] [-p] [-@] d1 ... dn-1 dn

It's clear flint is making use of some GNU-specific option to 'cp' The fact the copy fails means of course the library does not get installed.

I'll post a fix later - it should be trivial

Change History (5)

comment:1 Changed 10 years ago by drkirkby

  • Owner changed from tbd to drkirkby
  • Status changed from new to assigned
  • Summary changed from Fint uses a non-portable option to 'cp' which fails on Solaris. to [with patch; needs review] Fint uses a non-portable option to 'cp' which fails on Solaris.

One of the easier patches - it just needed one byte changed. In spkg-install:

  $CP -a libflint* "$SAGE_LOCAL/lib/"

was changed to

  $CP -p libflint* "$SAGE_LOCAL/lib/"

See http://sage.math.washington.edu/home/kirkby/Solaris-fixes/flint/

comment:2 Changed 10 years ago by wbhart

  • Summary changed from [with patch; needs review] Fint uses a non-portable option to 'cp' which fails on Solaris. to [with patch; with positive review] Fint uses a non-portable option to 'cp' which fails on Solaris.

The patch posted here:

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/flint/spkg-install.patch

changes the -a option to cp to -p. I have checked that -a is exactly equivalent to -dpR. Here R is not relevant as only one file is copied and R is for recursive. The -d is not relevant as it is for symbolic links and is again not relevant for copying a single actual file.

The -p option is indeed available on Solaris and T2, so the patch is good. The patch is clearly conservative.

Note this is not an issue with FLINT itself, but with the FLINT spkg installer.

comment:3 Changed 10 years ago by cremona

  • Summary changed from [with patch; with positive review] Fint uses a non-portable option to 'cp' which fails on Solaris. to [with patch; with positive review] Flint uses a non-portable option to 'cp' which fails on Solaris.

comment:4 Changed 10 years ago by mvngu

  • Authors set to David Kirkby
  • Reviewers set to Bill Hart, John Cremona
  • Summary changed from [with patch; with positive review] Flint uses a non-portable option to 'cp' which fails on Solaris. to [with spkg, positive review] Flint uses a non-portable option to 'cp' which fails on Solaris.

The spkg posted by David Kirkby didn't check in all changes. I've checked in the changes in David's name. The updated spkg is up at

http://sage.math.washington.edu/home/mvngu/patch/flint-1.3.0.p2.spkg

Just to let people know, the updated spkg has been merged in sage-4.1.1-alpha0. I can't close this ticket because I don't have the privilege to do so. Sorry, folks :-(

comment:5 Changed 10 years ago by mvngu

  • Merged in set to sage-4.1.1.alpha0
  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.