3 Replies Latest reply on Apr 3, 2017 2:57 PM by Intel Corporation

    upm: Pull request to add support for ELEMENTZ IR sensor failing Travis build.

    Niti_Rohilla

      Hi All,

       

      I have created a Pull request to add support for Elementz IR Proximity sensor in UPM. The link for the Pull request is : https://github.com/intel-iot-devkit/upm/pull/536

       

      The Pull request is failing the Travis build with the following errors:

       

      Scanning dependencies of target elementzir-example-cxx

      [ 78%] Building CXX object examples/c++/CMakeFiles/elementzir-example-cxx.dir/elementzir.cxx.o

      Linking CXX executable ../elementzir-example-cxx

      ../../src/elementzir/libupm-elementzir.so.1.1.0: undefined reference to `mraa_gpio_init_raw'

      ../../src/elementzir/libupm-elementzir.so.1.1.0: undefined reference to `mraa_gpio_dir'

      ../../src/elementzir/libupm-elementzir.so.1.1.0: undefined reference to `mraa_gpio_read'

      ../../src/elementzir/libupm-elementzir.so.1.1.0: undefined reference to `mraa_result_print'

      ../../src/elementzir/libupm-elementzir.so.1.1.0: undefined reference to `mraa_gpio_close'

      collect2: error: ld returned 1 exit status

      make[2]: *** [examples/elementzir-example-cxx] Error 1

      make[1]: *** [examples/c++/CMakeFiles/elementzir-example-cxx.dir/all] Error 2

      make: *** [all] Error 2

      The command "cd $UPM_ROOT && mkdir $UPM_BUILD && cd $_ && cmake -DNODE_ROOT_DIR:PATH="${NODE_ROOT_DIR}" -DBUILDSWIGJAVA=$BUILDJAVA -DBUILDEXAMPLES=ON -DBUILDTESTS=ON -DBUILDFTI=ON .. && sudo make install && sudo ldconfig && ctest --output-on-failure -E examplenames_js" exited with 2.

      Done. Your build exited with 1.

       

      I have tested it on Raspberry Pi 2 Model B V1.1 and I was able to compile the it successfully and I was also able to execute its example to test it. To compile the example i.e. elementzir.cxx in upm/examples/c++, I have to link it to the mraa library explicitly. I followed these steps to compile and run the example:

       

      1)export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

      2)g++ elementzir.cxx -o elementzir -lupm-elementzir -lmraa -I/usr/local/include/upm

      3)./elementzir

       

       

      Please help me to understand why my Pull request is failing the travis build and how I can resolve it.

       

       

      Thanks