khabbazian / l1ou

Detection of evolutionary shifts in Ornstein-Uhlenbeck models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github installation issues

cecileane opened this issue · comments

user request received by email: an error was received when attempting to install the package with install_github(). The error message said "cannot load shared object, invalid ELF header". Multiple people got this error: on an ubuntu machine and on a Mac machine.

I had this issue, with the following error message:

Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/user/R/x86_64-pc-linux-gnu-library/3.2/genlasso/libs/l1ou.so': /home/user/R/x86_64-pc-linux-gnu-library/3.2/genlasso/libs/l1ou.so: invalid ELF header Error: loading failed Execution halted

It was solved after doing the following (on ubuntu 16.04)

-install.packages(c("igraph", "phylolm", "lars", "grplasso", "magic", "Rcpp", "knitr"))
-manually installing "genlasso" , it has been removed from the R repos, and install_github()
gives a similar error as with l1ou, ('invalid EF header')
-in ubuntu, a complete LaTex installation with some extra packages packages; run 'sudo apt-get install texinfo texlive texlive-latex-extra texlive-fonts-extra' (yum in red-hat based systems)
-at this point I installed manually the l1ou package, but I later realized that install_github() also worked

Cheers
Gonzalo

oops, my comment from #37 was meant to be here. so it seems that the "shared object" error was the same issue I had.

Could the readme explain how to install the dependency genlasso prior to installing l1ou?

Thank you so much! Perhaps the instructions in the section without devtools might need a tweak too, to get genlasso from the CRAN archive. But my guess is that most people use devtools.

Hello there,

I'm trying to install l1ou on my Mac (OS 10.14.5) with R 3.6.0. I've tried both with and without devtools, and I keep getting the same error:

With devtools

install_github("glmgen/genlasso")
Downloading GitHub repo glmgen/genlasso@master
✔ checking for file ‘/private/var/folders/lx/95_0c4750xl3y7j1gnqqkbmr0000gn/T/RtmpB8glbB/remotes82e16d44d8b/glmgen-genlasso-aca435b/DESCRIPTION’ ...
─ preparing ‘genlasso’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘genlasso_1.4.tar.gz’

  • installing source package ‘genlasso’ ...
    ** using staged installation
    ** libs
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c matrixcomps.c -o matrixcomps.o
    In file included from matrixcomps.c:1:
    /Library/Frameworks/R.framework/Resources/include/R.h:55:11: fatal error: 'stdlib.h' file not found

include <stdlib.h> /* Not used by R itself, but widely assumed in packages */

      ^~~~~~~~~~

1 error generated.
make: *** [matrixcomps.o] Error 1
ERROR: compilation failed for package ‘genlasso’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/genlasso’
    Error in i.p(...) :
    (converted from warning) installation of package ‘/var/folders/lx/95_0c4750xl3y7j1gnqqkbmr0000gn/T//RtmpB8glbB/file82e1ca13d01/genlasso_1.4.tar.gz’ had non-zero exit status
Without devtools

install.packages("genlasso_1.3.tar.gz", repos=NULL, type="source")

  • installing source package ‘genlasso’ ...
    ** package ‘genlasso’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c matrixcomps.c -o matrixcomps.o
    In file included from matrixcomps.c:1:
    /Library/Frameworks/R.framework/Resources/include/R.h:55:11: fatal error: 'stdlib.h' file not found

include <stdlib.h> /* Not used by R itself, but widely assumed in packages */

      ^~~~~~~~~~

1 error generated.
make: *** [matrixcomps.o] Error 1
ERROR: compilation failed for package ‘genlasso’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/genlasso’
    Warning in install.packages :
    installation of package ‘genlasso_1.3.tar.gz’ had non-zero exit status

I also made sure to have Xcode installed, but still nothing seems to work.

it looks like this was cleared up, so closing the issue.

commented

Hi I'm have a GitHub install issue and I've used l1ou before and even used it in a publication. I have a new dataset that I want to use and I just updated my OS and R and I've lost the original l1ou so I tried installing it through GitHub in R and I get this message:

  • installing source package ‘l1ou’ ...
    ** using staged installation
    ** libs
    clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -std=c++0x -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    In file included from RcppExports.cpp:4:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:310:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:421:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/invoke.h:15:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/apply_cv.h:16:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/remove_reference.h:13:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:50:9: error: no member named 'nullptr_t' in the global namespace
    using ::nullptr_t;
    ~~^
    In file included from RcppExports.cpp:4:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:310:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:452:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_compound.h:14:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_fundamental.h:14:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
    template <> struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: template argument for template type parameter must be a type
    template <> struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
    ^~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:23:17: note: template parameter is declared here
    template struct __is_nullptr_t_impl : public false_type {};
    ^
    In file included from RcppExports.cpp:4:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:517:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/is_permutation.h:14:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/iterator_operations.h:15:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/advance.h:19:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__utility/unreachable.h:13:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdlib:123:9: error: target of using declaration conflicts with declaration already in scope
    using ::abs _LIBCPP_USING_IF_EXISTS;
    ^
    /usr/local/include/stdlib.h:132:6: note: target of using declaration
    int abs(int) __pure2;
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:339:1: note: conflicting declaration
    using ::abs _LIBCPP_USING_IF_EXISTS;
    ^
    In file included from RcppExports.cpp:4:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
    In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:523:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:25:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:848:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/allocator.h:18:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:94:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:149:45: error: field has incomplete type 'std::exception_ptr'
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : _ptr() {}
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:144:24: note: definition of 'std::exception_ptr' is not complete until the closing '}'
    class _LIBCPP_TYPE_VIS exception_ptr
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:149:5: error: 'abi_tag' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : _ptr() {}
    ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:689:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'

define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI

                                ^

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:673:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
attribute((abi_tag(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:523:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:848:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/allocator.h:18:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:94:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:149:55: error: expected ';' at end of declaration list
_LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : _ptr() {}
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:523:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:860:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:3: error: non-static data member cannot be constexpr; did you intend to make it const?
_LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : _ptr(__value_init_tag(), __value_init_tag()) {}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:728:31: note: expanded from macro '_LIBCPP_CONSTEXPR'

define _LIBCPP_CONSTEXPR constexpr

                          ^

In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:523:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:860:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:32: error: member 'nullptr_t' declared as a template
_LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : _ptr(__value_init_tag(), __value_init_tag()) {}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:42: error: expected ';' at end of declaration list
_LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : _ptr(__value_init_tag(), __value_init_tag()) {}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:262:25: error: unknown type name 'nullptr_t'
unique_ptr& operator=(nullptr_t) _NOEXCEPT {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:395:3: error: non-static data member cannot be constexpr; did you intend to make it const?
_LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : _ptr(__value_init_tag(), __value_init_tag()) {}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:728:31: note: expanded from macro '_LIBCPP_CONSTEXPR'

define _LIBCPP_CONSTEXPR constexpr

                          ^

In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:523:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:860:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:395:32: error: member 'nullptr_t' declared as a template
_LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : _ptr(__value_init_tag(), __value_init_tag()) {}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:395:42: error: expected ';' at end of declaration list
_LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : _ptr(__value_init_tag(), __value_init_tag()) {}
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:484:25: error: unknown type name 'nullptr_t'
unique_ptr& operator=(nullptr_t) _NOEXCEPT {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:533:14: error: unknown type name 'nullptr_t'
void reset(nullptr_t = nullptr) _NOEXCEPT {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:533:24: error: cannot initialize a parameter of type 'int' with an rvalue of type 'std::nullptr_t'
void reset(nullptr_t = nullptr) _NOEXCEPT {
^ ~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:533:24: note: passing argument to parameter here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:594:45: error: unknown type name 'nullptr_t'
operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:602:12: error: unknown type name 'nullptr_t'
operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘l1ou’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/l1ou’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/c9/ly1s261n4lz88rx2grwbqgyh0000gn/T//RtmpPAFmDK/file8dc75eba7d99/l1ou_1.43.tar.gz’ had non-zero exit status