<div dir="ltr"><div><div>OK, ich habe beide Fehler gefunden. Einmal in meinem Skript etwas zuviel optimiert, einmal liegt der Fehler im letzten Commit bzw. den Abhängigkeiten. Leider ist github down, sobald das wieder da ist korrigier ichs.<br><br></div>Viele Grüße,<br></div>Andreas<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-02 17:37 GMT+01:00 Andre Bernemann <span dir="ltr"><<a href="mailto:andre.bernemann@gmail.com" target="_blank">andre.bernemann@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br>Hallo Andreas,<div><br></div><div><div class="gmail_quote">Andreas Goetz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am Mo., 2. März 2015 um 16:23 Uhr:<span class=""><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hallo Andre,<br><div class="gmail_extra"><br><div class="gmail_quote"></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 2, 2015 at 2:55 PM, Andre Bernemann <span dir="ltr"><<a href="mailto:andre.bernemann@gmail.com" target="_blank">andre.bernemann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:13.1999998092651px;line-height:20px">gute Idee, Danke für das Skript. Ich habe es mal getestet, und prinzipiell funktioniert es bis auf ein paar Kleinigkeiten:</div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Das wäre ja schön, aber die Mängelliste ist ja doch etwas länger.<span style="font-size:13.1999998092651px"> </span></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">1. ./install.sh libsml --> klappt einwandfrei</div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Der vollständigkeit halber: was hast Du vorher gemacht? git clone? wget? Hattest Du install.sh auch mal ohne Parameter aufgerufen? Gelten die Ergebnisse unten für einen frischen git clone? Wann hattest Du das getestet?<br></div></div></div></div></blockquote><div><br></div></span><div>Vorher hatte ich einen git reset durchgeführt. Ich habe libsml schon woanders liegen, der Installer hat es aber innerhalb des vzlogger Ordners (unter libs wie geplant) neu angelegt. Damit ist libsml ein frischer git clone, obwohl mein pi libsml grundsätzlich schon mal kompiliert hat. Dependencies sind demnach alle vorhanden. Durchgeführt habe ich es nach den letzten Änderungen im git (efd38e9).</div><div><br></div><div>Ich habe es nun wie folgt nochmal auf 2 rPi's durchgeführt:</div><div><br></div><div>- wget install.sh</div><div>- chmod +x</div><div>- ./install ohne Parameter aufgerufen: Alles wird heruntergeladen, erster Fehler tritt beim make von libjson auf (s.u.). </div><div>- manuell autogen.sh in ./vzlogger/libs/json-c aufgerufen</div><div>- touch INSTALL im vzlogger Verzeichnis</div><div>- nochmals ./install.sh ohne Parameter aufgerufen</div><div>--> läuft dann fast komplett durch, zuletzt kommt noch ein kleiner Fehler aus Z249: <span style="font-size:13.1999998092651px">./install.sh: line 247: [: too many arguments, aber das ist ja eine Kleinigkeit.</span></div><div><div class="h5"><div><span style="font-size:13.1999998092651px"> </span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">2. ./install.sh libjson:</div><div style="font-size:13.1999998092651px;line-height:20px">Ich bekomme folgenden Fehler:</div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px"><div>CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/pi/vz/vzlogger/libs/<u></u>json<u></u>-c/missing aclocal-1.14 </div><div>/home/pi/vz/vzlogger/libs/<u></u>json<u></u>-c/missing: line 81: aclocal-1.14: command not found</div><div>WARNING: 'aclocal-1.14' is missing on your system.</div><div>         You should only need it if you modified 'acinclude.m4' or</div><div>         '<a href="http://configure.ac/" target="_blank">configure.ac</a>' or m4 files included by '<a href="http://configure.ac/" target="_blank">configure.ac</a>'.</div><div>         The 'aclocal' program is part of the GNU Automake package:</div><div>         <<a href="http://www.gnu.org/software/automake" target="_blank">http://www.gnu.org/software/<u></u><u></u>automake</a>></div><div>         It also requires GNU Autoconf, GNU m4 and Perl in order to run:</div><div>         <<a href="http://www.gnu.org/software/autoconf" target="_blank">http://www.gnu.org/software/<u></u><u></u>autoconf</a>></div><div>         <<a href="http://www.gnu.org/software/m4/" target="_blank">http://www.gnu.org/software/<u></u><u></u>m4/</a>></div><div>         <<a href="http://www.perl.org/" target="_blank">http://www.perl.org/</a>></div><div>Makefile:462: recipe for target 'aclocal.m4' failed</div><div>make: *** [aclocal.m4] Error 127</div></div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">Wenn ich die Skripte (autogen.sh && ...) manuell direkt im Ordner libs/json-c durchlaufen lasse klappt es. Möglicherweise gibt es ein Problem mit pushd und autogen.sh?</div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Ich passe. Überhaupt keine Idee. Kann das nur nochmal vom Start weg versuchen nachzuvollziehen.<br> <br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>3. ./install.sh vzlogger <br></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:13.1999998092651px;line-height:20px">Fehler:</div><div style="font-size:13.1999998092651px;line-height:20px"><div>Install the project...</div><div>/usr/bin/cmake -P cmake_install.cmake</div><div>-- Install configuration: ""</div><div>-- Installing: /usr/local/share/doc/vzlogger-<u></u><u></u>0-4/README</div><div>CMake Error at cmake_install.cmake:36 (FILE):</div><div>  file INSTALL cannot find "/home/pi/vz/vzlogger/INSTALL"<u></u><u></u>.</div><div>Makefile:65: recipe for target 'install' failed</div><div>make: *** [install] Error 1</div></div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">Neben INSTALL wird auch die Datei COPYING in cmake_install.cmake referenziert. Lege ich die beiden Dateien an funktioniert es.</div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Kommt der Fehler auch wenn Du einfach nur <br><br>cmake . <br></div><div>make<br></div><div>sudo make install<br></div><div><br>aufrufst?</div></div></div></div></blockquote><div><br></div></div></div><div>Ja.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span style="font-size:13.1999998092651px"> </span><br></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>Bei mir gibt es COPYING, im git ist sie ebenfalls- warum existiert die Datei bei Dir nicht standardmäßig?<br></div><div><br></div><div>@root, @mbehr: kann es sein dass das Aufräumen der Automake Umgebung etwas damit zu tun hat (mindestens bzgl. INSTALL)?<br></div></div></div></div></blockquote><div><br></div></span><div>Ok, COPYING war da, hatte ich übersehen, mein Fehler. INSTALL fehlt allerdings.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">Gruß</div><div style="font-size:13.1999998092651px;line-height:20px">André</div></div></blockquote><div><br></div><div>Viele Grüße,<br></div><div>Andreas<br></div></div></div></div></blockquote><div><br></div></span><div>Ich hoffe das hilft weiter.</div><div><br></div><div>Gruß</div><div>André</div><div><br></div><div>P.S.: Komplett OT, aber ich wäre ein großer Fan des raw Kontextes in der Middleware.</div><div><div class="h5"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:13.1999998092651px;line-height:20px"><br></div><br><div class="gmail_quote">Andreas Goetz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am So., 1. März 2015 um 13:49 Uhr:</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hallo Zusammen,<br><br></div>ich hab mal versucht ein Skript zu bauen das vzlogger installiert oder- sofern schon vorhanden- aktualisiert. Wäre schön wenn das jemand testen könnte bevor ich es im git einstelle (@Udo: das wäre auch was für Dich ;)<br><br></div>Viele Grüße,<br></div>Andreas<br><br><br>#!/bin/bash<br>#<br># Installer<br>#<br># @copyright Copyright (c) 2015, The <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> project<br># @license <a href="http://www.opensource.org/licenses/gpl-license.php" target="_blank">http://www.opensource.org/<u></u>licenses/gpl-license.php</a> GNU Public License<br># @author Andreas Goetz<br>#<br>##<br># The installer will clone all required repositories or update them if necessary.<br># Then the modules are compiled and installed<br># <br># USAGE:<br># <br>#   Run install.sh from vzlogger or parent folder<br>#   <br>#       ./install.sh<br>#       <br>#   To execute specific parts of the build select which ones to run:<br>#       <br>#       ./install.sh <list of modules> <br>#   <br>#   Modules:<br>#     - vzlogger (libraries must be in place already)<br>#     - libjson<br>#     - libsml<br>#     - clean (will clean the respektive make targets, requires explicitly naming the modules)<br># <br>#     To run a clean build:<br>#     <br>#       ./install.sh vzlogger libjson libsml clean<br>#       <br>##<br># This file is part of <a href="http://volkzaehler.org" target="_blank">volkzaehler.org</a><br>#<br># <a href="http://volkzaehler.org" target="_blank">volkzaehler.org</a> is free software: you can redistribute it and/or modify<br># it under the terms of the GNU General Public License as published by<br># the Free Software Foundation, either version 3 of the License, or<br># any later version.<br>#<br># <a href="http://volkzaehler.org" target="_blank">volkzaehler.org</a> is distributed in the hope that it will be useful,<br># but WITHOUT ANY WARRANTY; without even the implied warranty of<br># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br># GNU General Public License for more details.<br>#<br># You should have received a copy of the GNU General Public License<br># along with <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a>. If not, see <<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>><u></u>.<br>##<br><br>set -e<br>shopt -s nocasematch<br><br>##############################<u></u>#<br># some defaults<br>vzlogger_dir=vzlogger<br>lib_dir=libs<br>git_config=.git/config<br><br>##############################<u></u>#<br># functions<br>ask() {<br>    question="$1"<br>    default="$2"<br>    read -e -p "$question [$default] "<br>    REPLY="${REPLY:-$default}"<br>}<br><br>contains() {<br>    [[ $1 =~ $2 ]] && true || false<br>}<br><br>git_is_repo() {<br>    folder="$1"<br>    match="${2-$folder}"<br><br>    if [ -e "$folder/$git_config" ] && grep -q "$match" "$folder/$git_config"; then<br>        true<br>    else<br>        false<br>    fi<br>}<br><br>git_update() {<br>    folder="$1"<br>    git_repo="$2"<br>    match="${3-$folder}"<br>    git_params="${4-}"<br><br>    if git_is_repo $folder $match; then<br>        echo "$folder folder: $(pwd)/$folder"<br>        git_dirty=$(cd $folder; git fetch; git log HEAD.. --oneline)<br>    else<br>        echo "$folder not found"<br>        echo "cloning $folder git repository"<br>        git clone $git_params "$git_repo"<br>    fi<br><br>    if [ -n "$git_dirty" ]; then<br>        echo "updating $folder git repository with remote changes"<br>        pushd $folder<br>            git pull<br>        popd<br>    fi<br>}<br><br><br>##############################<u></u>#<br># header<br>echo "vzlogger installation script"<br><br>##############################<u></u>#<br># check prerequisites<br>echo<br>echo -n "checking prerequisites:"<br><br>deps=( grep pidof git cmake pkg-config autoreconf )<br>for binary in "${deps[@]}"; do<br>    if binpath="$(which $binary)" ; then<br>        echo -n " $binary"<br>    else<br>        echo<br>        echo " $binary: not found. Please install to use this script (e.g. sudo apt-get install $binary)."<br>        exit 1<br>    fi<br>done<br>echo<br><br>##############################<u></u>#<br>echo<br>echo "vzlogger setup..."<br>if [ -n "$1" ]; then<br>    echo "setup modules: $1"<br>fi<br><br>##############################<u></u>#<br>echo<br>echo "checking for vzlogger folder"<br><br>if git_is_repo . vzlogger; then<br>    # move to parent folder<br>    cd ..<br>fi<br><br>if [ -z "$1" ] || contains "$*" vzlogger; then<br>    git_update "$vzlogger_dir" <a href="https://github.com/volkszaehler/vzlogger.git" target="_blank">https://github.com/<u></u>volkszaehler/vzlogger.git</a> vzlogger<br>fi<br><br>pushd "$vzlogger_dir"<br><br>##############################<u></u>#<br>echo<br>echo "checking for libraries"<br><br>if [ ! -d "$lib_dir" ]; then<br>    echo "creating library folder $lib_dir"<br>    mkdir "$lib_dir"<br>fi<br>pushd "$lib_dir"<br><br>    ##############################<u></u>#<br>    # libjson<br>    if [ -z "$1" ] || contains "$*" libjson; then<br>        echo<br>        echo "checking for libjson"<br><br>        git_update json-c <a href="https://github.com/json-c/json-c" target="_blank">https://github.com/json-c/<u></u>json-c</a> json-c "-b json-c-0.12"<br>    fi<br><br>    # libsml<br>    if [ -z "$1" ] || contains "$*" libsml; then<br>        echo<br>        echo "checking for libsml"<br><br>        git_update libsml <a href="https://github.com/volkszaehler/libsml.git" target="_blank">https://github.com/<u></u>volkszaehler/libsml.git</a><br>    fi<br><br><br>    ##############################<u></u>#<br>    echo<br>    echo "building and installing libraries"<br><br>    # libjson<br>    if [ -z "$1" ] || contains "$*" libjson; then<br>        echo<br>        echo "building and installing libjson"<br>        pushd json-c<br>            if [ ! -x ./configure ]; then<br>                sh autogen.sh<br>            fi<br>            if [ ! -e Makefile ]; then<br>                ./configure<br>            else<br>                if contains "$*" clean; then make clean; fi<br>            fi<br><br>            make<br>            sudo make install<br>        popd<br>    fi<br><br>    # libsml<br>    if [ -z "$1" ] || contains "$*" libsml; then<br>        echo<br>        echo "building and installing libsml"<br>        pushd libsml<br>            if contains "$*" clean; then make clean; fi<br><br>            make<br>            sudo cp sml/lib/libsml.* /usr/lib/<br>            sudo cp -R sml/include/* /usr/include/<br>            sudo cp sml.pc /usr/lib/pkgconfig/<br>        popd<br>    fi<br><br>popd<br><br>##############################<u></u>#<br># vzlogger<br>if [ -z "$1" ] || contains "$*" vzlogger; then<br>    echo<br>    echo "building and installing vzlogger"<br><br>    if contains "$*" clean; then<br>        echo "clearing cmake cache"<br>        rm CMakeCache.txt<br>    fi<br><br>    echo "building vzlogger"<br>    cmake .<br>    make<br>    echo "installing vzlogger"<br>    sudo make install<br><br>    if [ -n $(pidof vzlogger) ]; then<br>        echo<br>        echo "vzlogger is already running"<br>        echo "make sure to restart vzlogger"<br>    fi<br>fi<br><br>popd<br><br><br></div>
</blockquote></div></div>
</blockquote></div></div></div></blockquote></div></div></div></div></div>
</blockquote></div><br></div>