ich setze gerade mein Buildsystem auf dem Raspi 3 neu auf.
Da ich mit PascalIO so meine Schwierigkeiten habe, nutze ich hwiringpi (installiert beschrieben wie hier : http://raspberrypiguide.de/howtos/raspb ... io-how-to/ )
Danach dann noch die h2wiringpi.pas geladen von hier ( https://github.com/laz2wiringpi/laz2wiringpi )
wenn ich nun die Testprojekt baue (welches bei h2wiringpi mit dabei ist) geht das mittels: lazbuild -B wiringPiapp.lpi
ich kann die App starten, ausführen alles wunderbar.
Mache ich das gleiche nun mit meiner App, welche die h2wiringpi.pas einbindet kriege ich folgenden Fehler :
Code: Alles auswählen
corpsman@raspberrypi:~/lazarus/projects/Basic $ lazbuild -B raspberry.lpi
Hint: (lazarus) Build Project: nothing to do.
Info: (lazarus) Execute Title="Compile Project, Target: raspberry"
Info: (lazarus) Working Directory="/home/corpsman/lazarus/projects/Basic/"
Info: (lazarus) Executable="/usr/bin/fpc"
Info: (lazarus) Param[0]="-B"
Info: (lazarus) Param[1]="-MObjFPC"
Info: (lazarus) Param[2]="-Scghi"
Info: (lazarus) Param[3]="-l"
Info: (lazarus) Param[4]="-vewnhibq"
Info: (lazarus) Param[5]="-Fi/home/corpsman/lazarus/projects/Basic/lib/arm"
Info: (lazarus) Param[6]="-Fu/home/corpsman/lazarus/projects/raspi_lib"
Info: (lazarus) Param[7]="-Fu/home/corpsman/lazarus/projects/test"
Info: (lazarus) Param[8]="-Fu/home/corpsman/lazarus/projects/Basic/"
Info: (lazarus) Param[9]="-FU/home/corpsman/lazarus/projects/Basic/lib/arm/"
Info: (lazarus) Param[10]="raspberry.lpr"
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.0.0+dfsg-11+rpi1+deb9u1 [2017/07/27] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling raspberry.lpr
(3104) Compiling /home/corpsman/lazarus/projects/raspi_lib/h2wiringpi.pas
/home/corpsman/lazarus/projects/raspi_lib/h2wiringpi.pas(433,44) Hint: (5057) Local variable "obervolted" does not seem to be initialized
/home/corpsman/lazarus/projects/raspi_lib/h2wiringpi.pas(433,32) Hint: (5057) Local variable "maker" does not seem to be initialized
/home/corpsman/lazarus/projects/raspi_lib/h2wiringpi.pas(433,26) Hint: (5057) Local variable "mem" does not seem to be initialized
/home/corpsman/lazarus/projects/raspi_lib/h2wiringpi.pas(433,22) Hint: (5057) Local variable "rev" does not seem to be initialized
/home/corpsman/lazarus/projects/raspi_lib/h2wiringpi.pas(433,18) Hint: (5057) Local variable "modle" does not seem to be initialized
(9009) Assembling h2wiringpi
Fatal: (1024) I/O error: File not open
Error: /usr/bin/ppcarm returned an error exitcode
Error: (lazarus) Compile Project, Target: raspberry: stopped with exit code 256
ERROR: failed compiling of project /home/corpsman/lazarus/projects/Basic/raspberry.lpi
corpsman@raspberrypi:~/lazarus/projects/Basic $
Eine Lösung habe ich auch schon :
corpsman@raspberrypi:~/lazarus/projects/Basic $ sudo lazbuild -B raspberry.lpi
Wenn ich also Lazbuild via Root starte gehts, und meine Testapp funktioniert auch.
Ich würde nur ungern dauerhaft meinen Compile via Root machen, verstehe aber momentan nicht warum ich bei der Testapp kein Root brauche und bei meinem Projekt schon, daher kann ich das auch nicht abstellen.
Einziger offentsichtlicher Unterschied, meine Anwendung ist ne Consolenanwendung, die testapp nicht.
Kann mir einer von euch erklären, wo ich das richtige häckchen setzen muss, damit es auch ohne root geht ?