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

Issues during installation on RHEL 6 #601

Closed
arnonerba opened this Issue Nov 1, 2017 · 8 comments

Comments

Projects
None yet
4 participants
@arnonerba
Copy link

arnonerba commented Nov 1, 2017

Lubridate 1.7.0 will not install or update on Red Hat Enterprise Linux 6 (version 1.6.0 was previously installed and working):

install.packages("lubridate")
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'https://mirror.las.iastate.edu/CRAN/src/contrib/lubridate_1.7.0.tar.gz'
Content type 'application/x-gzip' length 398375 bytes (389 KB)
==================================================
downloaded 389 KB

  • installing source package ‘lubridate’ ...
    ** package ‘lubridate’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o
    gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c datetime.c -o datetime.o
    gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c period.c -o period.o
    gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c tparse.c -o tparse.o
    tparse.c: In function ‘C_parse_dt’:
    tparse.c:62: warning: ‘oYEAR’ may be used uninitialized in this function
    tparse.c:62: warning: ‘oMONTH’ may be used uninitialized in this function
    tparse.c:62: warning: ‘oDAY’ may be used uninitialized in this function
    tparse.c:62: warning: ‘oHOUR’ may be used uninitialized in this function
    tparse.c:62: warning: ‘oMIN’ may be used uninitialized in this function
    tparse.c:290: warning: ‘is_leap’ may be used uninitialized in this function
    g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG -I. -I./cctz/include/ -I./cctz/src/ -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c update.cpp -o update.o
    In file included from ./cctz/include/civil_time.h:18,
    from update.cpp:2:
    ./cctz/include/civil_time_detail.h:37: error: expected nested-name-specifier before ‘year_t’
    ./cctz/include/civil_time_detail.h:37: error: ‘year_t’ has not been declared
    ./cctz/include/civil_time_detail.h:37: error: expected ‘;’ before ‘=’ token
    ./cctz/include/civil_time_detail.h:37: error: expected unqualified-id before ‘=’ token
    ./cctz/include/civil_time_detail.h:41: error: expected nested-name-specifier before ‘diff_t’
    ./cctz/include/civil_time_detail.h:41: error: ‘diff_t’ has not been declared
    ./cctz/include/civil_time_detail.h:41: error: expected ‘;’ before ‘=’ token
    ./cctz/include/civil_time_detail.h:41: error: expected unqualified-id before ‘=’ token
    ./cctz/include/civil_time_detail.h:46: error: expected nested-name-specifier before ‘month_t’
    ./cctz/include/civil_time_detail.h:46: error: ‘month_t’ has not been declared
    ./cctz/include/civil_time_detail.h:46: error: expected ‘;’ before ‘=’ token
    ./cctz/include/civil_time_detail.h:46: error: expected unqualified-id before ‘=’ token
    ./cctz/include/civil_time_detail.h:47: error: expected nested-name-specifier before ‘day_t’
    ./cctz/include/civil_time_detail.h:47: error: ‘day_t’ has not been declared
    ./cctz/include/civil_time_detail.h:47: error: expected ‘;’ before ‘=’ token
    ./cctz/include/civil_time_detail.h:47: error: expected unqualified-id before ‘=’ token
    ./cctz/include/civil_time_detail.h:48: error: expected nested-name-specifier before ‘hour_t’
    ./cctz/include/civil_time_detail.h:48: error: ‘hour_t’ has not been declared
    ./cctz/include/civil_time_detail.h:48: error: expected ‘;’ before ‘=’ token
    ./cctz/include/civil_time_detail.h:48: error: expected unqualified-id before ‘=’ token
    ./cctz/include/civil_time_detail.h:49: error: expected nested-name-specifier before ‘minute_t’
    ./cctz/include/civil_time_detail.h:49: error: ‘minute_t’ has not been declared
    ./cctz/include/civil_time_detail.h:49: error: expected ‘;’ before ‘=’ token
    ./cctz/include/civil_time_detail.h:49: error: expected unqualified-id before ‘=’ token
    ./cctz/include/civil_time_detail.h:50: error: expected nested-name-specifier before ‘second_t’
    ./cctz/include/civil_time_detail.h:50: error: ‘second_t’ has not been declared
    ./cctz/include/civil_time_detail.h:50: error: expected ‘;’ before ‘=’ token
    ./cctz/include/civil_time_detail.h:50: error: expected unqualified-id before ‘=’ token
    ./cctz/include/civil_time_detail.h:54: error: expected ‘)’ before ‘year’
    ./cctz/include/civil_time_detail.h:78: error: ‘cctz::detail::impl::is_leap_year’ declared as an ‘inline’ variable
    ./cctz/include/civil_time_detail.h:78: error: ‘year_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:78: error: expected ‘,’ or ‘;’ before ‘noexcept’
    ./cctz/include/civil_time_detail.h:81: error: ‘cctz::detail::impl::year_index’ declared as an ‘inline’ variable
    ./cctz/include/civil_time_detail.h:81: error: ‘year_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:81: error: ‘month_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:81: error: initializer expression list treated as compound expression
    ./cctz/include/civil_time_detail.h:81: error: expected ‘,’ or ‘;’ before ‘noexcept’
    ./cctz/include/civil_time_detail.h:84: error: ‘cctz::detail::impl::days_per_century’ declared as an ‘inline’ variable
    ./cctz/include/civil_time_detail.h:84: error: ‘year_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:84: error: ‘month_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:84: error: initializer expression list treated as compound expression
    ./cctz/include/civil_time_detail.h:84: error: expected ‘,’ or ‘;’ before ‘noexcept’
    ./cctz/include/civil_time_detail.h:88: error: ‘cctz::detail::impl::days_per_4years’ declared as an ‘inline’ variable
    ./cctz/include/civil_time_detail.h:88: error: ‘year_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:88: error: ‘month_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:88: error: initializer expression list treated as compound expression
    ./cctz/include/civil_time_detail.h:88: error: expected ‘,’ or ‘;’ before ‘noexcept’
    ./cctz/include/civil_time_detail.h:92: error: ‘cctz::detail::impl::days_per_year’ declared as an ‘inline’ variable
    ./cctz/include/civil_time_detail.h:92: error: ‘year_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:92: error: ‘month_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:92: error: initializer expression list treated as compound expression
    ./cctz/include/civil_time_detail.h:92: error: expected ‘,’ or ‘;’ before ‘noexcept’
    ./cctz/include/civil_time_detail.h:95: error: ‘cctz::detail::impl::days_per_month’ declared as an ‘inline’ variable
    ./cctz/include/civil_time_detail.h:95: error: ‘year_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:95: error: ‘month_t’ was not declared in this scope
    ./cctz/include/civil_time_detail.h:95: error: initializer expression list treated as compound expression
    ./cctz/include/civil_time_detail.h:95: error: expected ‘,’ or ‘;’ before ‘noexcept’
    update.cpp:371: error: expected ‘}’ at end of input
    update.cpp:371: error: expected ‘}’ at end of input
    update.cpp:371: error: expected ‘}’ at end of input
    make: *** [update.o] Error 1
    ERROR: compilation failed for package ‘lubridate’
  • removing ‘/usr/lib64/R/library/lubridate’

The downloaded source packages are in
‘/tmp/RtmpZAQIGJ/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("lubridate") :
installation of package ‘lubridate’ had non-zero exit status

@vspinu

This comment has been minimized.

Copy link
Member

vspinu commented Nov 1, 2017

Well, I guess it's an outdated gcc compiler which is to blame. We need C++11 as CCTZ requires that. So the obvious options are

  • update gcc if you can
  • install lubridate 1.6 like devtools::install_version("lubridate", "1.6.0"). Not recommended as there a couple of severe bugs there.
  • install dev version just before CCTZ devtools::install_github("tidyverse/lubridate@before-CCTZ")

Please let me know if any of the above worked for you.

Sorry about this but there is no way I am going back on CCTZ. It would be close to imposible to improve on time-zone manipulation and date-time updates without it.

@vspinu vspinu referenced this issue Nov 1, 2017

Merged

Lubridate 1.7.0 #49

@arnonerba

This comment has been minimized.

Copy link
Author

arnonerba commented Nov 1, 2017

Aha, another issue that can be blamed on RHEL 6's outdated set of system tools (it is gcc version 4.4.7). I'll see if I can update gcc; otherwise, I'll roll back to 1.6.0. Thanks for the help!

@c2b2pss

This comment has been minimized.

Copy link

c2b2pss commented Jan 14, 2018

@arnonerba : How did you update system tools? I do not have root permission and I need to update gcc. Will RHEL ever get with the program ???? frustrating

Thanks in advance.

@arnonerba

This comment has been minimized.

Copy link
Author

arnonerba commented Jan 14, 2018

@c2b2pss Unfortunately, I couldn't find a good solution to update gcc on RHEL 6 so I just rolled back lubridate. I doubt RHEL 6 will get a newer version of gcc, but RHEL 7 and CentOS 7 both include updated development tools.

@jpearl01

This comment has been minimized.

Copy link

jpearl01 commented Feb 15, 2018

I was able to download and compile a newer version of gcc on Centos 6. After adding these lines to the ~/.R/Makevars file:

CC=/opt/gcc_4.9.1/rtf/bin/gcc -std=gnu99
CXX1X=/opt/gcc_4.9.1/rtf/bin/g++

It successfully compiled using the newer version - unfortunately R doesn't correctly load the library:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/opt/R/R-3.3.3/library/lubridate/libs/lubridate.so':
  /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /opt/R/R-3.3.3/library/lubridate/libs/lubridate.so)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/opt/R/R-3.3.3/library/lubridate’

And changing the LD_LIBRARY_PATH:
$ LD_LIBRARY_PATH="/opt/gcc_4.9.1/rtf/lib64/:$LD_LIBRARY_PATH"
(which I kind of don't want to do - would rather have something in the Makevars file) doesn't work either, though I do get a new error:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/opt/R/R-3.3.3/library/lubridate/libs/lubridate.so':
  /opt/R/R-3.3.3/library/lubridate/libs/lubridate.so: undefined symbol: _ZN4cctz14load_time_zoneERKSsPNS_9time_zoneE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/opt/R/R-3.3.3/library/lubridate’

I don't suppose there would be an easy fix for this?

@vspinu

This comment has been minimized.

Copy link
Member

vspinu commented Feb 15, 2018

That symbol comes from the CCTZ library which suggests that linker couldn't find it in the lubridate.so archive. So either something went wrong during the compilation or linker looks at a wrong file. I occasionally see such errors during the development due to stale object files but restarting the session and re-installing from scratch always helps.

Regarding LD_LIBRARY_PATH you might be able to set it in .Renvioron file.

@jpearl01

This comment has been minimized.

Copy link

jpearl01 commented Feb 15, 2018

Hmm. I added the additional path to LD_LIBRARY_PATH in /opt/R/R-3.3.3/etc/ldpaths and that does get rid of the GLIBC error, but not the undefined symbol: _ZN4cctz14load_time_zoneERKSsPNS_9time_zoneE

gcc 4.9.1 should be a late enough version to be able to compile this, right?

@vspinu

This comment has been minimized.

Copy link
Member

vspinu commented Feb 16, 2018

yes. 4.9.1 should be just fine. It's the linker problem, it somehow misses the symbol in the archive or R picks wrong archive. This is what I see on my machine:

~$ locate lubridate.so
/home/vspinu/.lib/R/lubridate/libs/lubridate.so
/store/Dropbox/dev/lubridate/src/lubridate.so
~$ nm -gC /store/Dropbox/dev/lubridate/src/lubridate.so  | grep load_time_zone
0000000000020720 T cctz::load_time_zone(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cctz::time_zone*)
~$ nm -g /store/Dropbox/dev/lubridate/src/lubridate.so  | grep load_time_zone
0000000000020720 T _ZN4cctz14load_time_zoneERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_9time_zoneE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.