Prophet: C++14 standard requested but CXX14 is not defined

Created on 29 Nov 2018  Â·  4Comments  Â·  Source: facebook/prophet

From #736, an install issue

installing source package ‘rstan’ ...
** package ‘rstan’ successfully unpacked and MD5 sums checked

** libs

Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined

removing ‘/usr/local/lib64/R/library/rstan’
ERROR: dependency ‘rstan’ is not available for package ‘prophet’

removing ‘/usr/local/lib64/R/library/prophet’
The downloaded source packages are in
‘/tmp/RtmpNoczSf/downloaded_packages’

is due to not setting C++14 in the C++ toolchain (https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Linux). This probably needs to be updated in Prophet Makevars also.

bug

Most helpful comment

It is the same issue. On Linux, you need to have

CXX14FLAGS += -fPIC

https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Linux

On Tue, Dec 18, 2018 at 11:12 AM Christopher Peters <
[email protected]> wrote:

Just ran into this on Ubuntu,

  • installing source package ‘rstan’ ...

** package ‘rstan’ successfully unpacked and MD5 sums checked

** libs

Error in .shlib_internal(args) :

C++14 standard requested but CXX14 is not defined

  • removing ‘/home/ubuntu/R_library/rstan’

ERROR: dependency ‘rstan’ is not available for package ‘prophet’

  • removing ‘/home/ubuntu/R_library/prophet’

lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 14.04.5 LTS

Release: 14.04

Codename: trusty

I've run into this before. I'll report back if I find a solution. 👍

EDIT: making my ~/.R/Makevars file look like,

CXX14 = g++ -std=c++1y

CXX14FLAGS = -O3 -Wno-unused-variable -Wno-unused-function

it looks like this came close to fixing the issue (pointing CXX14 flag at
the g++ compiler) but not quite.

R/lib -lR

/usr/bin/ld: chains.o: relocation R_X86_64_32 against `_ZGVZ7dataptrP7SEXPRECE3fun' can not be used when making a shared object; recompile with -fPIC

chains.o: error adding symbols: Bad value

collect2: error: ld returned 1 exit status

@bgoodri https://github.com/bgoodri, I was wondering if you think this
might be a new issue beyond
https://github.com/stan-dev/rstan/issues/569#issuecomment-430754916?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/prophet/issues/760#issuecomment-448268215,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADOrqsNZpA1NW3kU9YCI6oATxqp6_R4Sks5u6RP2gaJpZM4Y6Lxl
.

All 4 comments

This is a new thing with Stan 2.18. From what I can tell, this issue only comes up: (1) when installing rstan from source in Windows, or (2) in packages that ship compiled models (https://discourse.mc-stan.org/t/how-to-update-a-package-that-has-stanheaders-and-rstan-in-its-linkingto/6041). Since we're compiling the model locally on install, I haven't found anything that indicates we need to change anything. I am able to successfully install Prophet in R with rstan 2.18.1, so I think we should be OK and am closing this.

Just ran into this on Ubuntu,

* installing *source* package ‘rstan’ ...
** package ‘rstan’ successfully unpacked and MD5 sums checked
** libs
Error in .shlib_internal(args) :
  C++14 standard requested but CXX14 is not defined
* removing ‘/home/ubuntu/R_library/rstan’
ERROR: dependency ‘rstan’ is not available for package ‘prophet’
* removing ‘/home/ubuntu/R_library/prophet’
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty

I've run into this before. I'll report back if I find a solution. 👍

EDIT: making my ~/.R/Makevars file look like,

CXX14 = g++ -std=c++1y
CXX14FLAGS = -O3 -Wno-unused-variable -Wno-unused-function

it looks like this came close to fixing the issue (pointing CXX14 flag at the g++ compiler) but not quite.

During installation of rstan, I get,

R/lib -lR
/usr/bin/ld: chains.o: relocation R_X86_64_32 against `_ZGVZ7dataptrP7SEXPRECE3fun' can not be used when making a shared object; recompile with -fPIC
chains.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

@bgoodri, I was wondering if you think this might be a new issue beyond?

It is the same issue. On Linux, you need to have

CXX14FLAGS += -fPIC

https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Linux

On Tue, Dec 18, 2018 at 11:12 AM Christopher Peters <
[email protected]> wrote:

Just ran into this on Ubuntu,

  • installing source package ‘rstan’ ...

** package ‘rstan’ successfully unpacked and MD5 sums checked

** libs

Error in .shlib_internal(args) :

C++14 standard requested but CXX14 is not defined

  • removing ‘/home/ubuntu/R_library/rstan’

ERROR: dependency ‘rstan’ is not available for package ‘prophet’

  • removing ‘/home/ubuntu/R_library/prophet’

lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 14.04.5 LTS

Release: 14.04

Codename: trusty

I've run into this before. I'll report back if I find a solution. 👍

EDIT: making my ~/.R/Makevars file look like,

CXX14 = g++ -std=c++1y

CXX14FLAGS = -O3 -Wno-unused-variable -Wno-unused-function

it looks like this came close to fixing the issue (pointing CXX14 flag at
the g++ compiler) but not quite.

R/lib -lR

/usr/bin/ld: chains.o: relocation R_X86_64_32 against `_ZGVZ7dataptrP7SEXPRECE3fun' can not be used when making a shared object; recompile with -fPIC

chains.o: error adding symbols: Bad value

collect2: error: ld returned 1 exit status

@bgoodri https://github.com/bgoodri, I was wondering if you think this
might be a new issue beyond
https://github.com/stan-dev/rstan/issues/569#issuecomment-430754916?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/prophet/issues/760#issuecomment-448268215,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADOrqsNZpA1NW3kU9YCI6oATxqp6_R4Sks5u6RP2gaJpZM4Y6Lxl
.

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robertdknight picture robertdknight  Â·  3Comments

datafool picture datafool  Â·  3Comments

GretaShi3084 picture GretaShi3084  Â·  3Comments

dsvrsec picture dsvrsec  Â·  3Comments

xiaoyaoyang picture xiaoyaoyang  Â·  3Comments