telegraf-kostal-modbus
telegraf-kostal-modbus copied to clipboard
Schritt 6 schlägt fehl
Folgender Fehler bei Schritt 6 auf meinem Raspberry Pi 3:
Step 6/15 : RUN go get -d -v github.com/influxdata/telegraf && go get -d -v github.com/goburrow/modbus && cd $GOPATH/src/github.com/influxdata/telegraf && git checkout 1.8.0 && git apply /tmp/4623.patch && cp /tmp/modbus.go plugins/inputs/modbus/modbus.go && git config user.email "[email protected]" && git config user.name "a" && git stash && git checkout 1.11.2 && git stash apply && make deps telegraf && mkdir -p /build && cp telegraf /build/telegraf
---> Running in fb131d1e454f
github.com/influxdata/telegraf (download)
github.com/goburrow/modbus (download)
github.com/goburrow/serial (download)
Note: checking out '1.8.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 07d2f2d8... Telegraf 1.8.0
/tmp/4623.patch:41: trailing whitespace.
package modbus
/tmp/4623.patch:42: trailing whitespace.
/tmp/4623.patch:43: trailing whitespace.
import (
/tmp/4623.patch:44: trailing whitespace.
"encoding/binary"
/tmp/4623.patch:45: trailing whitespace.
"fmt"
warning: squelched 533 whitespace errors
warning: 538 lines add whitespace errors.
Saved working directory and index state WIP on (no branch): 07d2f2d8 Telegraf 1.8.0
HEAD is now at 07d2f2d8 Telegraf 1.8.0
Previous HEAD position was 07d2f2d8... Telegraf 1.8.0
HEAD is now at a80d173f... Telegraf 1.11.2
Auto-merging plugins/inputs/all/all.go
HEAD detached at 1.11.2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: plugins/inputs/all/all.go
Untracked files:
(use "git add <file>..." to include in what will be committed)
.vscode/
plugins/inputs/modbus/
no changes added to commit (use "git add" and/or "git commit -a")
dep ensure -vendor-only
Irgendeine Idee was da los ist?
@Eime ich sehe hier keinen Abbruch, lediglich Hinweise von Git die sich aus dem Merge ergeben. Wenn es zu einem Abbruch kam, dann ist der Fehler weiter unten im Log zu suchen, der Teil fehlt hier aber.
Vom Raspi ist aber bekannt, dass er zu wenig Arbeitsspeicher hat, und deshalb beim Compile-Vorgang den Compiler abschießt (im Log taucht dann irgendwo "signal: killed" auf, bspw. so:
dep ensure -vendor-only
Building static linux binary...
/usr/local/go/pkg/tool/linux_arm/link: signal: killed
Das lässt sich lösen, indem der Raspi mehr Swap-Platz bekommt. Sollte sich bei Raspbian so einrichten lassen: https://wpitchoune.net/tricks/raspberry_pi3_increase_swap_size.html
Sobald die Images gebaut sind, kann man das Swap wieder zurückstellen auf die Ursprungswerte.