Meech
Anmeldungsdatum: 6. Mai 2007
Beiträge: 97
Wohnort: Dornholzhausen
|
Hallo
Hab mir heute die neue Version von Lazarus runtergeladen,und installiert(über .deb Pakete).
Jetzt wollte ich das Programm in GTK2 umwandeln.Doch dabei kommt folgender Fehler: meech@meech-laptop:~$ sudo lazarus-ide
[WARNING] Out of OEM specific VK codes, changing to unassigned
[WARNING] Out of unassigned VK codes, assigning $FF
TLazarusManager.Run starting /usr/lib/lazarus/lazarus ...
[WARNING] Out of OEM specific VK codes, changing to unassigned
[WARNING] Out of unassigned VK codes, assigning $FF
TMainIDE.ParseCmdLineOptions:
PrimaryConfigPath="/home/meech/.lazarus"
SecondaryConfigPath="/etc/lazarus"
NOTE: editor options config file not found - using defaults
Hinweis: CodeTools-Konfigurationsdatei nicht gefunden - verwende Voreinstellungen
NOTE: help options config file not found - using defaults
TMainIDE.DoNewProject A
TFindDeclarationTool.ValidateToolDependencies project1.lpr
TFindDeclarationTool.ValidateToolDependencies project1.lpr
TCustomFormEditor.CreateComponent Form1:TForm1 True
TFindDeclarationTool.ValidateToolDependencies project1.lpr
TMainIDE.DoNewEditorFile END unit1.pas
[TExternalToolList.Run] CmdLine="/usr/bin/make all -w" WorkDir="/usr/lib/lazarus/lcl"
TOutputFilter.Execute :TProcessUTF8
make: Entering directory `/usr/lib/lazarus/lcl'
/bin/rm -f units/i386-linux/alllclunits.ppu
/usr/bin/fpc -gl -Fu. -Funonwin32 -Fuforms -Fuwidgetset -Fu/usr/lib/fpc/2.2.2/units/i386-linux/rtl -Fu/usr/lib/fpc/2.2.2/units/i386-linux/x11 -Fu/usr/lib/fpc/2.2.2/units/i386-linux/opengl -Fiinclude -FE. -FUunits/i386-linux -Fl/usr/lib/gcc/i486-linux-gnu/4.3.2 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -di386 alllclunits.pp
Free Pascal Compiler version 2.2.2 [2008/08/19] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling alllclunits.pp
72 lines compiled, 1.1 sec
/usr/bin/make -C interfaces all
make[1]: Entering directory `/usr/lib/lazarus/lcl/interfaces'
/usr/bin/make -C gtk2 all
make[2]: Entering directory `/usr/lib/lazarus/lcl/interfaces/gtk2'
/bin/rm -f ../../units/i386-linux/gtk2/interfaces.ppu \
../../units/i386-linux/gtk2/interfaces.o
/usr/bin/fpc -gl -dgtk2 -Fi../gtk -Fu../../units/i386-linux -Fu../gtk -Fu. -Fu/usr/lib/fpc/2.2.2/units/i386-linux/rtl -Fu/usr/lib/fpc/2.2.2/units/i386-linux/x11 -Fu/usr/lib/fpc/2.2.2/units/i386-linux/opengl -FE. -FU../../units/i386-linux/gtk2 -Fl/usr/lib/gcc/i486-linux-gnu/4.3.2 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -di386 interfaces.pas
Free Pascal Compiler version 2.2.2 [2008/08/19] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling interfaces.pas
Compiling gtk2int.pas
Compiling /usr/lib/lazarus/lcl/interfaces/gtk/gtkint.pp
Compiling /usr/lib/lazarus/lcl/interfaces/gtk/gtkproc.pp
gtkproc.pp(71,6) Note: User defined: TODO: remove me
gtkproc.pp(691,2) Note: User defined: TODO: Remove me
gtkproc.inc(281,4) Note: User defined: TODO: enable standard error_log handling
gtkproc.inc(1269,2) Note: User defined: remove when gtk native imagelist will be ready
gtkproc.inc(3250,3) Note: Local variable "KeySymCharLen" is assigned but never used
gtkproc.inc(6046,6) Note: User defined: reimplement
gtkproc.inc(8397,4) Warning: User defined: ToDo LoadDefaultFontDesc: get a working default pango font description
gtkpagecallback.inc(41,4) Note: User defined: reimplement
gtkproc.pp(674,11) Error: Forward declaration not solved "MergeClipping(TDeviceContext, PGdkGC, LongInt, LongInt, LongInt, LongInt, PGdkBitmap, LongInt, LongInt,var PGdkBitmap)"
gtkproc.pp(1021) Fatal: There were 1 errors compiling module, stopping
TExternalToolList.Run Exception: /usr/lib/lazarus/lcl/interfaces/gtk/gtkproc.pp(1021) Fatal: There were 1 errors compiling module, stopping
TFindDeclarationTool.ValidateToolDependencies /usr/lib/lazarus/lcl/interfaces/gtk/gtkproc.pp
TMainIDE.DoBuildLazarus: Building standard components (LCL, SynEdit, CodeTools) failed. Kennt jemand dieses Problem?? mfg. Micha
|
Jagged
Anmeldungsdatum: 6. Oktober 2007
Beiträge: 6
|
Hallo Micha, leider kenne ich das Problem. Gelöst hatte ich es anfangs mit einem Patch. Weiss nicht genau ob das in deinem Fall das gleiche ist. Aber ich hab gelesen das es mit der FPC 2.2.2 Probleme bei GTK2 gibt. Wie Du ja selbst siehst. Meine Lösung war einfach FPC aus den SVN Quellen zu laden und zu kompilieren. Das war die Version 2.3.1 Damit klappt das alles. Momentan hab ich noch ein anderes komisches Problem. Immer wenn ich etwas in der IDE kopieren will schmiert sie mir ab... Gruß,
Jagged.
|
Meech
(Themenstarter)
Anmeldungsdatum: 6. Mai 2007
Beiträge: 97
Wohnort: Dornholzhausen
|
Hallo Jagged
Wie genau hast du den das FPC installiert?? Habs mir runtergeladen, compiliert, und installiert. Wenn ich jetzt Lazarus mit GTK2 neu kompiliernen will, macht er es trotzdem noch mit FPC 2.2.2. Kannst du mir dazu was sagen?? mfg. Micha
|
Jagged
Anmeldungsdatum: 6. Oktober 2007
Beiträge: 6
|
Hallo Micha, gut das Du fragst, hatte ich ganz vergessen. Geh im Verzeichnis von Lazarus nach "tools/install". Dort findest Du scripts um debs von FPC zu erstellen. 1. Erstelle ein neue .deb (du musst natürlich den path zum FPC ersetzen): ./create_fpc_deb.sh fpc /opt/lazarus/fpc 2. Jetzt solltest Du eine .deb erhalten haben. Diese kannst Du gleich installieren (in meinem fall war das eine 64bit deb):
sudo dpkg -i fpc_2.3.1-081027_amd64.deb 3. Jetzt brauchst Du noch eine aktuelle .deb für die FPC-SRC: ./create_fpc_deb.sh fpc-src /opt/lazarus/fpc Und auch diese installieren wie eben fpc selbst. Es könnte sein das es Probleme beim finden einiger Units gibt. Bei mir fand er die Interfaces u.s.w. nicht. Hab ich dann einfach einen Eintrag in der fpc.cfg unter /etc gemacht. Ich hoffe das hilft Dir erstmal weiter. Sag mir dann mal bitte ob Du das gleiche Problem mit Copy&Paste hast. Gruß,
Jagged.
|
Meech
(Themenstarter)
Anmeldungsdatum: 6. Mai 2007
Beiträge: 97
Wohnort: Dornholzhausen
|
Hallo Jagged
Danke schonmal für eine Anleitung,doch leider tritt bei mir beim ersten Befehl schon ein Fehler auf 😢 meech@meech-laptop:/usr/lib/lazarus/tools/install$ ./create_fpc_deb.sh fpc /usr/local/lib/fpc/
+ set -e
+ Usage='Usage: [OS_TARGET=xxx] [CPU_TARGET=xxx] [BINUTILSPREFIX=xxx] ./create_fpc_deb.sh fpc|fpc-src [notemp] <FPCSrcDir> [release]'
+ PackageName=
+ '[' fpc = fpc ']'
+ PackageName=fpc
+ '[' fpc = fpc-src ']'
+ '[' xfpc = x ']'
+ shift
+ WithTempDir=yes
+ '[' x/usr/local/lib/fpc/ = xnotemp ']'
+ FPCSrcDir=/usr/local/lib/fpc/
+ '[' x/usr/local/lib/fpc/ = x ']'
++ echo /usr/local/lib/fpc/
+ FPCSrcDir=/usr/local/lib/fpc/
+ shift
+ FPCRelease=
+ '[' x = x ']'
++ date +%y%m%d
+ FPCRelease=081028
+ '[' '!' -d /usr/local/lib/fpc//compiler ']'
+ echo 'The directory /usr/local/lib/fpc/ does not look like a fpc source directory (fpc/)'
The directory /usr/local/lib/fpc/ does not look like a fpc source directory (fpc/)
+ exit -1 Das versteh ich nicht.Ist doch das Richtige Verzeichniss! mfg. Micha
|
Jagged
Anmeldungsdatum: 6. Oktober 2007
Beiträge: 6
|
Hallo Micha, es ist das richtige Verzeichnis für die spätere FPC installation. Aber um eine .deb zu erstellen musst Du das Verzeichnis des SVN Checkouts wählen. Mach ein checkout der aktuellen FPC Revision und gib dann das Verzeichnis an. Das sollte gehen. Gruß,
Jagged.
|
StYxXx
Anmeldungsdatum: 25. September 2008
Beiträge: 155
Wohnort: links-unten
|
Hi, ich hab das gleiche Problem mit Lazarus. Also habe ich jetzt die fpc-Dateien mit subversion gesaugt und in /opt/lazarus/ verschoben (weil das bei dir auch angegeben wird). Wenn ich jetzt create_fpc_deb.sh ausführe erhalte ich aber eine Fehlermeldung: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 | styxxx@Mainframe:/usr/lib/lazarus/tools/install$ ./create_fpc_deb.sh fpc /opt/lazarus/fpc
+ set -e
+ Usage='Usage: ./create_fpc_deb.sh fpc|fpc-src [notemp] <FPCSrcDir> [release]'
+ PackageName=
+ '[' fpc = fpc ']'
+ PackageName=fpc
+ '[' fpc = fpc-src ']'
+ '[' xfpc = x ']'
+ shift
+ WithTempDir=yes
+ '[' x/opt/lazarus/fpc = xnotemp ']'
+ FPCSrcDir=/opt/lazarus/fpc
+ '[' x/opt/lazarus/fpc = x ']'
++ echo /opt/lazarus/fpc
+ FPCSrcDir=/opt/lazarus/fpc
+ shift
+ FPCRelease=
+ '[' x = x ']'
++ date +%y%m%d
+ FPCRelease=090319
+ '[' '!' -d /opt/lazarus/fpc/compiler ']'
+ ./check_fpc_dependencies.sh
+ set -e
+ echo Testing fpc ...
Testing fpc ...
+ TmpDir=/tmp/fpc
+ rm -rf /tmp/fpc
+ mkdir -p /tmp/fpc
+ TestPas=/tmp/fpc/test.pas
+ echo 'program test;'
+ echo '{$linklib gpm}'
+ echo '{$linklib ncurses}'
+ echo 'begin end.'
+ '[' x = x ']'
+ fpc /tmp/fpc/test.pas
Free Pascal Compiler version 2.2.2 [2008/08/19] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling /tmp/fpc/test.pas
Linking /tmp/fpc/test
/usr/bin/ld: link.res: No such file: No such file or directory
test.pas(4,7) Error: Error while linking
test.pas(4,7) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
|
und nachdem ich es mit sudo probierte: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 | styxxx@Mainframe:/usr/lib/lazarus/tools/install$ sudo ./create_fpc_deb.sh fpc /opt/lazarus/fpc
[sudo] password for styxxx:
+ set -e
+ Usage='Usage: ./create_fpc_deb.sh fpc|fpc-src [notemp] <FPCSrcDir> [release]'
+ PackageName=
+ '[' fpc = fpc ']'
+ PackageName=fpc
+ '[' fpc = fpc-src ']'
+ '[' xfpc = x ']'
+ shift
+ WithTempDir=yes
+ '[' x/opt/lazarus/fpc = xnotemp ']'
+ FPCSrcDir=/opt/lazarus/fpc
+ '[' x/opt/lazarus/fpc = x ']'
++ echo /opt/lazarus/fpc
+ FPCSrcDir=/opt/lazarus/fpc
+ shift
+ FPCRelease=
+ '[' x = x ']'
++ date +%y%m%d
+ FPCRelease=090319
+ '[' '!' -d /opt/lazarus/fpc/compiler ']'
+ ./check_fpc_dependencies.sh
+ set -e
+ echo Testing fpc ...
Testing fpc ...
+ TmpDir=/tmp/fpc
+ rm -rf /tmp/fpc
+ mkdir -p /tmp/fpc
+ TestPas=/tmp/fpc/test.pas
+ echo 'program test;'
+ echo '{$linklib gpm}'
+ echo '{$linklib ncurses}'
+ echo 'begin end.'
+ '[' x = x ']'
+ fpc /tmp/fpc/test.pas
Free Pascal Compiler version 2.2.2 [2008/08/19] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling /tmp/fpc/test.pas
Linking /tmp/fpc/test
/usr/bin/ld: cannot find -lgpm
test.pas(4,7) Error: Error while linking
test.pas(4,7) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
|
Findet also beidemale etwas nicht. 😕
|
xrolly
Anmeldungsdatum: 26. September 2007
Beiträge: 4322
Wohnort: NRW; 51° 39′ N, 7° 21′ O
|
Hallo StYxXx ich habe keine Ahnung worum es ueberhaupt geht aber diese Seiten von:
.. koennten vllt. weiter helfen:
.. wenn sie dir nicht schon bekannt sind. Nur so'n Tipp 😉
|
StYxXx
Anmeldungsdatum: 25. September 2008
Beiträge: 155
Wohnort: links-unten
|
Hm danke. Grundsätzlich zu installieren tut ja. Habe es jetzt erneut getan. Funktioniert zwar, aber will ich wieder auf gtk schalten, erhalte ich Fehler. Diesmal noch früher im Quellcode vom Hallo-Welt-Beispielprogramm, wenn lazarus neu gebaut wird:
"LCL" beendet
"SynEdit" beendet
"CodeTools" beendet
"Package-Registrierung" beendet
"IDE-Schnittstelle" beendet
"JIT-Form" beendet
/usr/lib/lazarus/examples/hello.pp(31,1) Error: Can't create object file: units/i386-linux/hello.o
/usr/lib/lazarus/examples/hello.pp(31,1) Fatal: Can't create object units/i386-linux/hello.o
Das hatte ich letztes mal auch und da dann irgendwie hinbekommen. Danach steckte ich in meinem Post oben fest.
Ähnlich ist das auch mit den anderen Oberflächen (qt), welche nach Behebung der Schreibprobleme aber anscheinend Fehler im Code fanden. Seit eben installiert sidn lazarus 0.9.26 beta und fpc 2.2.2-3.
|
StYxXx
Anmeldungsdatum: 25. September 2008
Beiträge: 155
Wohnort: links-unten
|
Hab das jetzt nach Anleitung nochmal gemacht, diesmal Beispiele und co rausgelassen. "Lazarus erstellen" mit GTK2 funktionierte so. Alles super.
Wähle ich jetzt aber GTK2 als kompilierungsziel bei einem Projekt aus (heir jetzt einfach ein leeres Form) erhalte ich /usr/lib/fpc/2.2.2/units/i386-linux/gtk2/gtk2.o: In function `GTK2_GTK_FILE_SYSTEM_ERROR$$LONGWORD':
gtk2.pas:(.text+0xb7b1): undefined reference to `gtk_file_system_error_quark'
/usr/lib/fpc/2.2.2/units/i386-linux/gtk2/gtk2.o: In function `GTK2_GTK_TYPE_FILE_INFO$$LONGWORD':
gtk2.pas:(.text+0xb7c1): undefined reference to `gtk_file_info_get_type'
/usr/lib/fpc/2.2.2/units/i386-linux/gtk2/gtk2.o: In function `GTK2_GTK_TYPE_FILE_SYSTEM$$LONGWORD':
gtk2.pas:(.text+0xb7d1): undefined reference to `gtk_file_system_get_type'
/usr/lib/fpc/2.2.2/units/i386-linux/gtk2/gtk2.o: In function `GTK2_GTK_TYPE_FILE_FOLDER$$LONGWORD':
gtk2.pas:(.text+0xb851): undefined reference to `gtk_file_folder_get_type'
project1.lpr(17,1) Error: Error while linking
project1.lpr(17,1) Fatal: There were 1 errors compiling module, stopping Möchte ich "Lazarus erstellen" mit qt durchführen (nur LCL Clean&Build) bricht das mit folgendem Fehler ab:
/usr/lib/lazarus/lcl/interfaces/qt/qt4.pas(768,25) Note: Values in enumeration types have to be ascending
/usr/lib/lazarus/lcl/interfaces/qt/qt4.pas(9165,37) Note: Values in enumeration types have to be ascending
/usr/lib/lazarus/lcl/interfaces/qt/qt4.pas(10095,32) Note: Values in enumeration types have to be ascending
/usr/lib/lazarus/lcl/interfaces/qt/qt4.pas(10946,1) Error: Can't create object file: ../../units/i386-linux/qt/qt4.o
/usr/lib/lazarus/lcl/interfaces/qt/qt4.pas(10946,1) Fatal: Can't create object ../../units/i386-linux/qt/qt4.o Irgendwo ist doch der Wurm drin. Vor allem gtk2 müsste doch klappen. ☹
|
StYxXx
Anmeldungsdatum: 25. September 2008
Beiträge: 155
Wohnort: links-unten
|
Wie das mit qt ist weiß ich bisher nicht. Das GTK2-Problem ist aber ein Bug: http://mantis.freepascal.org/view.php?id=11837 Ein Workaround findet sich hier: http://wiki.lazarus.freepascal.org/Installing_Lazarus#Problems_compiling_GTK2_apps_with_FPC_2.2.2
Oder man installiert eine neuere Version (2.3.x) von FPC.
Anscheinend ist in den Paketquellen eine falsche (defekte?) Version drin. Nur als Info, falls noch jemand das Problem haben sollte. Habe es selbst noch nicht getestet.
|
Avantarius
Anmeldungsdatum: 20. April 2009
Beiträge: 69
|
StYxXx schrieb: Ein Workaround findet sich hier: http://wiki.lazarus.freepascal.org/Installing_Lazarus#Problems_compiling_GTK2_apps_with_FPC_2.2.2
Habe ich ausprobiert, damit bekomme ich leider kein Gtk 2 Programm zum Laufen!
Oder man installiert eine neuere Version (2.3.x) von FPC.
Aber wie? Werde nicht ganz schlau aus der Beschreibung auf der fp-Homepage... wenns jemand zum Laufen gebracht hat bitte hier posten, würd mich intressieren und wäre für Hilfe dankbar!
|