Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
697 stars 145 forks source link

Getting error on installing from source code #241

Open luizfilipefc-sp opened 4 years ago

luizfilipefc-sp commented 4 years ago

When I try to install from source code using command inside the project make && make install, I'm getting those warnings and error messages, that makes impossible to install the extension:

src/multicorn.c:262:28: warning: implicit declaration of function
      'TupleDescAttr' is invalid in C99 [-Wimplicit-function-declaration]
                        Form_pg_attribute att = TupleDescAttr(desc, i);
                                                ^
src/multicorn.c:262:22: warning: incompatible integer to pointer conversion
      initializing 'Form_pg_attribute' (aka 'struct FormData_pg_attribute *')
      with an expression of type 'int' [-Wint-conversion]
                        Form_pg_attribute att = TupleDescAttr(desc, i);
                                          ^     ~~~~~~~~~~~~~~~~~~~~~~
src/multicorn.c:420:18: error: no member named 'pathtarget' in 'struct Path'
        best_path->path.pathtarget->width = planstate->width;
        ~~~~~~~~~~~~~~~ ^
src/multicorn.c:607:27: warning: implicit declaration of function
      'TupleDescAttr' is invalid in C99 [-Wimplicit-function-declaration]
                Form_pg_attribute att = TupleDescAttr(desc, i);
                                        ^
src/multicorn.c:607:21: warning: incompatible integer to pointer conversion
      initializing 'Form_pg_attribute' (aka 'struct FormData_pg_attribute *')
      with an expression of type 'int' [-Wint-conversion]
src/multicorn.c:262:28: warning:                 Form_pg_attribute att = TupleDescAttr(desc, i);
                                  ^     ~~~~~~~~~~~~~~~~~~~~~~
implicit declaration of function
      'TupleDescAttr' is invalid in C99 [-Wimplicit-function-declaration]
                        Form_pg_attribute att = TupleDescAttr(desc, i);
                                                ^
src/multicorn.c:262:22: warning: incompatible integer to pointer conversion
      initializing 'Form_pg_attribute' (aka 'struct FormData_pg_attribute *')
      with an expression of type 'int' [-Wint-conversion]
                        Form_pg_attribute att = TupleDescAttr(desc, i);
                                          ^     ~~~~~~~~~~~~~~~~~~~~~~
src/multicorn.c:689:27: warning: implicit declaration of function
      'TupleDescAttr' is invalid in C99 [-Wimplicit-function-declaration]
                Form_pg_attribute att = TupleDescAttr(desc, i);
                                        ^
src/multicorn.c:689:21: warning: incompatible integer to pointer conversion
      initializing 'Form_pg_attribute' (aka 'struct FormData_pg_attribute *')
      with an expression of type 'int' [-Wint-conversion]
                Form_pg_attribute att = TupleDescAttr(desc, i);
                                  ^     ~~~~~~~~~~~~~~~~~~~~~~
src/multicorn.c:420:18: error: no member named 'pathtarget' in 'struct Path'
        best_path->path.pathtarget->width = planstate->width;
        ~~~~~~~~~~~~~~~ ^
src/multicorn.c:607:27: warning: implicit declaration of function
      'TupleDescAttr' is invalid in C99 [-Wimplicit-function-declaration]
                Form_pg_attribute att = TupleDescAttr(desc, i);
                                        ^
src/multicorn.c:607:21: warning: incompatible integer to pointer conversion
      initializing 'Form_pg_attribute' (aka 'struct FormData_pg_attribute *')
      with an expression of type 'int' [-Wint-conversion]
                Form_pg_attribute att = TupleDescAttr(desc, i);
                                  ^     ~~~~~~~~~~~~~~~~~~~~~~
src/multicorn.c:689:27: warning: implicit declaration of function
      'TupleDescAttr' is invalid in C99 [-Wimplicit-function-declaration]
                Form_pg_attribute att = TupleDescAttr(desc, i);
                                        ^
src/multicorn.c:689:21: warning: incompatible integer to pointer conversion
      initializing 'Form_pg_attribute' (aka 'struct FormData_pg_attribute *')
      with an expression of type 'int' [-Wint-conversion]
                Form_pg_attribute att = TupleDescAttr(desc, i);
                                  ^     ~~~~~~~~~~~~~~~~~~~~~~
6 warnings and 1 error generated.
6 warnings and 1 error generated.
make: *** [src/multicorn.o] Error 1
make: *** [src/multicorn.o] Error 1
[1]+  Exit 2                  make

Regarding the error it seems that it is a code error, trying to access a property that is not defined. Follow the error message separately:

src/multicorn.c:420:18: error: no member named 'pathtarget' in 'struct Path'
        best_path->path.pathtarget->width = planstate->width;

My environment is Mac OS X 10.14.5 (Mojave) Python 2.7 (I've tried to install python3 as default python but not find a solution for that) C++ - Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin18.6.0 Thread model: posix

Let me know if I should provide anything else...