SCM

[#2395] Error in setwd(libdir) at the very beginning of check logs

Date:
2012-11-23 19:17
Priority:
3
State:
Closed
Submitted by:
Renaud Gaujoux (renaud)
Assigned to:
Martin Pacala (mpacala)
Hardware:
All
Operating System:
All
Severity:
blocker
URL:
https://r-forge.r-project.org/R/?group_id=649&log=check_x86_64_linux&pkg=NMF&flavor=patched
Summary:
Error in setwd(libdir) at the very beginning of check logs

Detailed description
Hi,

I get the following check log error on all platforms:

Error in setwd(libdir) : cannot change working directory

And no install log.
The package builds fine but the check simply does not happen due to this error.
I have seen this error coming and going for a little while now. I do not get such error when checking locally.

Googling the error shows that this issue occurs in a few other packages.
Can this be due to something special happening on r-forge machines?
Thank you.

Bests,
Renaud

Comments:

Message  ↓
Date: 2013-11-28 07:51
Sender: Renaud Gaujoux

That's great news.
Thanks Martin.

Date: 2013-11-27 15:51
Sender: Martin Pacala

The error "Error in setwd(libdir) : cannot change working directory" has now been accurately identified, is related to automatic installation of package dependencies. If encountered, simply write a support ticket and it can be corrected quickly. best regards

Date: 2013-05-21 13:05
Sender: Renaud Gaujoux

Hi,

could this r-devel post possibly provide some hint on this error?
https://stat.ethz.ch/pipermail/r-devel/2013-May/066674.html

Thank you.

Date: 2013-05-16 12:06
Sender: Renaud Gaujoux

Please, please, please, this error affects almost all my packages... it is a bit depressing :(
The error seems to come from this piece in check.R:

```
R_LIBS <- Sys.getenv("R_LIBS")
arg_libdir <- libdir
if (nzchar(libdir)) {
setwd(libdir)
libdir <- getwd()
Sys.setenv(R_LIBS = env_path(libdir, R_LIBS))
setwd(startdir)
}
```
So is it possible that the R_LIBS directory is somehow deleted by another package check or something else?

Renaud

Date: 2013-04-26 04:31
Sender: Renaud Gaujoux

Hi,

thanks Martin for looking into this issue. I still get the error in many of my packages, after the fix you applied. Other developers?

Renaud

Date: 2013-04-11 18:47
Sender: Henrik Bengtsson

Hi Martin P,

thanks for your post - even if you don't have a solution it's very useful for us to know there's someone "on the other end" listening.

TROUBLESHOOTING TIPS:
If you tell 'R CMD check' to output the check results to a non-existing directory, you get the same error. Example:

% R CMD check -o non_existing_dir pkg_0.1.tar.gz
Error in setwd(outdir) : cannot change working directory
Execution halted

So, if you use the -o <dir> option (note that --outdir does *not* work, cf. http://goo.gl/FMJBW), then try to assert that <dir> exists and is really a directory, *before* calling 'R CMD check'.

Also, on network file systems it may take a couple of seconds (up to 30 seconds on old NFS systems) after creating a directory before another computer on the same network may see that directory. Thus, if the R-forge farm is running stuff in parallel this could also be part of the explanation. You can use a small pooling loop that keeps trying for say 15 secs, before giving up an giving a more informative error.


My $.02

/Henrik

Date: 2013-04-11 10:46
Sender: Martin Pacala

Sorry everyone, this is not forgotten, however it is a tricky issue (not easy to troubleshoot). On top of that there was the recent issue in the build process linked to the release of the new R version (linux and windows builds are fixed, however until the mac building process is also fixed, the entire building will not work). I tried to do something now, however I can only check the results after it actually builds.

Date: 2013-04-10 10:07
Sender: Renaud Gaujoux

Is there anybody looking at this issue. The issue appears to be assigned to nobody...
It has been a while now and it seem to affect quite a few people. Can we expect this to be fixed any time soon. Any answer would be appreciated, we are in the dark down here.

Thank you.

Date: 2013-03-22 23:34
Sender: Martin Elff

Interestingly, in my case the error occurs only with the check on Linux, but on Windows and Mac, package check is successful: https://r-forge.r-project.org/R/?group_id=1589&log=check_x86_64_windows&pkg=codebooks&flavor=patched, https://r-forge.r-project.org/R/?group_id=1589&log=check_x86_64_mac&pkg=codebooks&flavor=patched.

I would very much appreciate a fix for this, it is really blocking.

Many thanks,
Martin

Date: 2013-03-21 13:03
Sender: Martin Elff

The problem resurfaced again in one of my packages: https://r-forge.r-project.org/R/?group_id=1589&log=check_x86_64_linux&pkg=codebooks&flavor=patched

The package seems to build okay on all platforms:
https://r-forge.r-project.org/R/?group_id=1589&log=build_src&pkg=codebooks&flavor=patched
https://r-forge.r-project.org/R/?group_id=1589&log=build_win64&pkg=codebooks&flavor=patched
https://r-forge.r-project.org/R/?group_id=1589&log=build_mac&pkg=codebooks&flavor=patched

But then the check causes this error.

BTW: Why not making package binaries available if the build is successful (even if the check is not)?
That would be great, since r-forge is not CRAN, but a development platform (or so I thought ...)

Date: 2013-02-27 09:36
Sender: Renaud Gaujoux

Can we please have a fix for this.
It is really really blocking. Maybe generating and keeping more log output could help identify and solve the problem.
Thank you.

REnaud

Date: 2013-02-11 23:20
Sender: Henrik Bengtsson

I still get it:

https://r-forge.r-project.org/R/?group_id=428&log=check_x86_64_linux&pkg=R.utils&flavor=patched

Date: 2013-02-11 08:35
Sender: Renaud Gaujoux

I still get this error, although other seem not to have it anymore... :(
It is a blocking issue for me.

The package builds without error on all platforms, but no check are performed due to this setwd(libdir) error.
It must have built last night since the svn revision and package version on the build logs are the latest ones.

Thank you

Date: 2013-01-24 14:45
Sender: Milan Bouchet-Valat

Ping? Is there any chance to get this fixed? Can we help in one way or another? My RcmdrPlugin.temis package has not been built for several weeks... :-(

Thanks!

Cf. https://r-forge.r-project.org/tracker/index.php?func=detail&aid=2441&group_id=34&atid=194

Date: 2013-01-11 19:46
Sender: Henrik Bengtsson

I get the same error on many of my packages. This cause the status of the package to be "Failed to build" (although it built properly), which in turn disables submission to CRAN. The package builds (*.tar.gz, *.zip, *.tgz) are also not available because of this.

EXAMPLE:

Tue Jan 8 04:17:01 2013: Checking package R.utils (SVN revision 983) ...
Error in setwd(libdir) : cannot change working directory
Execution halted
Run time: 0.93 seconds.

Source: https://r-forge.r-project.org/R/?group_id=428&log=check_x86_64_linux&pkg=R.utils&flavor=patched

TROUBLESHOOTING:
The only thing I managed to find is that this error indeed occurs 'R CMD check'. Search the R source code, there is only one line of code containing "setwd(libdir)", cf. http://svn.r-project.org/R/trunk/src/library/tools/R/check.R

Attached Files:

Changes

Field Old Value Date By
status_idOpen2013-11-27 15:51mpacala
close_dateNone2013-11-27 15:51mpacala
assigned_tonone2013-04-11 10:46mpacala
Thanks to:
Vienna University of Economics and Business Powered By FusionForge