Ticket #8363 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

cddlib-094f.p4 has a useless check for mpir which breaks on Solaris

Reported by: drkirkby Owned by: drkirkby
Priority: blocker Milestone: sage-4.3.4
Component: porting: Solaris Keywords:
Cc: jsp Work issues:
Report Upstream: N/A Reviewers: Jaap Spies, Minh Van Nguyen
Authors: David Kirkby Merged in: sage-4.3.4.alpha0
Dependencies: Stopgaps:

Description

spkg/install/deps shows that cddlib depends on mpir

$(INST)/$(CDDLIB): $(BASE) $(INST)/$(MPIR)
        $(SAGE_SPKG) $(CDDLIB) 2>&1

but for some reason someone has added a check in cddlib's spkg-install. This seems a bit pointless, but is causing a breakage on Solaris

# We depend on mpir, make sure it is installed (GMP fork)
MPIR_VERSION=`cd $SAGE_ROOT/spkg/standard/; ./newest_version mpir`
if [ $? -ne 0 ]; then
    echo "Failed to find mpir.  Please install the mpir spkg"
    exit 1
fi

They do not even export MPIR_VERSION, so it is a useless bit of code that is breaking on Solaris.

Also, currently cddlib will not build on 64-bit Solaris, due to the normal check that the platform is OS X:

if [ `uname` = "Darwin" ] && [ "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   CFLAGS="$CFLAGS -m64 "; export CFLAGS
fi

Both these issues are easily resolved. A patch and updated .spkg will follow shortly.

Dave

Attachments

cddlib-094f.p5.patch Download (2.1 KB) - added by drkirkby 3 years ago.
Mercurial patch
cddlib-094f.p5.spkg Download (800.6 KB) - added by drkirkby 3 years ago.
Updated package with changes to allow to work fully on Solaris.

Change History

Changed 3 years ago by drkirkby

Mercurial patch

Changed 3 years ago by drkirkby

Updated package with changes to allow to work fully on Solaris.

comment:1 Changed 3 years ago by drkirkby

  • Status changed from new to needs_review

comment:2 Changed 3 years ago by drkirkby

  • Authors set to David Kirkby

comment:3 Changed 3 years ago by jsp

Please put a link to the spkg in the ticket. An attachment does not work.

Jaap

comment:4 Changed 3 years ago by jsp

On hawk:

ld: fatal: file /usr/local/lib/libgmp.so: wrong ELF class: ELFCLASS32
ld: fatal: file processing errors. No output written to .libs/scdd_gmp
collect2: ld returned 1 exit status
make[1]: *** [scdd_gmp] Error 1
make[1]: Leaving directory `/export/home/jaap/sage_port/sage-4.3.2.alpha1/spkg/build/cddlib-094f.p5/src/src-gmp'
make: *** [all-recursive] Error 1
Error building cddlib


In my VirtualBox?:

libtool: link: gcc -m64 -o .libs/scdd_gmp simplecdd.o  -L/usr/local/lib -L/export/home/jaap/Downloads/sage-4.3.3.alpha1/local/lib ../lib-src-gmp/.libs/libcddgmp.so /export/home/jaap/Downloads/sage-4.3.3.alpha1/local/lib/libgmp.so /usr/local/lib/libgmp.so -R/export/home/jaap/Downloads/sage-4.3.3.alpha1/local/lib -R/usr/local/lib
ld: fatal: recording name conflict: file `/export/home/jaap/Downloads/sage-4.3.3.alpha1/local/lib/libgmp.so' and file `/usr/local/lib/libgmp.so' provide identical dependency names: libgmp.so.3  (possible multiple inclusion of the same file)
ld: fatal: file processing errors. No output written to .libs/scdd_gmp
collect2: ld returned 1 exit status
make[1]: *** [scdd_gmp] Error 1
make[1]: Leaving directory `/export/home/jaap/Downloads/sage-4.3.3.alpha1/spkg/build/cddlib-094f.p5/src/src-gmp'
make: *** [all-recursive] Error 1
Error building cddlib


So I think this ticket needs work.

Jaap

comment:5 Changed 3 years ago by drkirkby

Em, looks like multiple inclusion of the same libraries. I'm not sure how to solve this. I'll take a look - perhaps there is a configure option to select what library gets linked.

dave

comment:6 Changed 3 years ago by drkirkby

Thinking about this ticket, it does fix what the title says it does. In other words, it removes the useless but broken check for mpir.

I don't believe the removal of the OS X restriction for a 64-bit build can do any harm and its failure to work probably has more to do with the multiple inclusion of libraries.

As such, I believe this should get a positive review.

The fact it does not build on OpenSolaris is another issue.

Dave

comment:7 Changed 3 years ago by mvngu

Packages should not be attached to tickets. Instead, provide a URL to the spkg. David's updated spkg is available at

 http://sage.math.washington.edu/home/mvngu/spkg/standard/cddlib/cddlib-094f.p5.spkg

comment:8 Changed 3 years ago by drkirkby

  • Priority changed from major to blocker

Updating to blocker, as this is essential for a successful Solaris build, which with care should build and pass all doc tests.

comment:9 Changed 3 years ago by mvngu

  • Status changed from needs_review to positive_review
  • Reviewers set to Jaap Spies, Minh Van Nguyen

I'm happy with the changes in cddlib-094f.p5.spkg.

comment:10 Changed 3 years ago by drkirkby

Thank you Minh. I don't know what I was thinking when I attached the package to the trac ticket. Perhaps I thought it was so small - not sure. Anyway, I will not do it again.

Thank you for the positive review.

I've opened another ticket, #8419, to resolve the issue which Jaap found - i.e. cddlib is not building as 64-bit on OpenSolaris.

comment:11 Changed 3 years ago by mvngu

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.3.4.alpha0

Merged  cddlib-094f.p5.spkg in the standard spkg repository.

Note: See TracTickets for help on using tickets.