Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spkg-configure for R #28884

Closed
dimpase opened this issue Dec 15, 2019 · 35 comments
Closed

spkg-configure for R #28884

dimpase opened this issue Dec 15, 2019 · 35 comments

Comments

@dimpase
Copy link
Member

dimpase commented Dec 15, 2019

a minimum working on standard distros setup.

Note that R does not have a working uninstall, so one needs to manually uninstall by

rm -rf $SAGE_LOCAL/lib/R
rm $SAGE_LOCAL/bin/R*

followed by

./bootstrap
./configure
./sage -f rpy2
make build

and then test. (Or, of course start from make distclean)

Depends on #27870

CC: @sagetrac-tmonteil @kiwifb @isuruf @EmmanuelCharpentier @embray

Component: build: configure

Author: Dima Pasechnik

Branch/Commit: 1f4a7e1

Reviewer: Emmanuel Charpentier

Issue created by migration from https://trac.sagemath.org/ticket/28884

@dimpase dimpase added this to the sage-9.1 milestone Dec 15, 2019
@dimpase
Copy link
Member Author

dimpase commented Dec 15, 2019

comment:1

TODO: check that versions of R and libR match

@dimpase

This comment has been minimized.

@kiwifb
Copy link
Member

kiwifb commented Dec 15, 2019

comment:6

I guess we could check for matching versions with that kind of stuff

fbissey@moonloop ~ $ pkg-config --modversion libR
3.4.1
fbissey@moonloop ~ $ R --version
R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

Nice that libR comes with a .pc file.

@dimpase
Copy link
Member Author

dimpase commented Dec 15, 2019

comment:7

I'll do the TODO as soon as the rest looks OK. I've done similar checks for pari...

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 15, 2019

comment:8

Does this install on top of #27870, includes (i. e. subsumes) #27870, or what ?

@dimpase
Copy link
Member Author

dimpase commented Dec 15, 2019

comment:10

#27870 should have been listed as a dependency, sorry. Anyway, the branch here includes the branch of #27870, so you just need the branch u/dimpase/packages/rconf

@dimpase
Copy link
Member Author

dimpase commented Dec 15, 2019

Dependencies: #27870

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 15, 2019

comment:11

Replying to @dimpase:

#27870 should have been listed as a dependency, sorry. Anyway, the branch here includes the branch of #27870, so you just need the branch u/dimpase/packages/rconf

Thanks ! Looking into it...

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 15, 2019

comment:12

LGTM:

  • Sage -R works as expected. Superficial testing is OK.
charpent@zen-book-flip:/usr/local/sage-9$ sage -t --long src/sage/interfaces/r.py 
Running doctests with ID 2019-12-15-10-50-43-b4fc9d4c.
Git branch: t/28884/packages/rconf
Using --optional=build,dochtml,dot2tex,fricas,gap_packages,giacpy_sage,libsemigroups,memlimit,python2,sage,sagenb
Doctesting 1 file.
sage -t --long --warn-long 184.3 src/sage/interfaces/r.py
    [257 tests, 5.48 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 5.7 seconds
    cpu time: 5.3 seconds
    cumulative wall time: 5.5 seconds
charpent@zen-book-flip:/usr/local/sage-9$ sage -t --long src/sage/stats/r.py 
Running doctests with ID 2019-12-15-10-51-20-adfb7e0b.
Git branch: t/28884/packages/rconf
Using --optional=build,dochtml,dot2tex,fricas,gap_packages,giacpy_sage,libsemigroups,memlimit,python2,sage,sagenb
Doctesting 1 file.
sage -t --long --warn-long 184.3 src/sage/stats/r.py
    [2 tests, 0.54 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 0.7 seconds
    cpu time: 0.5 seconds
    cumulative wall time: 0.5 seconds

make ptestalllong underway...

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 15, 2019

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e5c91dbupdate pkgconfig to v1.5.1. See trac #28883
1720b38a bare minumim openblas config
925266buse openblas.pc for blas and lapack, don't require atlas is to be used
b89df80move blas handling to build/pkgs/
6341576create cblas.pc link, too, not only blas and lapack
f66ea24spkg-configure for R

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 15, 2019

Changed commit from bbea194 to f66ea24

@dimpase
Copy link
Member Author

dimpase commented Dec 15, 2019

comment:14

added forgotten commit sagemath/sagetrac-mirror@6341576 from #27870 to this branch (should not matter, review-wise, I guess)

@dimpase

This comment has been minimized.

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 15, 2019

comment:16

Replying to @EmmanuelCharpentier:

[ Snip... ]

make ptestalllong underway...

ptestalllong gets 6 transient and 3 permanent failures :

File Result P/T
src/sage/plot/animate.py 7 doctests failed T
src/sage/modular/ssmod/ssmod.py 2 doctests failed T
src/sage/misc/latex.py 1 doctest failed T
src/sage/numerical/backends/glpk_backend.pyx 1 doctest failed P
src/sage/repl/load.py 1 doctest failed T
src/sage/tests/gap_packages.py 1 doctest failed P
src/sage/libs/glpk/error.pyx 1 doctest failed P
src/sage/combinat/designs/ext_rep.py 1 doctest failed T
src/sage/databases/findstat.py 1 doctest failed T

All of these have already been reported for previous release(s) of Python 3-based Sage 9 betas, and therefore considered not to be related to this ticket.

==> positive_review

Given the importance of this ticket (a large headache off the shoulders of active Sage-R users...), I recommend tests on other platforms (Mac OS X and its shenanigans, Windows and the coexistence of Windows and Cygwin libraries...).

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 15, 2019

Reviewer: Emmanuel Charpentier

@EmmanuelCharpentier

This comment has been minimized.

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 15, 2019

comment:17

Replying to @dimpase:

added forgotten commit sagemath/sagetrac-mirror@6341576 from #27870 to this branch (should not matter, review-wise, I guess)

Aaaarghhhh...

Another check may be worthy. But maybe after tests on other platforms... Please ask as neeeded.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 15, 2019

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

3812f1clist more relevant system packages to install on Debian/Fedora

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 15, 2019

Changed commit from f66ea24 to 3812f1c

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 15, 2019

comment:19

Replying to @sagetrac-git:

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

3812f1clist more relevant system packages to install on Debian/Fedora

Similar results on this second pass. positive review. Same recommendation as before.

@dimpase dimpase added this to the sage-9.0 milestone Dec 15, 2019
@dimpase
Copy link
Member Author

dimpase commented Dec 16, 2019

comment:23

It works on MacOS 10.13.6 with Homebrew's R and openblas packages.

It doesn't work with R installed with standalone isntaller from R Project,
probably as there is some kind of library/compiler incompatibility - they don't build R with Xcode compiler, they use their "own"; more precisely, OpenMP-enabled
clang 8, see https://cran.r-project.org/bin/macosx/tools.
Somehow I see an error message while building rpy2, attempting to use -fopenmp switch with Xcode's clang.

@vbraun
Copy link
Member

vbraun commented Dec 20, 2019

Changed branch from u/dimpase/packages/rconf to 6aba5b4

@vbraun
Copy link
Member

vbraun commented Dec 22, 2019

Changed commit from 6aba5b4 to none

@vbraun
Copy link
Member

vbraun commented Dec 22, 2019

comment:25

More stuff that has #28883 merged in

@vbraun
Copy link
Member

vbraun commented Dec 22, 2019

Commit: 6aba5b4

@vbraun
Copy link
Member

vbraun commented Dec 22, 2019

New commits:

e5c91dbupdate pkgconfig to v1.5.1. See trac #28883
1720b38a bare minumim openblas config
925266buse openblas.pc for blas and lapack, don't require atlas is to be used
b89df80move blas handling to build/pkgs/
6341576create cblas.pc link, too, not only blas and lapack
f66ea24spkg-configure for R
3812f1clist more relevant system packages to install on Debian/Fedora
6aba5b4lower versions of R and openblas

@vbraun
Copy link
Member

vbraun commented Dec 22, 2019

Changed branch from 6aba5b4 to u/dimpase/packages/rconf

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 28, 2019

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:

f74f554update pkgconfig to v1.5.1. See trac #28883
fb8f4e5allow absent zlib.pc
b3a8891a bare minumim openblas config
c031c9euse openblas.pc for blas and lapack, don't require atlas is to be used
b49f79emove blas handling to build/pkgs/
81bf522create cblas.pc link, too, not only blas and lapack
6df5985spkg-configure for R
0bad8b4list more relevant system packages to install on Debian/Fedora
1f4a7e1lower versions of R and openblas

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 28, 2019

Changed commit from 6aba5b4 to 1f4a7e1

@dimpase
Copy link
Member Author

dimpase commented Dec 28, 2019

comment:30

routine rebase over updated #27870

@vbraun
Copy link
Member

vbraun commented Jan 9, 2020

Changed branch from u/dimpase/packages/rconf to 1f4a7e1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants