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

Submit new R package to CRAN #1812

Closed
terrytangyuan opened this issue Nov 25, 2016 · 43 comments
Closed

Submit new R package to CRAN #1812

terrytangyuan opened this issue Nov 25, 2016 · 43 comments

Comments

@terrytangyuan
Copy link
Member

@hetong007 @tqchen @pommedeterresautee @khotilov

I received some requests recently. Could anyone submit the latest version to CRAN (major changes are the callbacks I believe)?

@hetong007
Copy link
Member

I was a bit off recently. I will run the CRAN checks, and submit the current version soon.
Related issue: #1423

@terrytangyuan
Copy link
Member Author

Sorry I missed that issue. Thanks @hetong007.

@tqchen
Copy link
Member

tqchen commented Nov 25, 2016

We will need a VM to get solaris checks pass, @thirdwing can you help on that?

@thirdwing
Copy link
Member

I will try to find some time.

@thirdwing
Copy link
Member

I just try a 32-bit Solaris VM. However, I can't install all the dependencies on that.

@hetong007
Copy link
Member

@thirdwing Do you have a list of those dependencies?

@thirdwing
Copy link
Member

thirdwing commented Nov 29, 2016

NMF can't be install on x86 VM. See https://cran.r-project.org/web/checks/check_results_NMF.html

We don't depend on this directly. This is a dependency for DiagrameR

@thirdwing
Copy link
Member

BTW, I can install xgboost on x86 Solaris.

@tqchen
Copy link
Member

tqchen commented Nov 30, 2016

@thirdwing can you confirm the R check as-cran pass?

@thirdwing
Copy link
Member

I can just install it. It seems impossible to do the check on x86 Solaris machine.

@khotilov
Copy link
Member

The igraph depends on NMF , the DiagrammeR depends on igraph; and we call some functions from both DiagrammeR and igraph in some non-essential plotting methods. There are a few unit tests which call those - is that why the check for solaris doesn't work? Could it make sense to disable those particular tests just for the CRAN release?

@thirdwing
Copy link
Member

@khotilov Failure on x86 Solaris is somewhat acceptable by CRAN, since NMF hasn't been removed. I will try to get access to a real Solaris machine.

@ck37
Copy link

ck37 commented Dec 9, 2016

+1 to CRAN release, would be very helpful since the current version is from July 12.

@terrytangyuan
Copy link
Member Author

Any updates on this? Have you sorted out the issue with raw test mismatch?

@hetong007
Copy link
Member

As mentioned by @yixuan in #1826 (comment), this error can be observed when R compiles with -O1 or -O2, and vanishes when using -O0.

I am considering about commenting out the related tests when submitting to CRAN.

@terrytangyuan
Copy link
Member Author

terrytangyuan commented Dec 14, 2016 via email

@hetong007
Copy link
Member

I will do that in this weekend.

@thirdwing
Copy link
Member

xgboost failed on solaris: https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/xgboost-00install.html

This is because the openmp support on CRAN machine.

Two solution: (1) disabled openmp; (2) add a separate autoconf script.

@hetong007
Copy link
Member

The first solution would make the package much weaker on CRAN, thus not really benefits the CRAN users.
@thirdwing can you help with the second solution?

@thirdwing
Copy link
Member

see my repo thirdwing@e1af62c

It should work on Solaris and Linux. Not sure about Windows.

@tqchen
Copy link
Member

tqchen commented Dec 16, 2016

i think it is fine to disable OpenMP on solaris because solaris is not used widely anyway. It is interesting that C++11 compiler in solaris is g++ instead of Solaris studio. We do need to make sure the checks pass in other OS

@thirdwing
Copy link
Member

If you have CXX_STD = CXX11, the solaris will also use g++.

Actually I think it will be more complicated to disable openmp on only one OS.

@tqchen
Copy link
Member

tqchen commented Dec 16, 2016

What I intended to say is that this is the problem of current CRAN's solaris build system. see also my comment in #1880 By default, it should be the build system's job to switch off openmp by not passing anything in SHLIB_OPENMP_CFLAGS .

This happens in OSX automatically. Solaris have openmp support with solaris studio, but need to be able to disable it when c++11 is turned on. This is the problem of current build script, that affect every package with c++11 and openmp turned on

@yixuan
Copy link
Contributor

yixuan commented Dec 16, 2016

The problem is due to the wrong flag to enable OpenMP. For Solaris Studio the flag for OpenMP is -xopenmp, but for GCC it is -fopenmp. From the CRAN check log it can be seen that -xopenmp was passed to GCC.

@thirdwing
Copy link
Member

thirdwing commented Dec 16, 2016 via email

@yixuan
Copy link
Contributor

yixuan commented Dec 16, 2016

Yep, and here is what I found: #1881 .

@hetong007
Copy link
Member

Currently xgboost 0.6-2 is on. The version number "2" is the need for the post-submission bug fixing.

However after the fixes from @yixuan and @thirdwing , installation on Solaris is still broken: https://cran.r-project.org/web/checks/check_results_xgboost.html.

Another issue is that DiagrammeR 0.9 will be on CRAN. It is also left to be tested to see if this update breaks xgboost.

@tqchen
Copy link
Member

tqchen commented Dec 18, 2016

@thirdwing Can you grab a VM to look into this?

The Sparc compilation error is due to lack of support of thread local in Sparc, which can be solved by optionally disable thread local macro here https://github.com/dmlc/xgboost/blob/master/src/common/thread_local.h#L22 to check solaris and simply define MX_TREAD_LOCAL to be empty

@tqchen
Copy link
Member

tqchen commented Dec 18, 2016

The segfault of x86 solaris is more mysterious, and we might need a reproducible example to see what exactly happened.

@thirdwing
Copy link
Member

I only have the x86 VM. I will have a try if possible.

@thirdwing
Copy link
Member

@tqchen I can't reproduce the error on the X86 solaris VM.

@thirdwing
Copy link
Member

From the CRAN checking log, the error on X86 Solaris is from https://github.com/dmlc/xgboost/blob/master/R-package/src/xgboost_R.cc#L88

It involves the usage of openmp, so maybe we can try to disable openmp on solaris.

@tqchen
Copy link
Member

tqchen commented Dec 19, 2016

Let us do that

@tqchen
Copy link
Member

tqchen commented Dec 19, 2016

Let us also fix the thread local issue by patching the fix i mentioned

@tqchen
Copy link
Member

tqchen commented Dec 20, 2016

@thirdwing can you followup on this? I also noticed there is an error in windows, reporting conflicting defintition of fopen, do you know what happened there?

@thirdwing
Copy link
Member

thirdwing commented Dec 20, 2016

I am working on my own fork. The make on Solaris doesn't support if ,which makes things much harder.

@hetong007
Copy link
Member

hetong007 commented Dec 28, 2016

@thirdwing just opened a new PR (merged) for solaris: #1912 .

For the error on old release windows, the error message is

d:\compiler\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83: error: 'FILE* std::fopen(const char*, const char*)' should have been declared inside 'std'
d:\compiler\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83: error: declaration of 'FILE* std::fopen(const char*, const char*)'
d:\compiler\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:395:17: error: conflicts with previous declaration 'FILE* fopen(const char*, const char*)'

I found several related previous issues:

Hope someone can shed light on it.

@thirdwing
Copy link
Member

@hetong007 I suggest adding Depends: R (>= 3.3.0), so we do not need to worry about old windows release.

@terrytangyuan
Copy link
Member Author

terrytangyuan commented Dec 30, 2016 via email

@hetong007
Copy link
Member

There are some plot-related errors on R 3.3.2 when checked by win-builder: https://win-builder.r-project.org/Oc7UhRHG4Y2w/00check.log (link will expire after roughly 72 hours).

However the check on R-devel is fine: https://win-builder.r-project.org/qG0ASTr2Yd45/00check.log

The errors, e.g. Error: 'graph_from_data_frame' is not an exported object from 'namespace:igraph', are not reproducible on Linux. I will compile and check it on a windows machine later today to see if this is actually caused by win-builder.

@thirdwing
Copy link
Member

@thirdwing
Copy link
Member

You should use something like xgboost.version <- packageDescription("xgboost")$Version

@thirdwing
Copy link
Member

We are getting closer. Now errors only come from Old Windows release and Sparc Solaris: https://cran.r-project.org/web/checks/check_results_xgboost.html

My opinions are as follow:

(1) We don't need to care much about old Windows release;

(2) Sparc Solaris failed in https://github.com/dmlc/xgboost/blob/master/R-package/tests/testthat/test_helpers.R#L86

The simplest solution is to disable this test on Solaris by detecting Sys.info()[['sysname']].

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants