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
Comments
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
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. |
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! |
@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. |
@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. |
I was able to download and compile a newer version of gcc on Centos 6. After adding these lines to the ~/.R/Makevars file:
It successfully compiled using the newer version - unfortunately R doesn't correctly load the library:
And changing the LD_LIBRARY_PATH:
I don't suppose there would be an easy fix for this? |
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. |
Hmm. I added the additional path to gcc 4.9.1 should be a late enough version to be able to compile this, right? |
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 |
Any solution for |
Lubridate 1.7.0 will not install or update on Red Hat Enterprise Linux 6 (version 1.6.0 was previously installed and working):
** 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’
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
The text was updated successfully, but these errors were encountered: