Closed ghost closed 7 years ago
Heya! Sorry about that. Try now?
Thank you for getting back to me so quickly. Sadly, I still have a problem in installing the R binding. I was able to run libpostal using python in the terminal. Here is the error:
> devtools::install_github("ironholds/poster")
Downloading GitHub repo ironholds/poster@master
from URL https://api.github.com/repos/ironholds/poster/zipball/master
Installing poster
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
'/private/var/folders/bp/w10f290n0cg6kg8__z58k28dfvh41r/T/Rtmpg752dT/devtools8f19a879b4e/Ironholds-poster-5c5f66c' \
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests
* installing *source* package ‘poster’ ...
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/local/include
Using PKG_LIBS=-L/usr/local/lib -lpostal
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include" -fPIC -Wall -mtune=core2 -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include" -fPIC -Wall -mtune=core2 -g -O2 -c postal.cpp -o postal.o
postal.cpp:246:10: error: no matching function for call to 'create'
return DataFrame::create(_["house"] = house,
^~~~~~~~~~~~~~~~~
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:28:23: note: candidate function template not viable: requires single argument 't1', but 21 arguments were provided
static DataFrame_Impl create( const T1& t1 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:34:23: note: candidate function template not viable: requires 2 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:40:23: note: candidate function template not viable: requires 3 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:46:23: note: candidate function template not viable: requires 4 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:52:23: note: candidate function template not viable: requires 5 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:58:23: note: candidate function template not viable: requires 6 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:64:23: note: candidate function template not viable: requires 7 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:70:23: note: candidate function template not viable: requires 8 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:76:23: note: candidate function template not viable: requires 9 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:82:23: note: candidate function template not viable: requires 10 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:88:23: note: candidate function template not viable: requires 11 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:94:23: note: candidate function template not viable: requires 12 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:100:23: note: candidate function template not viable: requires 13 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:106:23: note: candidate function template not viable: requires 14 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:112:23: note: candidate function template not viable: requires 15 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:118:23: note: candidate function template not viable: requires 16 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:124:23: note: candidate function template not viable: requires 17 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:130:23: note: candidate function template not viable: requires 18 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:136:23: note: candidate function template not viable: requires 19 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h:142:23: note: candidate function template not viable: requires 20 arguments, but 21 were provided
static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ) {
^
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/DataFrame.h:93:31: note: candidate function not viable: requires 0 arguments, but 21 were provided
static DataFrame_Impl create(){
^
1 error generated.
make: *** [postal.o] Error 1
ERROR: compilation failed for package ‘poster’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/poster’
Error: Command failed (1)
Well, that's one way to implement varargs :-).
Incidentally, one of the first articles that comes up in Googling the 20-arg limit is https://ironholds.org/blog/creating-large-data-frames-in-rcpp/. So I take it something like this is needed @Ironholds?
Iiindeed. I'll put this bugfix next on my to-do list and see if I can't tidy up some of the code while I'm there.
@Ironholds Same issue, I also have libpostal
installed, in a non-standard location. While I was able to get Rpostal
working by using the libpostal_path
argument to its functions, since poster
looks for the installation of libpostal
at install time, I was not able to get it to work.
By nonstandard location do you mean it's not on the lconfig path, or?
@Ironholds @thatdatabaseguy I was wondering if I have to have libpostal in a particular directory so that poster can find it during the installation?
What operating system are you using?
I am using Mac OS X
Where and how are you installing it?
Where: /Users/asoto/projects/packages/libpostal
How: Using brew
Well, I can't speak to whether brew actually configures the linking flags properly, but to be clear the current bug you're running into is entirely unrelated to install location - it's a limitation of my current C++ binding, and one I hope to correct this evening.
The current repo shoould fix your problem. Let me know if it reappears. Fix aside, though, the code is now looking hella gross and I need to clean it up.
Success, thank you!!
Hi,
First, thank you for making this binding in R. I am trying to install poster, but I am running into an issue. Already installed all dependencies and libpostal. Even though, I am running into this error.
I am not sure where is the error. If you can help me to point the problem, it will be great.
Thank you, Alex