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

Install trouble-shooting in scope? #163

Open
MichaelChirico opened this issue Nov 5, 2023 · 2 comments
Open

Install trouble-shooting in scope? #163

MichaelChirico opened this issue Nov 5, 2023 · 2 comments

Comments

@MichaelChirico
Copy link
Contributor

I came across two failures running make today that interrupted my usual workflow for building r-devel.

I wondered if keeping something like an FAQ for troubleshooting R builds would make sense for the guide. Or perhaps it could just be a Wiki document on this repo that's pointed to by the guide, to make contribution less intensive?

To get things started here were the two fixes I needed today:

Run make clean to reset state

Sometimes the compiled .o/.so files from previous make runs get stale without make realizing it and re-compiling on its own.

In such cases, running make clean before re-trying make may be the only way to proceed. Here's the error I encountered today:

/home/michael/svn/R-devel/bin/exec/R: error while loading shared libraries: libicuuc.so.66: cannot open shared object file: No such file or directory
make[4]: *** [../../../share/make/basepkg.mk:151: sysdata] Error 127
make[4]: Leaving directory '/home/michael/svn/R-devel/src/library/tools'
make[3]: *** [Makefile:36: all] Error 2
make[3]: Leaving directory '/home/michael/svn/R-devel/src/library/tools'
make[2]: *** [Makefile:37: R] Error 1
make[2]: Leaving directory '/home/michael/svn/R-devel/src/library'
make[1]: *** [Makefile:28: R] Error 1
make[1]: Leaving directory '/home/michael/svn/R-devel/src'
make: *** [Makefile:62: R] Error 1

I first checked around for where libicuuc is coming from (ICU library, mentioned in R-admin, installed as e.g. apt-get install libicu-dev on Ubuntu), and made sure I have it installed, which I do, meaning something "funny" is going on and hinting at the need for a make clean.

Needed to update my copies of the Recommended packages

I only ran the required ./tools/rsync-recommended once, long ago when I first set up my local copy of the SVN repo -- looks like circa 2021.

I turns out my old copies of these packages have drifted far enough from the current versions that they now fail to compile. Here's the error I encountered during make:

make[3]: Entering directory '/tmp/Rtmpsof5N5/R.INSTALL19cad6efa1634/MASS/src'
gcc -I"/home/michael/svn/R-devel/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c MASS.c -o MASS.o
MASS.c:37:23: error: unknown type name ‘Sint’; did you mean ‘uint’?
   37 | VR_sammon(double *dd, Sint *nn, Sint *kd, double *Y, Sint *niter,
      |                       ^~~~
      |                       uint
MASS.c:37:33: error: unknown type name ‘Sint’; did you mean ‘uint’?

(and dozens more compiler errors like that).

I was trying to find where the Sint type is defined and happened to look at the current CRAN version of MASS:

https://github.com/cran/MASS/blob/ba503858f613cfb21fae8e539e4c5bd81da1c10e/src/MASS.c#L38-L39

That Sint type is no longer used. That clued me in to "maybe my version of MASS is too old" and discovered I needed to run ./tools/rsync-recommended again.


Overall, it would be nice to have a "canonical" place to refer to for troubleshooting builds with common (or not-so-common!) issues recorded.

@willingc
Copy link
Contributor

willingc commented Nov 6, 2023

@MichaelChirico These are good suggestions esp. make clean. A FAQ page for troubleshooting in the guides would make good sense.

@llrs
Copy link
Member

llrs commented Jul 19, 2024

The recent R dev day resulted on a couple of issues, feedback #175 and #174.
There is also some more feedback at #173 .

Now that the guide is getting more usage maybe it is time to add this?

Also it is worth mentioning svn cleanup --vacuum-pristines --remove-ignored --remove-unversioned to remove everything from the source repository (in case there are some other files or old files).
This will require to download packages again via ./tools/rsync-recommended which would have fixed the original issue.

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

No branches or pull requests

3 participants