RidgeRun / r2inference

RidgeRun Inference Framework
Other
27 stars 10 forks source link

Library-installation verification example, failing at compiling. #36

Open campos-97 opened 5 years ago

campos-97 commented 5 years ago

Followed all the steps for building and installing r2inference, provided in the wiki:

git clone https://github.com/RidgeRun/r2inference.git
cd r2inference
./autogen.sh $OPTIONS --enable-tensorflow
make
make check
sudo make install

Every one of them executes successfully. The problem is that when compiling the example given in the wiki for validating the library installation it gives a the following error:

r2inference_verify.cpp:1:10: fatal error: r2i/r2i.h: No such file or directory
 #include <r2i/r2i.h>

The example in question is the following:

#include <r2i/r2i.h>

int main (int argc, char *argv[]) {
  r2i::RuntimeError error;

  auto factory = r2i::IFrameworkFactory::MakeFactory(r2i::FrameworkCode::NCSDK, error);

  return error;
}

The example is the one given at the end of the wiki page: https://developer.ridgerun.com/wiki/index.php?title=R2Inference/Getting_started/Building_the_library

michaelgruner commented 5 years ago

Hi @campos-97 thanks for your report. Indeed the wiki was short on instructions. I extended the example and added the build line for you to test.

Please let me know your results.

campos-97 commented 5 years ago

Hi @michaelgruner, thank you very much for your help. I tried to compile the new validation example and unfortunately it failed with a different error:

/tmp/ccauB698.o: In function `main':
r2i_validate.cc:(.text+0x121): undefined reference to `r2i::RuntimeError::RuntimeError()'
r2i_validate.cc:(.text+0x184): undefined reference to `r2i::IFrameworkFactory::List(r2i::RuntimeError&)'
collect2: error: ld returned 1 exit status

I would also suggest to change the suggested name r2i_verify.cc for the example to r2i_validate.cc, just for it to match the build command and avoid confusion.

Thanks again.