GithubHelp home page GithubHelp logo

node-gyp build fails about pigpio HOT 8 CLOSED

fivdi avatar fivdi commented on August 24, 2024
node-gyp build fails

from pigpio.

Comments (8)

dkebler avatar dkebler commented on August 24, 2024

I did have the daemon running so per your instructions I stopped it and disabled it in systemd, but building again I get the same errors

from pigpio.

fivdi avatar fivdi commented on August 24, 2024

Can you post the exact command used to perform the install and the complete output of that command please?

from pigpio.

fivdi avatar fivdi commented on August 24, 2024

I would imagine that an attempt is being made to install an old version of pigpio. Please try with the latest version of pigpio which is v0.5.1.

from pigpio.

dkebler avatar dkebler commented on August 24, 2024

I assume you mean pigpio itself since the above is complete output from npm when running npm install pigpio

I did...

wget abyz.co.uk/rpi/pigpio/pigpio.tar
tar xf pigpio.tar
cd PIGPIO
make
sudo make install

from pigpio site. It does throw some warnings. See below

I found there was some pigpio loaded from the orginial image says 1.30-1-xenial?? so I purged that

What exact files are you using in what linux directory Is is /usr/local/???. Only the daemon has a cli that reports a version and it says version 61 so kinda hard to determine the version after install.

this is what sudo make install says

install -m 0755 -d                /opt/pigpio/cgi
install -m 0755 -d                /usr/local/include
install -m 0644 pigpio.h          /usr/local/include
install -m 0644 pigpiod_if.h      /usr/local/include
install -m 0644 pigpiod_if2.h     /usr/local/include
install -m 0755 -d                /usr/local/lib
install -m 0755 libpigpio.so      /usr/local/lib
install -m 0755 libpigpiod_if.so  /usr/local/lib
install -m 0755 libpigpiod_if2.so /usr/local/lib
install -m 0755 -d                /usr/local/bin
install -m 0755 pig2vcd           /usr/local/bin
install -m 0755 pigpiod           /usr/local/bin
install -m 0755 pigs              /usr/local/bin

make output

sysadmin@sbc:/opt/PIGPIO$ make
gcc -O3 -Wall -pthread -fpic -c -o pigpio.o pigpio.c
pigpio.c: In function ‘pthTimerTick’:
pigpio.c:6764:29: warning: format not a string literal and no format arguments [-Wformat-security]
             fprintf(stderr, buf);
                             ^
pigpio.c: In function ‘pthFifoThread’:
pigpio.c:6855:19: warning: format not a string literal and no format arguments [-Wformat-security]
                   fprintf(outFifo, cmdUsage);
                   ^
pigpio.c: In function ‘i2cOpen’:
pigpio.c:3979:7: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
       system("/sbin/modprobe i2c_dev");
       ^
pigpio.c:3980:7: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
       system("/sbin/modprobe i2c_bcm2835");
       ^
pigpio.c: In function ‘i2cSwitchCombined’:
pigpio.c:4042:20: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
       if (setting) write(fd, "1\n", 2); else write(fd, "0\n", 2);
                    ^
pigpio.c:4042:46: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
       if (setting) write(fd, "1\n", 2); else write(fd, "0\n", 2);
                                              ^
pigpio.c: In function ‘pthSocketThreadHandler’:
pigpio.c:6975:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
       write(sock, p, 16);
       ^
pigpio.c:7000:16: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                write(sock, buf, p[3]);
                ^
pigpio.c: In function ‘initGrabLockFile’:
pigpio.c:7152:10: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
          write(fd, pidStr, strlen(pidStr));
          ^
pigpio.c: In function ‘pthISRThread’:
pigpio.c:11345:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
    read(fd, buf, sizeof buf);
    ^
pigpio.c:11358:10: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
          read(fd, buf, sizeof buf);
          ^
gcc -O3 -Wall -pthread -fpic -c -o command.o command.c
gcc -shared -o libpigpio.so pigpio.o command.o
strip --strip-unneeded libpigpio.so
size     libpigpio.so
   text	   data	    bss	    dec	    hex	filename
 181116	   5360	 598336	 784812	  bf9ac	libpigpio.so
gcc -O3 -Wall -pthread -fpic -c -o pigpiod_if.o pigpiod_if.c
gcc -shared -o libpigpiod_if.so pigpiod_if.o command.o
strip --strip-unneeded libpigpiod_if.so
size     libpigpiod_if.so
   text	   data	    bss	    dec	    hex	filename
  51786	   4316	  49244	 105346	  19b82	libpigpiod_if.so
gcc -O3 -Wall -pthread -fpic -c -o pigpiod_if2.o pigpiod_if2.c
gcc -shared -o libpigpiod_if2.so pigpiod_if2.o command.o
strip --strip-unneeded libpigpiod_if2.so
size     libpigpiod_if2.so
   text	   data	    bss	    dec	    hex	filename
  59821	   4316	   1984	  66121	  10249	libpigpiod_if2.so
gcc -O3 -Wall -pthread   -c -o x_pigpio.o x_pigpio.c
gcc -o x_pigpio x_pigpio.o -L. -lpigpio -pthread -lrt
gcc -O3 -Wall -pthread   -c -o x_pigpiod_if.o x_pigpiod_if.c
gcc -o x_pigpiod_if x_pigpiod_if.o -L. -lpigpiod_if -pthread -lrt
gcc -O3 -Wall -pthread   -c -o x_pigpiod_if2.o x_pigpiod_if2.c
gcc -o x_pigpiod_if2 x_pigpiod_if2.o -L. -lpigpiod_if2 -pthread -lrt
gcc -O3 -Wall -pthread   -c -o pig2vcd.o pig2vcd.c
gcc -o pig2vcd pig2vcd.o
strip pig2vcd
gcc -O3 -Wall -pthread   -c -o pigpiod.o pigpiod.c
gcc -o pigpiod pigpiod.o -L. -lpigpio -pthread -lrt
strip pigpiod
gcc -O3 -Wall -pthread   -c -o pigs.o pigs.c
gcc -o pigs pigs.o command.o
strip pigs

from pigpio.

dkebler avatar dkebler commented on August 24, 2024

I the the pigpio c library has a version function, but it doesn't look like you provided a binding for that so I can see what version pigpio node thinks it's using?

from pigpio.

fivdi avatar fivdi commented on August 24, 2024

I don't think there's an issue with the pigpio C library. It's the pigpio JS package that's causing the issue. Is that really the complete output of npm install pigpio? As in every single character of output?

Also, does the directory where npm install pigpio is being called from contain a package.json file? If so, what are the contents of that file?

from pigpio.

dkebler avatar dkebler commented on August 24, 2024

You were right it was the version.


I am using pigipo as a dependency in a package to the code I am running. I have a headless setup so I actually code on my main box and it syncs the packages I am working on to node_modules on the main code on the rpi. So I obviously can't do an install on that machine but rather later with npm install without save on the RPI. That means I have to hand code the package into package.json. Not knowing the version I just put in ^0.0.1 assuming npm would pick up the latest....it didn't. Just my misunderstanding of how npm uses semiversions. I put in "0.5.1" and all is well....:-). I better read up on npm semiversion useage again!

BTW I have done this with epoll, and ic2-bus successfully so was kinda scratching my head.

from pigpio.

fivdi avatar fivdi commented on August 24, 2024

Good to hear it's working now :)

from pigpio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.