Recent

Author Topic: Lazarus 0.9.30 can't recompile in Ubuntu  (Read 10750 times)

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Lazarus 0.9.30 can't recompile in Ubuntu
« on: June 11, 2011, 08:10:50 am »
This problem has started after I installed the last version of Fortes Report. I couldn't install additional packages, the compiler returns errors like : printers unit not found...
When I remove Lazarus completely and installed it again from .deb packages, it works, but I get the same problem when I've installed Fortes Report.
I remove Lazarus again, and downloaded from trunk 0.9.31, but it failed to compile TurboBird source.
Then I remove it and tried to install 0.9.30 from .deb package after deleting .lazarus folder.
Now it failed to recompile, I get this error:

masks.pas(29,22) Fatal: Can't find unit contnrs used by Masks

I tried clean installation, installing without packages, withtout luck.
any body knows how to solve this?
I'm using FPC 2.4.2 and Ubuntu 11.4

Thanks
« Last Edit: June 11, 2011, 08:15:55 am by motaz »

touchring

  • Full Member
  • ***
  • Posts: 174
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #1 on: June 11, 2011, 09:43:58 am »
i encountered this on windows. it was due to missing or corrupted fpc.cfg or some cfg file.

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #2 on: June 11, 2011, 01:53:46 pm »
Which directory contains the configuration in addition to .lazarus?

please help, I'm running out of Lazarus

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6615
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #3 on: June 11, 2011, 02:22:44 pm »
masks.pas(29,22) Fatal: Can't find unit contnrs used by Masks

This error often happens due to fpc version mix up.
You probably have files from several fpc versions (ppu files from fpc itself).

The fpc config points to where they should be, but it may point wrong.
IIRC there was recently some mails that fpc sometimes creates a wrong fpc.cfg...
http://bugs.freepascal.org/view.php?id=19538

fpc.cfg can be in different places.
/etc/fpc.cfg
in your home dir, and some other places

find which fpc is called by lazarus (in case more than one exist)
create a simple program.pas, and then something like this
fpc -va program.pas | grep fpc.cfg


you can also specify -va in lazarus, to see where fpc is looking (but it's a lot of output)

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #4 on: June 13, 2011, 07:27:22 pm »
I've removed Lazarus, and FPC and all fpc.cfg files, and installed Lazarus 0.9.30.0 again, when I recompile using clean I get:

Fatal: Can't find unit Contnrs used by Masks

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3827
  • I like bugs.
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #5 on: June 13, 2011, 08:00:21 pm »
Run "make clean all" on cmd line in the Lazarus directory.
Later you can use the Build Lazarus dialog.

Juha
Mostly Lazarus trunk on Manjaro Linux.

garlar27

  • Hero Member
  • *****
  • Posts: 648
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #6 on: June 13, 2011, 08:03:57 pm »
Don't forget to erase "~/.lazarus/" folder.

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #7 on: June 13, 2011, 08:06:31 pm »
I get the same error in command line:
/bin/rm -f units/i386-linux/alllclunits.ppu
/usr/bin/ppc386 -gl  -Fu. -Funonwin32 -Fuforms -Fuwidgetset -Fu/usr/lib/fpc/2.4p
Fatal: Can't find unit Contnrs used by Masks
Fatal: Compilation aborted
make[1]: *** [alllclunits.ppu] Error 1
make[1]: Leaving directory `/usr/lib/lazarus/0.9.30/lcl'
make: *** [lcl] Error 2

in project's compiler otpions test button I get this warning:
no fpc.cfg found
now I can not run new applications

Zoran

  • Hero Member
  • *****
  • Posts: 1589
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #8 on: June 13, 2011, 08:45:31 pm »
I experienced the same problem a couple of days ago, when I uninstalled fpc 2.4.2 and installed 2.4.4.

Now I will delete fpc, install it again, so I hope I will remember where exactely the problem was. Please wait, I'll post here soon.

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #9 on: June 13, 2011, 08:59:47 pm »
Now I installed FPC 2.4.4, it works fine, except for Turbo Bird cann't compile it returns:
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?

but Lazarus re-compiles successfully
Thanks all

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #10 on: June 13, 2011, 09:05:26 pm »
removing *.o, *.ppu, and *.a solving the problem of Turbo Bird.
Now every thing seems good
Thanks

Zoran

  • Hero Member
  • *****
  • Posts: 1589
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #11 on: June 13, 2011, 09:11:04 pm »
I am glad everything works well now.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3827
  • I like bugs.
Re: Lazarus 0.9.30 can't recompile in Ubuntu
« Reply #12 on: June 14, 2011, 07:31:13 am »
This problem happens often and there are many possible reasons for it.
Mattias Gärtner has written a wiki page about it. Please check out:

 http://wiki.lazarus.freepascal.org/Unit_not_found_-_How_to_find_units

Juha
Mostly Lazarus trunk on Manjaro Linux.

 

TinyPortal © 2005-2018