Can't compile project : Error : cant't find unit INTERFACES lazarus / 1-Linux ---------------------------------------------------------------------- Neo · 2004-11-24 22:00 When I try to compile a simple program I receive the following message : /tmp/project1.lpr(1,1) Fatal: Can't find unit INTERFACES. I checked the FAQ but it is not exactly the same error. The FAQ says something about adding TLC to the project using the project inspector but this is already done and linked. Also the (1,1) doesn't correspond to the FAQ. I'm usinng the 32bits rpm for lazarus and fpcsrc but I'm using the 64 bits snapshot of FPC. The FAQ also says "Read the question" for this problem. But what question ??? How can I solve this problem ? Thanks. ---------------------------------------------------------------------- Lightning · 2004-11-25 08:59 I don't know how to solve this problem since i didn't have it, but it was discussed on these forums many times, maybe check the mailing list. ---------------------------------------------------------------------- Vincent Snijders · 2004-11-25 09:24 QuoteI'm usinng the 32bits rpm for lazarus and fpcsrc but I'm using the 64 bits snapshot of FPC. That is the cause of your problem: you are not using the same compiler (version) as used to (pre-)compile your LCL units. If you want to use the 64 bits snapshot of FPC, you need to recompile the LCL with it. Choose Tool, Configure Build Lazarus, and set  Build LCL on build + clean. Everything else on none. Uncheck the clean all checkbox and the Restart checkbox (if available). Close this dialog. Choose Tool, Build Lazarus to rebuild the LCL. This might very well fail, because I don't think any of the lazarus developers are using the 64 bit compiler yet. Then you need to fix the compilation (send patches to the mailing list) or use the 32 bit compiler. HTH, Vincent. ---------------------------------------------------------------------- Anonymous · 2004-11-25 10:17 Ok, I'll try that this evening. I already tried the whole 32 bits package, lazarus, FPC and FPCSRC but this doesn't work either. I get the same error as already posted here on the forum : QuoteLinking ./lazarus /usr/bin/ld: skipping incompatible /usr/lib/fpc/1.9.5/units/linux/rtl/cprt21.o when searching for /usr/lib/fpc/1.9.5/units/linux/rtl/cprt21.o /usr/bin/ld: cannot find /usr/lib/fpc/1.9.5/units/linux/rtl/cprt21.o lazarus.pp(97,1) Error: Error while linking If I can't get it to work I'll switch back to Kylix with a linux32 emulator. ---------------------------------------------------------------------- Neo · 2004-11-25 20:32 Quote from: "Vincent"QuoteI'm usinng the 32bits rpm for lazarus and fpcsrc but I'm using the 64 bits snapshot of FPC. That is the cause of your problem: you are not using the same compiler (version) as used to (pre-)compile your LCL units. If you want to use the 64 bits snapshot of FPC, you need to recompile the LCL with it. Choose Tool, Configure Build Lazarus, and set  Build LCL on build + clean. Everything else on none. Uncheck the clean all checkbox and the Restart checkbox (if available). Close this dialog. Choose Tool, Build Lazarus to rebuild the LCL. This might very well fail, because I don't think any of the lazarus developers are using the 64 bit compiler yet. Then you need to fix the compilation (send patches to the mailing list) or use the 32 bit compiler. HTH, Vincent. I did exactly what you asked but now I get the following : /usr/share/lazarus/lcl/lclstrconsts.pas(242) : Error: Writing resource string Table File: units/x86_64/linux/lclstrconsts.rst /usr/share/lazarus/lcl/lclstrconsts.pas(242) : Fatal : There were 1 errors compiling module, stopping.   What to do next ?? ---------------------------------------------------------------------- Vincent Snijders · 2004-11-25 21:27 I told you, you are going places, where not many has gone before. I estimate the chance of succes about 20% Does the directory /usr/share/lazarus/lcl/units/x86_64/linux/ exist? If not create it and the others directories, where you get errors writing files to. ---------------------------------------------------------------------- Lightning · 2004-11-25 23:14 Uninstall all packages related to Lazarus/FPC !!! Install only the matching 32 bit same version of FPC and it's sources, install the Lazarus binary package wich also includes the sources. You should be able to run Lazarus without recompilation. ---------------------------------------------------------------------- Neo · 2004-11-26 10:09 Quote from: "Lightning"Uninstall all packages related to Lazarus/FPC !!! Install only the matching 32 bit same version of FPC and it's sources, install the Lazarus binary package wich also includes the sources. You should be able to run Lazarus without recompilation. That's what I've already done 5 times. If I only use the 32 bits version I get always the following when I try to compile a simple project : Code: [Select]Linking ./lazarus /usr/bin/ld: skipping incompatible /usr/lib/fpc/1.9.5/units/linux/rtl/cprt21.o when searching for /usr/lib/fpc/1.9.5/units/linux/rtl/cprt21.o /usr/bin/ld: cannot find /usr/lib/fpc/1.9.5/units/linux/rtl/cprt21.o lazarus.pp(97,1) Error: Error while linking This does not occur when I use the 64 bits FPC version. But then I have the other problem. I'll try again what Vincent suggested and then I'll give up. I might try it again on the 32 bits version of SuSE 9.2 on my other PC to see what the result is. That way, I can be sure to what the problem is related. It's really anoying because Kylix doesn't run either because of dependancy problems which I cannot solve.  :cry:  :cry: ---------------------------------------------------------------------- neli · 2004-11-26 13:39 Can you run "file" on that file? Like: file /usr/lib/fpc/1.9.5/units/linux/rtl/cprt21.o ? and what type of linker is your 'ld' ? Maybe your ld wants to make 64 bit executables, but cprt21.o is a 32 bit object file (hence incompatibility). Does SuSE provide a 32-bit linker as well ? ---------------------------------------------------------------------- Neo · 2004-11-27 13:01 Quote from: "Vincent"I told you, you are going places, where not many has gone before. I estimate the chance of succes about 20% Does the directory /usr/share/lazarus/lcl/units/x86_64/linux/ exist? If not create it and the others directories, where you get errors writing files to. OK Vincent, I checked that and indeed the folders didn't exist. I created them and tried again to rebuild the LCL using the procedure you gave me. But this still fails using the 64 bits FPC. This is the output whenI try to build it : Code: [Select] neo@ferrari:~> lazarus [WARNING] ******************************************************* [WARNING] **                                                   ** [WARNING] ** Multibyte character encodings (like UTF8) are not ** [WARNING] ** supported at the moment.                          ** [WARNING] ** For full keyboard event support, make sure that   ** [WARNING] ** the LANG environment var has no UTF8              ** [WARNING] **                                                   ** [WARNING] ******************************************************* TApplication.IconChanged - TODO: convert this message...no implementation in gtk or win32 NOTE: editor options config file not found - using defaults NOTE: codetools config file not found - using defaults NOTE: help options config file not found - using defaults TMainIDE.DoNewProject A TMainIDE.DoNewEditorFile A NewFilename= TPascalParserTool.BuildTree B OnlyIntf=False  project1.lpr [TCustomFormEditor.CreateComponent] Class='TForm' TPascalParserTool.BuildTree B OnlyIntf=False  project1.lpr TMainIDE.DoNewEditorFile end unit1.pas TMainIDE.DoNewProject end [TExternalToolList.Run] /usr/bin/make clean all /bin/rm -f units/x86_64/linux/alllclunits.ppu units/x86_64/linux/actnlist.ppu units/x86_64/linux/arrow.ppu units/x86_64/linux/avglvltree.ppu units/x86_64/linux/buttons.ppu units/x86_64/linux/calendar.ppu units/x86_64/linux/checklst.ppu units/x86_64/linux/clipbrd.ppu units/x86_64/linux/clistbox.ppu units/x86_64/linux/comctrls.ppu units/x86_64/linux/commctrl.ppu units/x86_64/linux/controls.ppu units/x86_64/linux/dbactns.ppu units/x86_64/linux/dbctrls.ppu units/x86_64/linux/dbgrids.ppu units/x86_64/linux/dialogs.ppu units/x86_64/linux/dynamicarray.ppu units/x86_64/linux/dynhasharray.ppu units/x86_64/linux/editbtn.ppu units/x86_64/linux/extctrls.ppu units/x86_64/linux/extdlgs.ppu units/x86_64/linux/extendedstrings.ppu units/x86_64/linux/extgraphics.ppu units/x86_64/linux/filectrl.ppu units/x86_64/linux/forms.ppu units/x86_64/linux/fpcadds.ppu units/x86_64/linux/graphics.ppu units/x86_64/linux/graphmath.ppu units/x86_64/linux/graphtype.ppu units/x86_64/linux/grids.ppu units/x86_64/linux/imglist.ppu units/x86_64/linux/inipropstorage.ppu units/x86_64/linux/interfacebase.ppu units/x86_64/linux/lazlinkedlist.ppu units/x86_64/linux/lclintf.ppu units/x86_64/linux/lclmemmanager.ppu units/x86_64/linux/lclproc.ppu units/x86_64/linux/lclrescache.ppu units/x86_64/linux/lclstrconsts.ppu units/x86_64/linux/lcltype.ppu units/x86_64/linux/lmessages.ppu units/x86_64/linux/lresources.ppu units/x86_64/linux/maskedit.ppu units/x86_64/linux/menus.ppu units/x86_64/linux/pairsplitter.ppu units/x86_64/linux/postscriptprinter.ppu units/x86_64/linux/printers.ppu units/x86_64/linux/propertystorage.ppu units/x86_64/linux/spin.ppu units/x86_64/linux/stdactns.ppu units/x86_64/linux/stdctrls.ppu units/x86_64/linux/stringhashlist.ppu units/x86_64/linux/textstrings.ppu units/x86_64/linux/toolwin.ppu units/x86_64/linux/utrace.ppu units/x86_64/linux/xmlpropstorage.ppu /bin/rm -f units/x86_64/linux/lclstrconsts.rst /bin/rm -f /bin/rm -f fpcmade.lnx Package.fpc ppas.sh script.res link.res /bin/rm -f *.s *_ppas.sh /usr/bin/make -C interfaces clean make[1]: Entering directory `/usr/share/lazarus/lcl/interfaces' /usr/bin/make -C gtk clean make[2]: Entering directory `/usr/share/lazarus/lcl/interfaces/gtk' /bin/rm -f ../../units/x86_64/linux/gtk/interfaces.ppu ../../units/x86_64/linux/gtk/gtkdef.ppu ../../units/x86_64/linux/gtk/gtkglobals.ppu ../../units/x86_64/linux/gtk/gtkint.ppu ../../units/x86_64/linux/gtk/gtkmsgqueue.ppu ../../units/x86_64/linux/gtk/gtkproc.ppu ../../units/x86_64/linux/gtk/gtkwinapiwindow.ppu /bin/rm -f /bin/rm -f fpcmade.lnx Package.fpc ppas.sh script.res link.res /bin/rm -f *.s *_ppas.sh make[2]: Leaving directory `/usr/share/lazarus/lcl/interfaces/gtk' make[1]: Leaving directory `/usr/share/lazarus/lcl/interfaces' /bin/rm -f units/x86_64/linux/alllclunits.ppu /usr/lib64/fpc/1.9.5/ppcx64 -gl -Fu. -Funonwin32 -Fuwidgetset -Fiinclude -FUunits/x86_64/linux -Fl/usr/lib64/gcc-lib/x86_64-suse- linux/3.3.4 -Fl/usr/X11R6/lib64/Xaw95 -Fl/usr/X11R6/lib64/Xaw3d -Fl/usr/X11R6/lib64 -Fl/usr/X11R6/lib/Xaw95 -Fl/usr/X11R6/lib/Xaw3d -Fl/usr/X11R6/lib -Fl/usr/X11/lib -Fl/usr/x86_64-suse-linux/lib64 -Fl/usr/x86_64-suse-linux/lib-Fl/usr/local/lib -Fl/usr/openwin/lib -Fl/opt/kde/lib -Fl/opt/kde2/lib -Fl/opt/kde3/lib -Fl/opt/gnome/lib -Fl/opt/gnome2/lib -Fl/lib64 -Fl/lib -Fl/usr/lib64 -Fl/usr/lib -Fl/usr/local/lib64 -Fl/usr/openwin/lib64 -Fl/opt/kde/lib64 -Fl/opt/kde2/lib64 -Fl/opt/kde3/lib64 -Fl/opt/gnome/lib64 -Fl/opt/gnome2/lib64 -Fl/usr/lib/SunJava2/jre/bin -Flinclude -Fl/etc/ld.so.conf.d/*.conf -dx86_64 alllclunits.pp Free Pascal Compiler version 1.9.5 [2004/11/03] for x86_64 Copyright (c) 1993-2004 by Florian Klaempfl Target OS: Linux for x86-64 Compiling alllclunits.pp Fatal: Can't find unit System TExternalToolList.Run Exception: /usr/share/lazarus/lcl/alllclunits.pp(1,1) Fatal: Can't find unit System TPascalParserTool.BuildTree B OnlyIntf=True  /usr/share/lazarus/lcl/alllclunits.pp I tried this both as user and as root. Same result. In the Lazarus Message windows it displays /usr/share/lazarus/lcl/alllclunits.pp(1,1) Fatal: Can't find unit System When I try to compile a simple program with just a button on the form it results in the following error when compiling : /tmp/project1.lpr(1,1) Fatal: Can't find unit system More or less the same. It looks like I'm comming closer to the solution if someone just knows how I should handle this problem. I also read in another post that System was formerly used as syslinux. Is there a bug or old data in the 64bit snapshot tar file I downloaded ?? I hope we can solve this issue soon ---------------------------------------------------------------------- Vincent Snijders · 2004-11-27 14:37 If you don't have a system unit, you can't compile anything. So let us confirm that. Create this progam test.pas: Code: [Select]program test; begin end. and compile it from the command line: /usr/lib64/fpc/1.9.5/ppcx64 test.pas If this fails too, make sure you have a system.ppu and system.o file on your computer and that the paths in /etc/fpc.cfg or ~/.fpc.cfg are setup correctly. If this works, try to compile this program in lazarus. Use Create Project, Custom Program. If you want lots of information about the compiling process, goto the Project Menu, Compiler Options and click the test button. I hope this helps, but I am very skeptical, the more because I think the LCL is not 64 bit ready (some casts of pointer to longint for example). If you want a working lazarus, you might be better of using ppc386 and setting a correct linker (not the 64 bits assembler/linker). ---------------------------------------------------------------------- Neo · 2004-11-28 12:06 OK, almost done here. I managed to install a 32 bits linker and the error is gone. The last problem I now have is the message : cannot find -lgdk I install all possible gdk packages I could find, 32 bits as well as 64 bits. Which RPM file contains the libs I need ? I also forgot to mention that I added -Fl/opt/gnome/lib into /etc/fpc.cfg as indicated in the FAQ for SuSE. This didn't solve it. ---------------------------------------------------------------------- Vincent Snijders · 2004-11-28 12:55 I don't know the rpm, but I do have a couple of questions. :wink: did you install 32 bits development packages for gdk? do you have a libgdk.so installed? Is it 32 bits? try adding the path to it to the Libaries path in the compiler options. If that works, edit your /etc/fpc.cfg accordingly, so you don't need to set the path always. I hope this will get you there. ---------------------------------------------------------------------- Marc · 2004-12-01 15:56 The "Can't find unit system" message usually indicates that the fpc- rtl version is different that the version of the compiler. Make sure that you are using the system.ppu (and all other fpc units) belonging to the version of your compiler. Make suere that there is not an old version of the compiler  (posibly in /usr/bin or /usr/local/bin or ~/bin) ---------------------------------------------------------------------- Neo · 2004-12-02 05:53 Version are both the same. I think I tried every possible option available. Tried the 64 bits compiler which doesn't work at all with lazarus because it can't use the unit System. When I try to rebuild lazarus it fails again on another unit. I then removed every package and installed the 32 bits version of fpc, fpcsrc and lazarus but this one cannot work together with my linker which is 64 bits. Problem is that I cannot install the 32 bits linker. If I do so lazarus still doens't work because he flips on in the lgtk thing which I cannot solve at all even if all files necessary exists. Not only that but because I installed the 32 bits linker it has overwritten my 64 bits version which has as result that I can no longer compile software packages from source on the command line. So you see, I fall from one problem into another and it just doesn't work. As long as there is no full 64 bits version of fpc, fpcsrc and Lazarus it will never work. I gave up.