Ticket #9277 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Flint's spkg-check file does not work on 64-bit (SAGE64 only works on OS X)

Reported by: drkirkby Owned by: GeorgSWeber
Priority: major Milestone: sage-4.5
Component: build Keywords:
Cc: jsp Work issues:
Report Upstream: N/A Reviewers: Jaap Spies
Authors: David Kirkby Merged in: sage-4.5.alpha0
Dependencies: Stopgaps:

Description (last modified by drkirkby) (diff)

Just when I thought I'd got rid of all the junk like this from spkg-install files:

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
   echo "64 bit MacIntel"
   FLINT_TUNE=" -fPIC -m64 -funroll-loops"
fi

I realise that these can lurk in spkg-check files too. Flint has such a check routine, so whilst flint builds OK on OpenSolaris x64 in 64-bit mode, the self tests do not work, as the building of the self-tests does not produce 64-bit binaries, but 32-bit ones. Hence one gets a failure:

g++  -I/export/home/drkirkby/sage-4.4.4.alpha1/local/include/ -I/export/home/drkirkby/sage-4.4.4.alpha1/local/include  -fPIC -funroll-loops   -O2 F_mpz-test.o test-support.o -o F_mpz-test zn_mod.o misc.o mul_ks.o pack.o mul.o mulmid.o mulmid_ks.o ks_support.o mpn_mulmid.o nuss.o pmf.o pmfvec_fft.o tuning.o mul_fft.o mul_fft_dft.o array.o invert.o mpn_extras.o mpz_extras.o memory-manager.o ZmodF.o ZmodF_mul.o ZmodF_mul-tuning.o fmpz.o fmpz_poly.o mpz_poly-tuning.o mpz_poly.o ZmodF_poly.o long_extras.o zmod_poly.o theta.o zmod_mat.o F_mpz.o tinyQS.o factor_base.o poly.o sieve.o linear_algebra.o block_lanczos.o NTL-interface.o -L/export/home/drkirkby/sage-4.4.4.alpha1/local/lib/ -L/export/home/drkirkby/sage-4.4.4.alpha1/local/lib/  -lgmp -lpthread -lntl -lm 
ld: fatal: file zn_mod.o: wrong ELF class: ELFCLASS64
ld: fatal: file processing errors. No output written to F_mpz-test
collect2: ld returned 1 exit status
make[2]: *** [F_mpz-test] Error 1
make[2]: Leaving directory `/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/flint-1.5.0.p4/src'
Error building the test suite for FLINT

real	0m19.361s
user	0m18.552s
sys	0m0.676s
sage: An error occurred while installing flint-1.5.0.p4

Note how g++ is invoked with no -m64 option.

Attachments

9277.patch Download (1.8 KB) - added by drkirkby 3 years ago.
Mercurial patch which permits a 64-bit build of test suite and ensures tests dont run twice

Change History

comment:1 Changed 3 years ago by drkirkby

  • Cc jsp added
  • Owner changed from AlexGhitza to GeorgSWeber
  • Component changed from algebra to build
  • Description modified (diff)

comment:2 Changed 3 years ago by drkirkby

  • Status changed from new to needs_review
  • Milestone set to sage-4.4.4

Here's an updated package

 http://boxen.math.washington.edu/home/kirkby/patches/flint-1.5.0.p5.spkg

which has a trivial fix to remove the OS X restriction.

It was also desirable to remove these 3 lines from spkg-install, since if SAGE_CHECK was set to yes, the test suite got executed twice, which just wastes time.

if [ "$SAGE_CHECK" = "yes" ]; then
    cd ..; ./spkg-check
fi

After that change, on my Sun Ultra 27 running OpenSolaris x64, the test suite builds, runs once, and passes all the tests.

Testing zmod_poly_factor()... Cpu = 2060 ms  Wall = 2061 ms ... ok
Testing zmod_poly_2x2_mat_mul_classical_strassen()... Cpu = 330 ms  Wall = 326 ms ... ok
Testing zmod_poly_2x2_mat_mul()... Cpu = 1070 ms  Wall = 1073 ms ... ok

All tests passed
Testing zmod_mat_row_reduce_gauss()... Cpu = 470 ms  Wall = 473 ms ... ok

All tests passed
Testing ZZ_to_fmpz()... Cpu = 530 ms  Wall = 536 ms ... ok
Testing ZZ_to_F_mpz()... Cpu = 460 ms  Wall = 457 ms ... ok
Testing ZZX_to_fmpz_poly()... Cpu = 1710 ms  Wall = 1710 ms ... ok

All tests passed
Now cleaning up tmp files.
rm: Cannot remove any directory in the path of the current working directory
/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/flint-1.5.0.p5
Making Sage/Python scripts relocatable...
Making script relocatable
Finished installing flint-1.5.0.p5.spkg

Changed 3 years ago by drkirkby

Mercurial patch which permits a 64-bit build of test suite and ensures tests dont run twice

comment:3 Changed 3 years ago by jsp

  • Status changed from needs_review to positive_review
  • Reviewers set to Jaap Spies
  • Authors set to David Kirkby

Looks good to me.

Positive review.

Jaap

comment:4 Changed 3 years ago by rlm

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