Closed h4rvey-g closed 3 years ago
Are you able to build other packages, such as tidyr
?
I had a same error, try install.packages("stringi", configure.args="--with-extra-cxxflags='--std=gnu++11'"), is also same error. but install.packages(tidyr) done!
Are you able to build other packages, such as
tidyr
?
Yes, tidyr
installation seems fine.
Having the same problem when trying to install it
Still, most probably there's something wrong with your build chain.
Could you please download the package source, run ./configure
manually and paste the generated config.log
file?
For example:
cd /tmp
wget https://cran.r-project.org/src/contrib/stringi_1.7.5.tar.gz
tar -zxf stringi_1.7.5.tar.gz
cd stringi
./configure
and then upload /tmp/stringi/config.log here ?
So we see:
configure:4098: checking whether the C++ compiler supports the long long type
configure:4118: x86_64-conda-linux-gnu-c++ -std=c++11 -o conftest -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/wangyinan/miniconda3/envs/r/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base-split_1630154298835/work=/usr/local/src/conda/r-base-4.1.1 -fdebug-prefix-map=/home/wangyinan/miniconda3/envs/r=/usr/local/src/conda-prefix -fpic -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/wangyinan/miniconda3/envs/r/include -I/home/wangyinan/miniconda3/envs/r/include -Wl,-rpath-link,/home/wangyinan/miniconda3/envs/r/lib -UDEBUG -DNDEBUG conftest.cpp >&5
/home/wangyinan/miniconda3/envs/r/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/wangyinan/miniconda3/envs/r/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/lib/../lib/libstdc++.so: undefined reference to `aligned_alloc@GLIBC_2.16'
/home/wangyinan/miniconda3/envs/r/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/wangyinan/miniconda3/envs/r/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/lib/../lib/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17'
collect2: error: ld returned 1 exit status
configure:4118: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "stringi"
| #define PACKAGE_TARNAME "stringi"
| #define PACKAGE_VERSION "1.7"
| #define PACKAGE_STRING "stringi 1.7"
| #define PACKAGE_BUGREPORT "https://stringi.gagolewski.com"
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
|
| #include <iostream>
| using namespace std;
|
| int main() {
| long long x = 1;
| cout << x << endl;
|
| cout << 1LL << 1ULL << endl;
| cout << 9223372036854775807LL << 18446744073709551615ULL << endl;
|
| return 0;
| }
|
configure:4125: result: no
Especially this part worries me:
/home/wangyinan/miniconda3/envs/r/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/wangyinan/miniconda3/envs/r/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/lib/../lib/libstdc++.so: undefined reference to `aligned_alloc@GLIBC_2.16'
This indicates an improperly configured environment – and not a problem with stringi per se. As not only you suffer from this problem, I suggest it be fixed at a more general level – Try filing a bug report to the maintainers of the (mini)conda project
See https://docs.conda.io/en/latest/contributing.html#new-issues
Please keep me in the loop with regards to this.
PS: I would also give conda update --all
a try
I searched the undefined reference
above and found that it probably relates to the version of gnu c library. After several trials I found glib<=2.66.0
would be compatible. So for anyone encountering similar problems, you could try conda create -c conda-forge r-base=4.0.2 glib=2.66.0
, which works well on my server to successfully install stringi
and packages depending on it. I will file an issue to conda when available.
Thanks for the update! I hope it'll help the others.
Here is what comes out after
install.packages("stringi")
I tried
configure.args="--with-extra-cxxflags='--std=c++11'"
and replacinggnu++11
toc++11
in Makeconf (#452 ) but got basically the same error. The problem seems to beC++ compiler supports the long long type... no
but I don't know how to fix it. Here is some information.gcc version 9.3.0 (crosstool-NG 1.24.0.133_b0863d8_dirty)