PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : monitord mit aktuellem Kernel komplilieren



felix000
27.08.2016, 14:50
Hallo zusammen,

ich krieg's aktuell nicht hin monitord auf einem Raspberry Pi 3 zu kompilieren...

Nach langem Lesen der Threads zum Raspberry Pi und monitord und diversen verschiedenen Paketen, bleibt ich inzwischen am gleichen Punkt hängen wie der User hier: https://www.funkmeldesystem.de/threads/35783-Informationen-zum-monitord-2-0?p=471495#post471495

Info zum meinem Testsystem:
RASPBIAN JESSIE LITE vom 2016-05-27 (https://www.raspberrypi.org/downloads/raspbian/)
Kernel 4.4.13-v7+, Plattform armv7l

Als Sourcen hab ich den aktuellen Tarball (und einen älteren von einer erfolgreichen Kompliererei aufm Pi1 von letztem Jahr , ebenfalls nicht erfolgreich, verwendet)



sudo apt-get update
sudo apt-get install autoconf libtool libasound2-dev libmysqlclient-dev medit mysql-client
sudo autoreconf -fi
sudo ./configure --with-alsa
make
sudo make install

# ebenfalls ausprobiert:
./configure --with-alsa --with-lua-includes=/usr/include/lua5.1 --with-lua-suffix=5.1
./configure --enable-plugins --with-alsa --with-mysql --with-lua-includes=/usr/include/lua5.1 --with-lua-suffix=5.1
./configure --with-alsa

Die im oben verlinkten Thread Modifikationen der configure.ac und Makefile.am hab ich ebenfalls durchgeführt und häng' ich auch beim make fest, denn es schmeißt Fehler wie
‘GetFileTypeS’ was not declared in this scope (siehe verlinkter Thread)

Mein Ziel ist es monitord mit LUA-Unterstützung zu komplieren...

felix000
27.08.2016, 15:46
die Pakete für LUA haben vorher auf jeden Fall gefehlt...



sudo apt-get install autoconf libtool libasound2-dev medit
sudo apt-get install lua5.2 liblua5.2-dev
sudo autoreconf -fi # => schlägt fehl
# Makefile.a:2 ":" entfernt
echo "m4_ifdef([AM_PROG_AR], [AM_PROG_AR])" >> configure.ac
echo LT_INIT >> configure.ac
sudo autoreconf -fi # => läuft durch
./configure --with-alsa --with-lua-includes=/usr/include/lua5.2 --with-lua-suffix=5.2


ein folgendes make endet auch wieder mit Fehler...



make all-am
make[1]: Entering directory '/home/srv/monitord-bin+src'
g++ -DHAVE_CONFIG_H -I. -Ijthread-1.2.1/src -D_DEBUG -Wall -I/usr/include/lua5.2 -g -O2 -MT monitord/monitord_monitord-MonitorConfiguration.o -MD -MP -MF monitord/.deps/monitord_monitord-MonitorConfiguration.Tpo -c -o monitord/monitord_monitord-MonitorConfiguration.o `test -f 'monitord/MonitorConfiguration.cpp' || echo './'`monitord/MonitorConfiguration.cpp
Makefile:1165: recipe for target 'monitord/monitord_monitord-MonitorConfiguration.o' failed
make[1]: Leaving directory '/home/srv/monitord-bin+src'
Makefile:644: recipe for target 'all' failed
make all-am
make[1]: Entering directory '/home/srv/monitord-bin+src'
g++ -DHAVE_CONFIG_H -I. -Ijthread-1.2.1/src -D_DEBUG -Wall -I/usr/include/lua5.2 -g -O2 -MT monitord/monitord_monitord-MonitorConfiguration.o -MD -MP -MF monitord/.deps/monitord_monitord-MonitorConfiguration.Tpo -c -o monitord/monitord_monitord-MonitorConfiguration.o `test -f 'monitord/MonitorConfiguration.cpp' || echo './'`monitord/MonitorConfiguration.cpp
In file included from monitord/MonitorConfiguration.cpp:16:0:
./simpleopt/SimpleGlob.h: In instantiation of ‘int CSimpleGlobTempl<SOCHAR>::Add(const SOCHAR*) [with SOCHAR = char]’:
./simpleopt/SimpleGlob.h:687:41: required from ‘int CSimpleGlobTempl<SOCHAR>::Add(int, const SOCHAR* const*) [with SOCHAR = char]’
monitord/MonitorConfiguration.cpp:334:62: required from here
./simpleopt/SimpleGlob.h:623:55: error: ‘GetFileTypeS’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
SG_FileType nType = GetFileTypeS(a_pszFileSpec);
^
./simpleopt/SimpleGlob.h:623:55: note: declarations in dependent base ‘SimpleGlobBase<char>’ are not found by unqualified lookup
./simpleopt/SimpleGlob.h:623:55: note: use ‘this->GetFileTypeS’ instead
./simpleopt/SimpleGlob.h:644:53: error: ‘FindFirstFileS’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
int rc = FindFirstFileS(a_pszFileSpec, m_uiFlags);
^
./simpleopt/SimpleGlob.h:644:53: note: declarations in dependent base ‘SimpleGlobBase<char>’ are not found by unqualified lookup
./simpleopt/SimpleGlob.h:644:53: note: use ‘this->FindFirstFileS’ instead
./simpleopt/SimpleGlob.h:657:51: error: ‘GetFileNameS’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
nError = AppendName(GetFileNameS((SOCHAR)0), IsDirS((SOCHAR)0));
^
./simpleopt/SimpleGlob.h:657:51: note: declarations in dependent base ‘SimpleGlobBase<char>’ are not found by unqualified lookup
./simpleopt/SimpleGlob.h:657:51: note: use ‘this->GetFileNameS’ instead
./simpleopt/SimpleGlob.h:657:70: error: ‘IsDirS’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
nError = AppendName(GetFileNameS((SOCHAR)0), IsDirS((SOCHAR)0));
^
./simpleopt/SimpleGlob.h:657:70: note: declarations in dependent base ‘SimpleGlobBase<char>’ are not found by unqualified lookup
./simpleopt/SimpleGlob.h:657:70: note: use ‘this->IsDirS’ instead
./simpleopt/SimpleGlob.h:658:43: error: ‘FindNextFileS’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
bSuccess = FindNextFileS((SOCHAR)0);
^
./simpleopt/SimpleGlob.h:658:43: note: declarations in dependent base ‘SimpleGlobBase<char>’ are not found by unqualified lookup
./simpleopt/SimpleGlob.h:658:43: note: use ‘this->FindNextFileS’ instead
Makefile:1165: recipe for target 'monitord/monitord_monitord-MonitorConfiguration.o' failed
make[1]: *** [monitord/monitord_monitord-MonitorConfiguration.o] Error 1
make[1]: Leaving directory '/home/srv/monitord-bin+src'
Makefile:644: recipe for target 'all' failed
make: *** [all] Error 2


Weiß jemand weiter?

kikiano
31.01.2017, 00:01
Habe leider das gleiche Problem. Habe bisher keine Lösung gefunden. Hat es mittlerweile wieder jemand ans Laufen gekriegt?

HolgerS
07.03.2017, 23:19
Habe leider das gleiche Problem. Habe bisher keine Lösung gefunden. Hat es mittlerweile wieder jemand ans Laufen gekriegt?

Versuch mal den gcc mit der Version 4.6.*

in einer mingw/msys Umgebung geht make nur mit einer gcc und c++ Version 4.6.* ab Version 4.7.* und neuer kommt der selbe Fehler.

hannes
18.12.2017, 16:24
Hatte das selbe Problem habs mit der gcc version 4.6 erforlgeich probiert:



sudo apt-get remove gcc
sudo apt-get install gcc-4.6 g++-4.6
sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.6 /usr/bin/g++



Danach noch:



sudo make install


Jetzt kämpfe ich da:


monitord
15:20:19.910 INFO: monitord/Monitor.cpp(70) Logging with loglevel DEBUG
15:20:19.911 DEBUG: monitord/MonitorModulesResults.cpp(51) Dispatcher startet
15:20:19.913 INFO: monitord/Monitor.cpp(113) monitord 2.0svn READY
monitord 2.0svn running...
15:20:19.924 INFO: monitord/Monitor.cpp(217) starting soundcard #0
15:20:19.924 INFO: monitord/SndPipe.cpp(152) creating decoders for soundcard #0
15:20:19.924 INFO: monitord/SndPipe.cpp(156) creating decoder for soundcard #0L:FMS
15:20:19.925 DEBUG: monitord/MonitorModuleFMS.cpp(100) FMS Parameter
15:20:19.925 DEBUG: monitord/MonitorModuleFMS.cpp(101) sample : 22050
15:20:19.926 DEBUG: monitord/MonitorModuleFMS.cpp(102) syncbits: 12
15:20:19.926 DEBUG: monitord/MonitorModuleFMS.cpp(103) crc : 1
15:20:19.926 DEBUG: monitord/MonitorModuleFMS.cpp(104) level : 0.15259
15:20:19.927 DEBUG: monitord/MonitorModuleFMS.cpp(105) Algo : 0
15:20:19.927 DEBUG: monitord/MonitorModuleFMS.cpp(106) ignW : 0
15:20:19.928 DEBUG: monitord/MonitorModuleFMS.cpp(107) ignQ : 0
15:20:19.928 DEBUG: monitord/MonitorModuleFMS.cpp(108) ErrC : 0
15:20:19.928 DEBUG: monitord/MonitorModuleFMS.cpp(109) force : 0
15:20:19.929 INFO: monitord/SndPipe.cpp(178) creating decoder for soundcard #0L:ZVEI
15:20:19.930 INFO: monitord/SndPipe.cpp(189) creating decoder for soundcard #0R:ZVEI
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
15:20:19.940 ERROR: monitord/posix/MonitorAudioALSA.cpp(56) [ALSA] Error opening PCM device plughw:1,0 ret:-2No such file or directory
15:20:19.941 ERROR: monitord/posix/MonitorAudioALSA.cpp(16) [ALSA] Error initializing PCM device plughw:1,0

hannes
19.12.2017, 16:39
Bei mir läufts nun auf dem aktuellen RASPBIAN (2017-11-29).

Einziges Problem wenn ich's über crontabs starten bzw. überwachen will.

<b>/etc/init.d/funk</b>
(chmod 755)


case "$1" in
start)
/home/pi/Documents/monitord/monitord -c /home/pi/Documents/monitord/monitord.xml >> /dev/null &
echo "Monitord wurde gestartet"
;;
stop)
pid=$(pidof monitord)
kill $pid
echo "Monitord wurde beendet"
;;
restart)
pid=$(pidof monitord)
kill $pid
echo "Monitord wurde beendet"
/home/pi/Documents/monitord/monitord -c /home/pi/Documents/monitord/monitord.xml >> /dev/null &
echo "Monitord wurde gestartet"
;;
*)
echo "usage $0 start|stop|restart" ;;
esac

exit 0


als user pi via ssh Aufruf funktioniert es:
/etc/init.d/funk start

allerdings via crontab:
* * * * * /etc/init.d/funk start >> /tmp/crontab.log

gibt es zwar einen Eintrag in der Logdatei, aber monitord wurde nicht gestartet.

Leider ist mit Linux Knowhow leider nicht ausreichend, dass ich eine Idee hab ob's an Berechtigungen, etc. etc. liegt?

Jemand ne Idee / Tipp?

felix000
06.01.2018, 18:38
könnte am User liegen...entweder in der crontab den User mit angeben oder mal das Script in einer Root-Shell (sudo -i) versuchen zu starten...

felix000
07.01.2018, 16:04
Ich hab's mit dem alten gcc auch kompilieren können und es läuft jetzt als systemd-Dienst stabil...

LUA hab ich jetzt weggelassen, gab nen Fehler beim configure-Befehl, den ich nicht länger untersucht hab.

Meine Vorgehensweise:


tar xfvj monitor-trunk.tar.bz
cd trunk/

# Makefile.a:2 ":" entfernt
echo "m4_ifdef([AM_PROG_AR], [AM_PROG_AR])" >> configure.ac
echo LT_INIT >> configure.ac
sudo autoreconf -fi
./configure --with-alsa
sudo make install


Jetzt fehlt mir eigentlich nur noch snd-aloop... Falls mir hier jemand helfen kann, bitte in diesem Thread: https://www.funkmeldesystem.de/threads/62761-snd_aloop-Auf-einem-Raspberry-Pi