I get this error by installing dht22 plugin:
Error installing plugin pimatic-dht-sensors: Error running “./node_modules/pimatic/ppm.js install pimatic-dht-sensors@0.9.2 --unsafe-perm”
Ideas?
[Solved] pimatic-dht-sensor installation fails on OSMC Release 10.2016
I get this error by installing dht22 plugin:
Error installing plugin pimatic-dht-sensors: Error running “./node_modules/pimatic/ppm.js install pimatic-dht-sensors@0.9.2 --unsafe-perm”
Ideas?
I tried to install it manuell, then i get this:
osmc@DodOsmc:~/pimatic-app$ sudo npm install pimatic-dht-sensors@0.9.2 --unsafe-perm
\
> node-dht-sensor@0.0.31 preinstall /home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
> ./check-lib.sh
+--------------------------------------------------------------------------------+
| ERROR: Library BCM2835 not found! |
| Make sure you follow instructions from http://www.airspayce.com/mikem/bcm2835/ |
| to install the BCM2835 library on your system first then install this addon. |
+--------------------------------------------------------------------------------+
|
> node-dht-sensor@0.0.31 install /home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
> node-gyp configure
> node-dht-sensor@0.0.31 postinstall /home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
> node-gyp build
make: Entering directory '/home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/build'
CXX(target) Release/obj.target/node_dht_sensor/node-dht-sensor.o
CXX(target) Release/obj.target/node_dht_sensor/dht-sensor.o
../dht-sensor.cpp:4:21: fatal error: bcm2835.h: No such file or directory
#include <bcm2835.h>
^
compilation terminated.
node_dht_sensor.target.mk:97: recipe for target 'Release/obj.target/node_dht_sensor/dht-sensor.o' failed
make: *** [Release/obj.target/node_dht_sensor/dht-sensor.o] Error 1
make: Leaving directory '/home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.4.27-2-osmc
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
gyp ERR! node -v v4.6.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.27-2-osmc
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pimatic-dht-sensors@0.9.2" "--unsafe-perm"
npm ERR! node v4.6.2
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! node-dht-sensor@0.0.31 postinstall: `node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-dht-sensor@0.0.31 postinstall script 'node-gyp build'.
npm ERR! This is most likely a problem with the node-dht-sensor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-dht-sensor
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-dht-sensor
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/osmc/pimatic-app/npm-debug.logosmc@DodOsmc:~/pimatic-app$
It seems there is a library i didn’t have?
@mwittig @leader21 @Harry-van-der-Wolf
can you help?
@Dodo88 Did you install the BCM2835 library as indicated in the README?
https://www.npmjs.com/package/pimatic-dht-sensors
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
I try this
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz;
tar xvfz bcm2835-1.50.tar.gz;
cd bcm2835-1.50;
./configure;
make;
sudo make install
But the dht install in webgui abort and give me the same, the library install shows no error
The underlying node-dht-sensor package uses the checklib.sh .
If I install the bcm2835 library and issue the command to check it, I get
gcc -lbcm2835
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../arm-linux-gnueabihf/crt1.o: In function `_start':
(.text+0x34): undefined reference to `main'
collect2: error: ld returned 1 exit status
On both of my systems. I think something is wrong with that checklib.sh script ot maybe not the chrecklib script but with the gcc install on raspbian based raspberrys.
Interesting. Thanks for spotting this. I think the problem is the BCM2835 build. Possibly related to http://stackoverflow.com/questions/11116399/crt1-o-in-function-start-undefined-reference-to-main-in-linux
The error handling of the check-lib.sh script might be improved to work around the issue.
https://github.com/momenso/node-dht-sensor/issues/58
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@Dodo88 As you can see I have forked the past 7 posts to a new thread as a thread should always fokus on a single topic.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
yeah i see it, thx. I hope somebody find a solution soon I think positive
Does a Alternative exist @mwittig ?
Or have i to wait for a solution?
Greets Dodo
@Dodo88 said in pimatic-dht-sensor installation fails on OSMC Release 10.2016:
Does a Alternative exist
Well, pimatic-homeduino provides support for DHT11/22, but I have never used that. It may limited to a single sensor.
Regarding pimatic-dht-sensors I kindly ask you for patience. It may take a few day to get this fixed.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@Harry-van-der-Wolf said in pimatic-dht-sensor installation fails on OSMC Release 10.2016:
I think something is wrong with that checklib.sh script ot maybe not the chrecklib script but with the gcc install on raspbian based raspberrys.
I have researched this a little bit further. I think the error is not a problem and can be neglected. The script checklib.sh works as expected as far as I can see. At least it does on Raspbian. I’ll need to revisit this using my OSMC setup, though.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Works for me. Tested on Raspi Pi B+ with OSMC Release 10.2016
Here is how I have installed the library bcm2835:
osmc@osmc:~$ mkdir bcm2835
osmc@osmc:~$ cd bcm2835/
osmc@osmc:~/bcm2835$ wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.ta r.gz
converted 'http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz' (ANSI_X3. 4-1968) -> 'http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz' (UTF-8)
--2016-11-23 00:16:30-- http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar .gz
Resolving www.airspayce.com (www.airspayce.com)... 192.185.48.187
Connecting to www.airspayce.com (www.airspayce.com)|192.185.48.187|:80... connec ted.
HTTP request sent, awaiting response... 200 OK
Length: 252178 (246K) [application/x-gzip]
Saving to: 'bcm2835-1.50.tar.gz'
bcm2835-1.50.tar.gz 100%[=====================>] 246.27K 269KB/s in 0.9s
2016-11-23 00:16:32 (269 KB/s) - 'bcm2835-1.50.tar.gz' saved [252178/252178]
osmc@osmc:~/bcm2835$ tar xvfz bcm2835-1.50.tar.gz
bcm2835-1.50/
bcm2835-1.50/config.sub
bcm2835-1.50/ChangeLog
bcm2835-1.50/doc/
bcm2835-1.50/doc/Makefile.am
bcm2835-1.50/doc/Makefile.in
bcm2835-1.50/doc/Doxyfile.in
bcm2835-1.50/aclocal.m4
bcm2835-1.50/configure.ac
bcm2835-1.50/README
bcm2835-1.50/src/
bcm2835-1.50/src/bcm2835.h
bcm2835-1.50/src/Makefile.am
bcm2835-1.50/src/bcm2835.c
bcm2835-1.50/src/test.c
bcm2835-1.50/src/Makefile.in
bcm2835-1.50/INSTALL
bcm2835-1.50/depcomp
bcm2835-1.50/config.h.in
bcm2835-1.50/config.guess
bcm2835-1.50/NEWS
bcm2835-1.50/COPYING
bcm2835-1.50/Makefile.am
bcm2835-1.50/ltmain.sh
bcm2835-1.50/configure
bcm2835-1.50/missing
bcm2835-1.50/install-sh
bcm2835-1.50/Makefile.in
bcm2835-1.50/AUTHORS
bcm2835-1.50/examples/
bcm2835-1.50/examples/blink/
bcm2835-1.50/examples/blink/blink.c
bcm2835-1.50/examples/i2c/
bcm2835-1.50/examples/i2c/i2c.c
bcm2835-1.50/examples/input/
bcm2835-1.50/examples/input/input.c
bcm2835-1.50/examples/gpio/
bcm2835-1.50/examples/gpio/gpio.c
bcm2835-1.50/examples/spin/
bcm2835-1.50/examples/spin/spin.c
bcm2835-1.50/examples/event/
bcm2835-1.50/examples/event/event.c
bcm2835-1.50/examples/spi/
bcm2835-1.50/examples/spi/spi.c
bcm2835-1.50/examples/pwm/
bcm2835-1.50/examples/pwm/pwm.c
bcm2835-1.50/test-driver
osmc@osmc:~/bcm2835$ cd bcm2835-1.50
bcm2835-1.50/ bcm2835-1.50.tar.gz
osmc@osmc:~/bcm2835$ cd bcm2835-1.50
bcm2835-1.50/ bcm2835-1.50.tar.gz
osmc@osmc:~/bcm2835$ cd bcm2835-1.50
osmc@osmc:~/bcm2835/bcm2835-1.50$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/osmc/bcm2835/bcm2835-1.50/missing: Unknown `--is-lightweight' option
Try `/home/osmc/bcm2835/bcm2835-1.50/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for clock_gettime in -lrt... yes
checking for doxygen... no
configure: WARNING: Doxygen not found - continuing without Doxygen support
checking for ranlib... ranlib
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
osmc@osmc:~/bcm2835/bcm2835-1.50$ make
make all-recursive
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50'
Making all in src
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT bcm2835.o -MD -MP -MF .deps/bcm2835. Tpo -c -o bcm2835.o bcm2835.c
mv -f .deps/bcm2835.Tpo .deps/bcm2835.Po
rm -f libbcm2835.a
ar cru libbcm2835.a bcm2835.o
ranlib libbcm2835.a
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
Making all in doc
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50'
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50'
osmc@osmc:~/bcm2835/bcm2835-1.50$ sudo make check
Making check in src
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make test
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT test.o -MD -MP -MF .deps/test.Tpo -c -o test.o test.c
mv -f .deps/test.Tpo .deps/test.Po
gcc -g -O2 -o test test.o ./libbcm2835.a -lrt
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make check-TESTS
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[3]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
PASS: test
make[4]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
============================================================================
Testsuite summary for bcm2835 1.50
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
Making check in doc
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50'
osmc@osmc:~/bcm2835/bcm2835-1.50$ sudo make install
Making install in src
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
/bin/mkdir -p '/usr/local/lib'
/usr/bin/install -c -m 644 libbcm2835.a '/usr/local/lib'
( cd '/usr/local/lib' && ranlib libbcm2835.a )
/bin/mkdir -p '/usr/local/include'
/usr/bin/install -c -m 644 bcm2835.h '/usr/local/include'
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
Making install in doc
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50'
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50'
Then, I have installed pimatic-dht-sensors using the pimatic frontend:
06:05:38.412 [pimatic] info: Installing: "pimatic-dht-sensors@0.9.2" from npm-registry.
06:05:54.496 [pimatic, ppm] info: > node-dht-sensor@0.0.31 preinstall /home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
06:05:54.518 [pimatic, ppm] info: > ./check-lib.sh
06:05:55.206 [pimatic, ppm] info: Library bcm2835 found.
06:05:57.644 [pimatic, ppm] info: > node-dht-sensor@0.0.31 install /home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
06:05:57.666 [pimatic, ppm] info: > node-gyp configure
06:06:09.454 [pimatic, ppm] info: > node-dht-sensor@0.0.31 postinstall /home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
06:06:09.477 [pimatic, ppm] info: > node-gyp build
06:06:12.619 [pimatic, ppm] info: make: Entering directory '/home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/build'
06:06:12.659 [pimatic, ppm] info: CXX(target) Release/obj.target/node_dht_sensor/node-dht-sensor.o
06:06:33.360 [pimatic, ppm] info: CXX(target) Release/obj.target/node_dht_sensor/dht-sensor.o
06:06:35.183 [pimatic, ppm] info: SOLINK_MODULE(target) Release/obj.target/node_dht_sensor.node
06:06:36.024 [pimatic, ppm] info: COPY Release/node_dht_sensor.node
06:06:36.123 [pimatic, ppm] info: make: Leaving directory '/home/osmc/pimatic-app/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/build'
06:07:51.108 [pimatic, ppm] info: pimatic-dht-sensors@0.9.2 node_modules/pimatic-dht-sensors
06:07:51.141 [pimatic, ppm] info: └── node-dht-sensor@0.0.31 (nan@2.4.0)
coffee-cache: compiling coffee-script file "dht-sensors.coffee"...Done
06:29:12.439 [pimatic-cron] info: the time is: Wed Nov 23 2016 06:29:12 GMT+0000 (UTC)
coffee-cache: compiling coffee-script file "device-config-schema.coffee"...Done
06:29:17.127 [pimatic-mobile-frontend] info: packing static assets
06:29:18.615 [pimatic-mobile-frontend] info: packing static assets finished
06:29:18.649 [pimatic-mobile-frontend] info: rendering html
06:30:03.393 [pimatic-mobile-frontend] info: rendering html finished
06:30:03.578 [pimatic] info: Listening for HTTP-request on port 80...
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig
I did exact your steps (but raspberry pi 2 model b). I get the same error like on top.
In pimatic webgui i see this error:
Error installing plugin pimatic-dht-sensors: Error running "./node_modules/pimatic/ppm.js install pimatic-dht-sensors@0.9.2 --unsafe-perm"
The bcm2835 install-progress looks like yours.
This in putty:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Nov 23 13:06:34 2016 from 192.168.178.201
osmc@DodOsmc:~$ sudo npm install pimatic-dht-sensors@0.9.2 --unsafe-perm
npm WARN peerDependencies The peer dependency pimatic@>=0.8.0 <1.0.0 included from pimatic-dht-sensors will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
> node-dht-sensor@0.0.31 preinstall /home/osmc/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor> ./check-lib.sh
Library bcm2835 found.
-
> node-dht-sensor@0.0.31 install /home/osmc/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
> node-gyp configure
> node-dht-sensor@0.0.31 postinstall /home/osmc/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
> node-gyp build
make: Entering directory '/home/osmc/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/build'
CXX(target) Release/obj.target/node_dht_sensor/node-dht-sensor.o
CXX(target) Release/obj.target/node_dht_sensor/dht-sensor.o
SOLINK_MODULE(target) Release/obj.target/node_dht_sensor.node
/usr/bin/ld: //usr/local/lib/libbcm2835.a(bcm2835.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
//usr/local/lib/libbcm2835.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
node_dht_sensor.target.mk:124: recipe for target 'Release/obj.target/node_dht_sensor.node' failed
make: *** [Release/obj.target/node_dht_sensor.node] Error 1
make: Leaving directory '/home/osmc/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.4.27-2-osmc
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /home/osmc/node_modules/pimatic-dht-sensors/node_modules/node-dht-sensor
gyp ERR! node -v v4.6.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.27-2-osmc
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pimatic-dht-sensors@0.9.2" "--unsafe-perm"
npm ERR! node v4.6.2
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! node-dht-sensor@0.0.31 postinstall: `node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-dht-sensor@0.0.31 postinstall script 'node-gyp build'.
npm ERR! This is most likely a problem with the node-dht-sensor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-dht-sensor
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-dht-sensor
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/osmc/npm-debug.log
osmc@DodOsmc:~$
@Dodo88 said in pimatic-dht-sensor installation fails on OSMC Release 10.2016:
I did exact your steps (but raspberry pi 2 model b).
According to what you wrote in your earlier post it seems like you have left out the step sudo make check
, right?
I get the same error like on top.
Well, to be precise, it is not the same error.
I’ll have another go on Raspi2.
Please use markup to quote code command snippets. See https://forum.pimatic.org/topic/1179/how-to-post-code-on-the-forum. Thanks
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig
Hm… Can you give me a step by step for my raspberry pi 2?
Should i give you my complete install path incl installing dht?
@mwittig @Harry-van-der-Wolf @leader21 can you watch over my install pls? Or somebody else?
I have an Raspberry Pi 2 Model B and the newest OSMC
This is my BCM2835 Install
root@DodOsmc:/home/osmc/bcm2835# wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz
converted 'http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz' (ANSI_X3.4-1968) -> 'http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz' (UTF-8)
--2016-11-24 18:35:34-- http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz
Resolving www.airspayce.com (www.airspayce.com)... 192.185.48.187
Connecting to www.airspayce.com (www.airspayce.com)|192.185.48.187|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 252178 (246K) [application/x-gzip]
Saving to: 'bcm2835-1.50.tar.gz.1'
bcm2835-1.50.tar.gz. 100%[======================>] 246.27K 439KB/s in 0.6s
2016-11-24 18:35:35 (439 KB/s) - 'bcm2835-1.50.tar.gz.1' saved [252178/252178]
root@DodOsmc:/home/osmc/bcm2835# tar xvfz bcm2835-1.50.tar.gz
bcm2835-1.50/
bcm2835-1.50/config.sub
bcm2835-1.50/ChangeLog
bcm2835-1.50/doc/
bcm2835-1.50/doc/Makefile.am
bcm2835-1.50/doc/Makefile.in
bcm2835-1.50/doc/Doxyfile.in
bcm2835-1.50/aclocal.m4
bcm2835-1.50/configure.ac
bcm2835-1.50/README
bcm2835-1.50/src/
bcm2835-1.50/src/bcm2835.h
bcm2835-1.50/src/Makefile.am
bcm2835-1.50/src/bcm2835.c
bcm2835-1.50/src/test.c
bcm2835-1.50/src/Makefile.in
bcm2835-1.50/INSTALL
bcm2835-1.50/depcomp
bcm2835-1.50/config.h.in
bcm2835-1.50/config.guess
bcm2835-1.50/NEWS
bcm2835-1.50/COPYING
bcm2835-1.50/Makefile.am
bcm2835-1.50/ltmain.sh
bcm2835-1.50/configure
bcm2835-1.50/missing
bcm2835-1.50/install-sh
bcm2835-1.50/Makefile.in
bcm2835-1.50/AUTHORS
bcm2835-1.50/examples/
bcm2835-1.50/examples/blink/
bcm2835-1.50/examples/blink/blink.c
bcm2835-1.50/examples/i2c/
bcm2835-1.50/examples/i2c/i2c.c
bcm2835-1.50/examples/input/
bcm2835-1.50/examples/input/input.c
bcm2835-1.50/examples/gpio/
bcm2835-1.50/examples/gpio/gpio.c
bcm2835-1.50/examples/spin/
bcm2835-1.50/examples/spin/spin.c
bcm2835-1.50/examples/event/
bcm2835-1.50/examples/event/event.c
bcm2835-1.50/examples/spi/
bcm2835-1.50/examples/spi/spi.c
bcm2835-1.50/examples/pwm/
bcm2835-1.50/examples/pwm/pwm.c
bcm2835-1.50/test-driver
root@DodOsmc:/home/osmc/bcm2835# cd bcm2835-1.50
root@DodOsmc:/home/osmc/bcm2835/bcm2835-1.50# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/osmc/bcm2835/bcm2835-1.50/missing: Unknown `--is-lightweight' option
Try `/home/osmc/bcm2835/bcm2835-1.50/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for clock_gettime in -lrt... yes
checking for doxygen... no
configure: WARNING: Doxygen not found - continuing without Doxygen support
checking for ranlib... ranlib
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@DodOsmc:/home/osmc/bcm2835/bcm2835-1.50# make
make all-recursive
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50'
Making all in src
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT bcm2835.o -MD -MP -MF .deps/bcm2835.Tpo -c -o bcm2835.o bcm2835.c
mv -f .deps/bcm2835.Tpo .deps/bcm2835.Po
rm -f libbcm2835.a
ar cru libbcm2835.a bcm2835.o
ranlib libbcm2835.a
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
Making all in doc
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50'
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50'
root@DodOsmc:/home/osmc/bcm2835/bcm2835-1.50# sudo make check
Making check in src
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make test
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT test.o -MD -MP -MF .deps/test.Tpo -c -o test.o test.c
mv -f .deps/test.Tpo .deps/test.Po
gcc -g -O2 -o test test.o ./libbcm2835.a -lrt
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make check-TESTS
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[3]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
PASS: test
make[4]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
============================================================================
Testsuite summary for bcm2835 1.50
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
Making check in doc
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50'
root@DodOsmc:/home/osmc/bcm2835/bcm2835-1.50# sudo make install
Making install in src
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/src'
/bin/mkdir -p '/usr/local/lib'
/usr/bin/install -c -m 644 libbcm2835.a '/usr/local/lib'
( cd '/usr/local/lib' && ranlib libbcm2835.a )
/bin/mkdir -p '/usr/local/include'
/usr/bin/install -c -m 644 bcm2835.h '/usr/local/include'
make[2]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
make[1]: Leaving directory '/home/osmc/bcm2835/bcm2835-1.50/src'
Making install in doc
make[1]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
make[2]: Entering directory '/home/osmc/bcm2835/bcm2835-1.50/doc'
This is the DHT Install
osmc@DodOsmc:~$ sudo npm install pimatic-dht-sensors@0.9.2 --unsafe-perm
npm WARN peerDependencies The peer dependency pimatic@>=0.8.0 <1.0.0 included fr om pimatic-dht-sensors will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerD ependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
\
> node-dht-sensor@0.0.31 preinstall /home/osmc/node_modules/pimatic-dht-sensors/ node_modules/node-dht-sensor
> ./check-lib.sh
Library bcm2835 found.
-
> node-dht-sensor@0.0.31 install /home/osmc/node_modules/pimatic-dht-sensors/nod e_modules/node-dht-sensor
> node-gyp configure
> node-dht-sensor@0.0.31 postinstall /home/osmc/node_modules/pimatic-dht-sensors /node_modules/node-dht-sensor
> node-gyp build
make: Entering directory '/home/osmc/node_modules/pimatic-dht-sensors/node_modul es/node-dht-sensor/build'
CXX(target) Release/obj.target/node_dht_sensor/node-dht-sensor.o
CXX(target) Release/obj.target/node_dht_sensor/dht-sensor.o
SOLINK_MODULE(target) Release/obj.target/node_dht_sensor.node
/usr/bin/ld: //usr/local/lib/libbcm2835.a(bcm2835.o): relocation R_ARM_THM_MOVW_ ABS_NC against `a local symbol' can not be used when making a shared object; rec ompile with -fPIC
//usr/local/lib/libbcm2835.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
node_dht_sensor.target.mk:124: recipe for target 'Release/obj.target/node_dht_se nsor.node' failed
make: *** [Release/obj.target/node_dht_sensor.node] Error 1
make: Leaving directory '/home/osmc/node_modules/pimatic-dht-sensors/node_module s/node-dht-sensor/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_ modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:211:12)
gyp ERR! System Linux 4.4.27-2-osmc
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_mod ules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /home/osmc/node_modules/pimatic-dht-sensors/node_modules/node-dht-s ensor
gyp ERR! node -v v4.6.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.27-2-osmc
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pimatic-dht- sensors@0.9.2" "--unsafe-perm"
npm ERR! node v4.6.2
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! node-dht-sensor@0.0.31 postinstall: `node-gyp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-dht-sensor@0.0.31 postinstall script 'node-gyp build '.
npm ERR! This is most likely a problem with the node-dht-sensor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-dht-sensor
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls node-dht-sensor
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/osmc/npm-debug.log
osmc@DodOsmc:~$
Any Ideas?
It looks like there is something wrong with your libbcm2835a (//usr/local/lib/libbcm2835.a: error adding symbols: Bad value
).
Can you do a: readelf -a -W /usr/local/lib/libbcm2835.a
This will deliver an en
This is a long shot but we need to start somewhere.
code deleted
wrong!
It’s again something where a library can’t be found and you need to do the symlink (ln -s) that @mwittig earlier showed but I can find it back.
@Dodo88 said in pimatic-dht-sensor installation fails on OSMC Release 10.2016:
Any Ideas?
In my test setup I don’t have the symlink for “ld-linux.so.3” which set earlier for the homeduino stuff. May the symlink is breaking the bcm2835 build somehow or it is confusing the linker when called via node-gyp. I’ll check this and get back to you.
@Harry-van-der-Wolf
https://forum.pimatic.org/topic/2460/solved-installing-pimatic-0-9-osmc/58
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Do you want to see this?
No version information found in this file.
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3-D16
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: SP and DP
Tag_ABI_VFP_args: VFP registers
Tag_ABI_optimization_goals: Aggressive Speed
Tag_CPU_unaligned_access: v6
osmc@DodOsmc:~$