Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
smartpiserver mit Segmentation fault
#1
Hallo Forum,

endlich bin ich dabei meinen SmartPi aus der Kickstarter Aktion in Betrieb zu nehmen.
Nun bin ich aber auf ein Problem gestoßen.

Ich habe alles gemäß Anleitung (Installation via repo) installiert, aber wenn ich folgenden Befehle ausführe erhalte ich einen Segmentation fault:

pi@raspberrypi:~ $ smartpiserver &
[1] 921
pi@raspberrypi:~ $ smartpireadout &
[2] 922
[1]   Segmentation fault      smartpiserver
pi@raspberrypi:~ $ 

I2C läuft auch:
pi@raspberrypi:~ $ sudo i2cdetect -y 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- -- 

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --  

Woran kann es liegen und was kann ich als nächstes testen?

System: RPi B+
neueste headless Debian Image von raspberrypi.org mit apt-get update und upgrade.

Würde mich über Hilfe freuen.


Danke und beste Grüße,
Christoph
Reply
#2
Hallo Christoph,

verwendest du einen Raspi 2? Das fertig compilierte Binary läuft nur noch unter dem Raspi3.
Wenn du Ihn selbst kompilierst, sollte es gehen.
Bekommst du das hin?

Gruß Jens
Reply
#3
(20.11.2017, 11:10)jens Wrote: Hallo Christoph,

verwendest du einen Raspi 2? Das fertig compilierte Binary läuft nur noch unter dem Raspi3.
Wenn du Ihn selbst kompilierst, sollte es gehen.
Bekommst du das hin?

Gruß Jens

Hallo Jens,

danke für die Antwort. Es ist sogar noch ein B+. Werde mal versuchen selbst zu kompilieren. 

Beste Grüße,
Christoph
Reply
#4
Ok,
sonst melde dich nochmal.

Gruß Jens
Reply
#5
(20.11.2017, 11:10)jens Wrote: Hallo Christoph,

verwendest du einen Raspi 2? Das fertig compilierte Binary läuft nur noch unter dem Raspi3.
Wenn du Ihn selbst kompilierst, sollte es gehen.
Bekommst du das hin?

Gruß Jens

Habe jetzt versucht zu kompilieren. Dabei ist folgendes Problem aufgetreten:
pi@raspberrypi:/usr/local $ go get -v github.com/nDenerserve/SmartPi/src/smartpi
github.com/nDenerserve/SmartPi (download)
github.com/nDenerserve/SmartPi/vendor/github.com/Sirupsen/logrus
github.com/nDenerserve/SmartPi/vendor/github.com/eclipse/paho.mqtt.golang/packets
github.com/nDenerserve/SmartPi/vendor/golang.org/x/net/websocket
github.com/nDenerserve/SmartPi/vendor/github.com/eclipse/paho.mqtt.golang
github.com/nDenerserve/SmartPi/vendor/github.com/fatih/structs
github.com/nDenerserve/SmartPi/vendor/github.com/gorilla/context
github.com/nDenerserve/SmartPi/vendor/github.com/gorilla/mux
github.com/nDenerserve/SmartPi/vendor/golang.org/x/net/context
github.com/nDenerserve/SmartPi/vendor/github.com/mattn/go-sqlite3
github.com/nDenerserve/SmartPi/vendor/github.com/msteinert/pam
# github.com/nDenerserve/SmartPi/vendor/github.com/msteinert/pam
/home/pi/go/src/github.com/nDenerserve/SmartPi/vendor/github.com/msteinert/pam/transaction.go:4:31: fatal error: security/pam_appl.h: No such file or directory
 //#include <security/pam_appl.h>
                               ^
compilation terminated.
github.com/nDenerserve/SmartPi/vendor/github.com/nathan-osman/go-rpigpio
github.com/nDenerserve/SmartPi/vendor/github.com/oleiade/reflections
github.com/nDenerserve/SmartPi/vendor/golang.org/x/exp/io/i2c/driver
github.com/nDenerserve/SmartPi/vendor/golang.org/x/exp/io/i2c
github.com/nDenerserve/SmartPi/vendor/gopkg.in/ini.v1
pi@raspberrypi:/usr/local $ make
make: *** No targets specified and no makefile found.  Stop.
pi@raspberrypi:/usr/local $ cd ${GOPATH-$HOME/go}/src/github.com/nDenerserve/SmartPi
pi@raspberrypi:~/go/src/github.com/nDenerserve/SmartPi $ make
start building tree...
start building smartpireadout...
/usr/local/go/bin/go build -o bin/smartpireadout -ldflags="-X main.appVersion=f875051_2017-11-20_02:05:50pm" src/readout/*.go
# github.com/nDenerserve/SmartPi/vendor/github.com/msteinert/pam
vendor/github.com/msteinert/pam/transaction.go:4:31: fatal error: security/pam_appl.h: No such file or directory
 //#include <security/pam_appl.h>
                               ^
compilation terminated.

Es scheint eine Header-Datei zu fehlen. 

Über einen Hinweis, wo ich diese finde, wäre ich dankbar.

Beste Grüße,
Christoph
Reply
#6
(20.11.2017, 15:09)cmolitor Wrote:
(20.11.2017, 11:10)jens Wrote: Hallo Christoph,

verwendest du einen Raspi 2? Das fertig compilierte Binary läuft nur noch unter dem Raspi3.
Wenn du Ihn selbst kompilierst, sollte es gehen.
Bekommst du das hin?

Gruß Jens

Habe jetzt versucht zu kompilieren. Dabei ist folgendes Problem aufgetreten:
pi@raspberrypi:/usr/local $ go get -v github.com/nDenerserve/SmartPi/src/smartpi
github.com/nDenerserve/SmartPi (download)
github.com/nDenerserve/SmartPi/vendor/github.com/Sirupsen/logrus
github.com/nDenerserve/SmartPi/vendor/github.com/eclipse/paho.mqtt.golang/packets
github.com/nDenerserve/SmartPi/vendor/golang.org/x/net/websocket
github.com/nDenerserve/SmartPi/vendor/github.com/eclipse/paho.mqtt.golang
github.com/nDenerserve/SmartPi/vendor/github.com/fatih/structs
github.com/nDenerserve/SmartPi/vendor/github.com/gorilla/context
github.com/nDenerserve/SmartPi/vendor/github.com/gorilla/mux
github.com/nDenerserve/SmartPi/vendor/golang.org/x/net/context
github.com/nDenerserve/SmartPi/vendor/github.com/mattn/go-sqlite3
github.com/nDenerserve/SmartPi/vendor/github.com/msteinert/pam
# github.com/nDenerserve/SmartPi/vendor/github.com/msteinert/pam
/home/pi/go/src/github.com/nDenerserve/SmartPi/vendor/github.com/msteinert/pam/transaction.go:4:31: fatal error: security/pam_appl.h: No such file or directory
 //#include <security/pam_appl.h>
                               ^
compilation terminated.
github.com/nDenerserve/SmartPi/vendor/github.com/nathan-osman/go-rpigpio
github.com/nDenerserve/SmartPi/vendor/github.com/oleiade/reflections
github.com/nDenerserve/SmartPi/vendor/golang.org/x/exp/io/i2c/driver
github.com/nDenerserve/SmartPi/vendor/golang.org/x/exp/io/i2c
github.com/nDenerserve/SmartPi/vendor/gopkg.in/ini.v1
pi@raspberrypi:/usr/local $ make
make: *** No targets specified and no makefile found.  Stop.
pi@raspberrypi:/usr/local $ cd ${GOPATH-$HOME/go}/src/github.com/nDenerserve/SmartPi
pi@raspberrypi:~/go/src/github.com/nDenerserve/SmartPi $ make
start building tree...
start building smartpireadout...
/usr/local/go/bin/go build -o bin/smartpireadout -ldflags="-X main.appVersion=f875051_2017-11-20_02:05:50pm" src/readout/*.go
# github.com/nDenerserve/SmartPi/vendor/github.com/msteinert/pam
vendor/github.com/msteinert/pam/transaction.go:4:31: fatal error: security/pam_appl.h: No such file or directory
 //#include <security/pam_appl.h>
                               ^
compilation terminated.

Es scheint eine Header-Datei zu fehlen. 

Über einen Hinweis, wo ich diese finde, wäre ich dankbar.

Beste Grüße,
Christoph

ok, hatte wohl folgendes Paket nicht installiert, obwohl es ja extra erwähnt wurde: libpam0g-dev

Also nach folgendem Befehl hat es kompiliert:

Code:
sudo apt-get install libpam0g-dev
Reply
#7
Nach dem erfolgreichen Kompilieren habe ich noch folgende Befehle ausgeführt:

cd /usr/local
mkdir smartpi

# Suche Programm
sudo find / -name "smartpireadout"

# Ergebnis
--> /home/pi/go/src/github.com/nDenerserve/SmartPi/bin/smartpireadout

# Kopiere Programme in Verzeichnis für binaries
sudo cp /home/pi/go/src/github.com/nDenerserve/SmartPi/bin/smartpiftpupload .
sudo cp /home/pi/go/src/github.com/nDenerserve/SmartPi/bin/smartpireadout .
sudo cp /home/pi/go/src/github.com/nDenerserve/SmartPi/bin/smartpiserver .

# Passe Pfade an:
sudo nano ~/.profile

added:
PATH="/usr/local/smartpi:$PATH"

Nun noch folgendes Problem:
Unter http://IP:1080 erhalte ich "404 page not found" -> Webserver scheint zu laufen, aber irgendwas noch nicht konfiguriert.

Freue mich über eine Rückmeldung.
Danke,
Christoph
Reply
#8
Habe jetzt nochmal die Installation via repo durchgeführt:

apt-get install smartpi

und dann die binaries in /usr/local/bin/ durch die neu kompilierten in /home/pi/go/src/github.com/nDenerserve/SmartPi/bin/ ersetzt.

Nun läuft alles.
Reply
#9
Sehr schön.
Dann hattest du wahrscheinlich noch eine zwischenversion, wo es Probleme machte.
Reply
#10
Hallo Cristoph,

in dem englischen Forum hat jemand das gleiche Problem.
https://forum.enerserve.eu/showthread.php?tid=1263
Kannst du ihm die Binaries zur Verfügung stellen.
Wir organisieren uns jetzt einen Raspi2, um das in Zukunft zu testen.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)