g++ error causes non-zero exit status for package installation

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

g++ error causes non-zero exit status for package installation

Winfried Moser
dear community,

i get a *non-zero exit status* installing the survey-package in R version
3.5.2 on ubuntu 18.04. the problem seems to be related to *g++* and/or the
package *minqa*. in the output of the installation procedure i found the
following g++ related lines:

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/winfried/rlibs/Rcpp/include"
-f
[...]
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o
minqa.so altm
[...]
g++: error: R: Datei oder Verzeichnis nicht gefunden
g++: error: version: Datei oder Verzeichnis nicht gefunden
g++: error: 3.5.2: Datei oder Verzeichnis nicht gefunden
g++: error: (2018-12-20): Datei oder Verzeichnis nicht gefunden

can someone help or point me in a direction? several packages, that i use
frequently, are conserned (survey, lme4, effects)

best, winfried

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: g++ error causes non-zero exit status for package installation

Dirk Eddelbuettel

On 4 January 2019 at 23:23, Winfried Moser wrote:
| dear community,
|
| i get a *non-zero exit status* installing the survey-package in R version
| 3.5.2 on ubuntu 18.04. the problem seems to be related to *g++* and/or the
| package *minqa*. in the output of the installation procedure i found the
| following g++ related lines:
|
| g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/winfried/rlibs/Rcpp/include"
| -f
| [...]
| g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o
| minqa.so altm
| [...]
| g++: error: R: Datei oder Verzeichnis nicht gefunden
| g++: error: version: Datei oder Verzeichnis nicht gefunden
| g++: error: 3.5.2: Datei oder Verzeichnis nicht gefunden
| g++: error: (2018-12-20): Datei oder Verzeichnis nicht gefunden
|
| can someone help or point me in a direction? several packages, that i use
| frequently, are conserned (survey, lme4, effects)

Wrong mailing list. Please subscribe to r-sig-debian and post there.

Someone posted a similar looking error recently (in a GitHub issue I can't
find now) but we did not solve it.  Somehow the call goes funky meaning that
the values in /etc/R/Makeconf got altted or affected or corrupted. No idea
why -- thousands of people use R on Ubuntu daily, myself included.

The good new is that you can (and maybe should !) consider prebuilt
binaries. These packages are all in Ubuntu as r-cran-survey, r-cran-lme4,
r-cran-effects -- and the Rutter PPAs give you even newer version. Read the
first four paragraphs, and particularly the fourth, of

   https://cloud.r-project.org/bin/linux/ubuntu/README.html

and enjoy the availability of 4000+ r-cran-* binary packages.

I am still interested in understanding the bug report but please bring it to
r-sig-debian.

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: g++ error causes non-zero exit status for package installation

R help mailing list-2
In reply to this post by Winfried Moser
You would get these errors ("R: file or directory not found, version: file
or directory not found...") if you had a ~/.Rprofile file containing the
line 'cat(version$version.string, sep="\n").

Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Sat, Jan 5, 2019 at 1:23 AM Winfried Moser <[hidden email]>
wrote:

> dear community,
>
> i get a *non-zero exit status* installing the survey-package in R version
> 3.5.2 on ubuntu 18.04. the problem seems to be related to *g++* and/or the
> package *minqa*. in the output of the installation procedure i found the
> following g++ related lines:
>
> g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/winfried/rlibs/Rcpp/include"
> -f
> [...]
> g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o
> minqa.so altm
> [...]
> g++: error: R: Datei oder Verzeichnis nicht gefunden
> g++: error: version: Datei oder Verzeichnis nicht gefunden
> g++: error: 3.5.2: Datei oder Verzeichnis nicht gefunden
> g++: error: (2018-12-20): Datei oder Verzeichnis nicht gefunden
>
> can someone help or point me in a direction? several packages, that i use
> frequently, are conserned (survey, lme4, effects)
>
> best, winfried
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: g++ error causes non-zero exit status for package installation

Dirk Eddelbuettel

On 5 January 2019 at 09:14, William Dunlap via R-help wrote:
| You would get these errors ("R: file or directory not found, version: file
| or directory not found...") if you had a ~/.Rprofile file containing the
| line 'cat(version$version.string, sep="\n").

Well spotted -- very much so. That is bound to break use within src/Makevars
and alike. If you must do something in ~/.Rprofile either make it silent, or
make it conditional based on if (interactive()) { ...that_code_here... }

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: g++ error causes non-zero exit status for package installation

Winfried Moser
dirk & bill, you guys are incredible! the non-silent .Rprofile was the
problem!
making the code interactive didn't help either, only silenceing it helped!

thanks so much! i assume moving to r-sig-debian is now obsolete.

ps, @dirk: adding michael rutters ppa also helped, but the packages get
installed to R_LIBS_SITE, and not (as i am used to) to R_LIBS-USER.
but this was only a minor inconvinience (i like to keep the packages in one
directory).

thanks again!
winfried

Am Sa., 5. Jan. 2019 um 18:40 Uhr schrieb Dirk Eddelbuettel <[hidden email]
>:

>
> On 5 January 2019 at 09:14, William Dunlap via R-help wrote:
> | You would get these errors ("R: file or directory not found, version:
> file
> | or directory not found...") if you had a ~/.Rprofile file containing the
> | line 'cat(version$version.string, sep="\n").
>
> Well spotted -- very much so. That is bound to break use within
> src/Makevars
> and alike. If you must do something in ~/.Rprofile either make it silent,
> or
> make it conditional based on if (interactive()) { ...that_code_here... }
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: g++ error causes non-zero exit status for package installation

Dirk Eddelbuettel

On 5 January 2019 at 20:40, Winfried Moser wrote:
| dirk & bill, you guys are incredible! the non-silent .Rprofile was the
| problem!
| making the code interactive didn't help either, only silenceing it helped!

Good to know you have it fixed.
 
| thanks so much! i assume moving to r-sig-debian is now obsolete.
|
| ps, @dirk: adding michael rutters ppa also helped, but the packages get
| installed to R_LIBS_SITE, and not (as i am used to) to R_LIBS-USER.
| but this was only a minor inconvinience (i like to keep the packages in one
| directory).

No, it is even more fine grained:

 - r-cran-* packages always install in /usr/lib/R/site-library

 - (One exception: Base R and recommended packages go to /usr/lib/R/library )

 - local "from source" installation goes by default to /usr/local/lib/R/site-library
   
and the third part is much better for multi-user setting.  See the comments
in the file /etc/R/Renviron.site if you want to change this.

This has been our default since about 2003 or 2004 when Kurt Hornik and Fritz
Leisch convinced me of that approach in a Vienna bar. It is better.

And this discussion too belonged on r-sig-debian so let's stop here.

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: g++ error causes non-zero exit status for package installation

Henrik Bengtsson-5
In reply to this post by Dirk Eddelbuettel
On Sat, Jan 5, 2019 at 9:41 AM Dirk Eddelbuettel <[hidden email]> wrote:

>
>
> On 5 January 2019 at 09:14, William Dunlap via R-help wrote:
> | You would get these errors ("R: file or directory not found, version: file
> | or directory not found...") if you had a ~/.Rprofile file containing the
> | line 'cat(version$version.string, sep="\n").
>
> Well spotted -- very much so. That is bound to break use within src/Makevars
> and alike. If you must do something in ~/.Rprofile either make it silent, or
> make it conditional based on if (interactive()) { ...that_code_here... }

Interesting problem.  One way to workaround this startup issue with:

  PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`

used by minqa:src/Makevars
(https://r-forge.r-project.org/scm/viewvc.php/pkg/minqa/src/Makevars?view=markup&root=optimizer),
could be to use something like:

  PKG_LIBS = `Rscript -e "cat('LDFLAGS:\n')" -e "Rcpp:::LdFlags()" |
grep -A 999 "LDFLAGS:" | grep -v "LDFLAGS:"`

and analogously for src/Makevars.win.

But in the bigger picture, maybe there's room for an R/Rscript option
to silence all R startup stdout and/or stderr output?  For example,

  Rscript --quiet-startup -e "Rcpp:::LdFlags()"`

/Henrik

PS. It's probably better to output to stderr in .Rprofile, e.g. by
always using message() instead of cat(). However, that cannot be
assumed to always be the case.

>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: g++ error causes non-zero exit status for package installation

Dirk Eddelbuettel

On 5 January 2019 at 13:13, Henrik Bengtsson wrote:
| On Sat, Jan 5, 2019 at 9:41 AM Dirk Eddelbuettel <[hidden email]> wrote:
| >
| >
| > On 5 January 2019 at 09:14, William Dunlap via R-help wrote:
| > | You would get these errors ("R: file or directory not found, version: file
| > | or directory not found...") if you had a ~/.Rprofile file containing the
| > | line 'cat(version$version.string, sep="\n").
| >
| > Well spotted -- very much so. That is bound to break use within src/Makevars
| > and alike. If you must do something in ~/.Rprofile either make it silent, or
| > make it conditional based on if (interactive()) { ...that_code_here... }
|
| Interesting problem.  One way to workaround this startup issue with:
|
|   PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
|
| used by minqa:src/Makevars
| (https://r-forge.r-project.org/scm/viewvc.php/pkg/minqa/src/Makevars?view=markup&root=optimizer),

Nothing like 'Read the source, Luke!' :)

The *real* problem here is that command has been *obsolete* since early 2014
or for almost five years -- Rcpp does NOT require linking!

Hence the command is a null-op now, provided for backwards-compatibility:

     R> Rcpp:::LdFlags()
     R>

Then again minqa has not been updated since 2014 either so there...

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.