Why Can't I compile Lazarus?? lazarus / 1-Linux ---------------------------------------------------------------------- naums · 2009-10-03 15:12 I tried several times to compile Lazarus but it never works on Linux. On Windows it works properly, but not on Linux. The error, which is FPC put out is: Quote/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) Error: Can't create object units/i386-linux/hello.o help me compile Lazarus with qt... (here I tried with GTK2) ---------------------------------------------------------------------- Blaazen · 2009-10-03 16:49 Hi, I have Kubuntu 9.04 (64bit) and Lazarus+FPC works well with both GTK2 and Qt. My Lazarus is from SVN. As I remember, there was no problem with GTK2, you can compile it with command: Code: [Select]make clean all and it works. For Qt you need follow wiki http://wiki.lazarus.freepascal.org/Qt_Interface and links on this page. When you have it, you can compile with command: Code: [Select]make PREFIX=/usr clean all LCL_PLATFORM=qt OPT="-dUSE_QT_45"OPT="-dUSE_QT_45" depends on your Qt version. B. ---------------------------------------------------------------------- theo · 2009-10-03 16:52 Do you have the rights to write to /usr/lib/lazarus/... ? ---------------------------------------------------------------------- naums · 2009-10-04 11:50 I think so. Do you think I have to chmod 777 this? I don't wanna cimpile it with the console but with the GUI of the Lazarus IDE. I don't know why, but the Source Code might be false? Is a new Installation of that senseful? ---------------------------------------------------------------------- theo · 2009-10-04 15:24 Quote from: naums on October 04, 2009, 01:50:42 pmI think so. Do you think I have to chmod 777 this? Yes or start lazarus as root (sudo or whatever). Or install lazarus under your home dir.  (Ex. SVN version). ---------------------------------------------------------------------- Blaazen · 2009-10-04 17:21 QuoteI don't wanna cimpile it with the console but with the GUI of the Lazarus IDE. I don't know why, but the Source Code might be false? Is a new Installation of that senseful? Lazarus compiled from source works well. I also think that the best way is download it to /home/username . You avoid all troubles with rigths (sudo etc.). Of course first time you have to compile from console. Once you have it installed, you can recompile it from GUI, for example when you update source code from SVN. Here is a link http://wiki.lazarus.freepascal.org/Getting_Lazarus. B. ---------------------------------------------------------------------- naums · 2009-10-07 15:32 I'll first try it with chmod then I can get the "SVN" Version. What does SVN stands for? Source........???? ---------------------------------------------------------------------- naums · 2009-10-07 15:55 okay. it doesn't work. Where can I get the SVN Version and how can I compile and install it? ---------------------------------------------------------------------- theo · 2009-10-07 16:44 http://wiki.lazarus.freepascal.org/Getting_Lazarus#Development_version s_from_SVN ---------------------------------------------------------------------- naums · 2009-10-07 18:52 And how can I compile it? ---------------------------------------------------------------------- Blaazen · 2009-10-07 21:05 Use command "make clean all" in .../lazarus directory. This will create executable binary "startlazarus". Default widgetset is gtk2. B. ---------------------------------------------------------------------- naums · 2009-10-09 16:54 so I have to do: Quotecd /usr....(i dont know)/lazarus make clean all ---------------------------------------------------------------------- naums · 2009-10-09 22:14 QuoteCompiling gtk2cellrenderer.pas gtk2memostrings.inc(84,31) Error: Identifier not found "gtk_text_buffer_select_range" gtk2wsstdctrls.pp(2067) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[3]: *** [interfaces.ppu] Fehler 1 make[3]: Verlasse Verzeichnis '/home/stefan/Desktop/Lazarus/lazarus/lcl/interfaces/gtk2' make[2]: *** [gtk2_all] Fehler 2 make[2]: Verlasse Verzeichnis '/home/stefan/Desktop/Lazarus/lazarus/lcl/interfaces' make[1]: *** [interfaces] Fehler 2 make[1]: Verlasse Verzeichnis '/home/stefan/Desktop/Lazarus/lazarus/lcl' make: *** [lcl] Fehler 2 This are the errors that have been outputed. ---------------------------------------------------------------------- theo · 2009-10-10 09:09 You need a newer FPC version. I think 2.2.4 at least. http://sourceforge.net/projects/lazarus/files/ ---------------------------------------------------------------------- naums · 2009-10-10 11:55 I think I have 2.2.8 I'll try it with yours. ---------------------------------------------------------------------- naums · 2009-10-10 12:47 okay. Compiling successful  Now it is with GTK2 why can't I now compile it with the GUI of Lazarus for GT ??? because of the missing packeges of the source of FreePascal? ---------------------------------------------------------------------- marcvan · 2010-04-20 12:06 Quote from: naums on October 03, 2009, 05:12:59 pmI tried several times to compile Lazarus but it never works on Linux. On Windows it works properly, but not on Linux. The error, which is FPC put out is: Quote/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) Error: Can't create object units/i386-linux/hello.o help me compile Lazarus with qt... (here I tried with GTK2) Versions installed by the Daily Snapshots do not give the correct permissions in the installation folder because the various Linux distributions, so run the following command at a shell, "sudo chmod 777-R / usr / lib / lazarus" (without quotation marks), remembering that this will give unrestricted access to the lazarus folder. Open Lazarus and go in the menu "Tools -> Configure Build Lazarus" tab "Advanced Build Options", click "Clean all" then the button "Build", it should solve the problem. Brasil: Versões instaladas pelo Daily Snapshots não dão as permissões corretas na pasta de instalação devido as diversas distribuições linux, desta forma execute o seguinte comando em um shell, "sudo chmod 777 -R /usr/lib/lazarus" (sem aspas), lembrando que isso dará acesso irrestrito a pasta do lazarus. Abra o Lazarus e vá no menu "Tools -> Configure Build Lazarus" na aba "Advanced Build Options", clique em "Clean all" depois o botão "Build", isso deve resolver o problema. ---------------------------------------------------------------------- Troodon · 2010-04-20 12:54 Quote from: marcvan on April 20, 2010, 02:06:58 pmVersions installed by the Daily Snapshots do not give the correct permissions in the installation folder Actually, they do. That is an installation folder where only the administrator (root) has write privileges. Consistent with the Linux permissions, only an administrator can  make changes to (or install) a system-wide application. In conclusion, you need to login as root to rebuild Lazarus.