Can't find unit libc used by GDBMIMiscClasses [solved] lazarus / 1-Linux ---------------------------------------------------------------------- .yankee · 2011-04-18 08:26 I get this error while trying to build lazarus (svn revision 30359) - using fpc-2.4.2 : Code: [Select](...) Compiling /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/assemblerdlg.pp Compiling /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/debugoutputform.pp Compiling /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/exceptiondlg.pas Compiling /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/inspectdlg.pas Compiling /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/debugeventsform.pp Compiling /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/gdbmidebugger.pp Compiling /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/gdbtypeinfo.pp Compiling /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/gdbmimiscclasses.pp Fatal: Can't find unit libc used by GDBMIMiscClasses Fatal: Compilation aborted make[2]: *** [lazarus] Error 1 make[2]: Leaving directory `/var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/ide' make[1]: *** [ide] Error 2 make[1]: Leaving directory `/var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/ide' make: *** [ide] Error 2 Here are some details of my setup: -> system: amd64 gentoo Linux, glibc2 v2.13 -> # qlist fpc | grep libc.p (list of libc.p* files among fpc sources) : Code: [Select]/usr/lib/fpc/2.4.2/source/packages/libc/src/libc.pp /usr/lib/fpc/2.4.2/source/rtl/netwlibc/libc.pp Seems like some wrong paths set in Lazarus sources, right? ---------------------------------------------------------------------- marcov · 2011-04-18 08:59 Quote from: .yankee on April 18, 2011, 10:26:30 amI get this error while trying to build lazarus (svn revision 30359) - using fpc-2.4.2 : This is normal and by design. UNIT libc is a (Kylix oriented) legacy unit and thus x86 only. Non 32-bit x86 doesn't have this unit, as it is fundamentally unportable. This is documented here: http://wiki.freepascal.org/libc_unit The above document also gives some pointers how to properly migrate Kylix code to FPC native. ---------------------------------------------------------------------- .yankee · 2011-04-18 09:20 I see... But then, these files should be excluded from the default lazarus build: # find /var/tmp/portage/dev-lang/lazarus-9999/work/lazarus -name "*.pp" -exec grep -l libc {} \; Code: [Select]/var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/ide/compileroptions.pp /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/components/printers/unix/cupsdyn.pp /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/gdbmimiscclasses.pp As I understand, this needs to be fixed in order for the current lazarus to be built on amd64. Any tips, where I should look to fix this? ---------------------------------------------------------------------- marcov · 2011-04-18 09:29 Quote from: .yankee on April 18, 2011, 11:20:18 amI see... But then, these files should be excluded from the default lazarus build: # find /var/tmp/portage/dev-lang/lazarus-9999/work/lazarus -name "*.pp" -exec grep -l libc {} \; Code: [Select]/var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/ide/compileroptions.pp /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/components/printers/unix/cupsdyn.pp /var/tmp/portage/dev- lang/lazarus-9999/work/lazarus/debugger/gdbmimiscclasses.pp As I understand, this needs to be fixed in order for the current lazarus to be built on amd64. Any tips, where I should look to fix this? Three possibilities: 1. it is wrong in Lazarus mainline. But this is  very unlikely, since people use it everyday, also on amd64, and sb would have noticed 2. It is wrong in the port(age) version. IOW something went wrong when the distribution took the stock FPC/Lazarus source and adapted it to portage, and didn't test AMD64 properly. Use your distributions bugtracker to report this. 3. Lazarus somehow recycled old settings (e.g. due to a homedir restored from a 32-bit system), and the amd64 recycled it. Backup and erase your ~/.lazarus directory and try again. ---------------------------------------------------------------------- .yankee · 2011-04-18 09:44 Quote from: marcov on April 18, 2011, 11:29:39 am1. it is wrong in Lazarus mainline. But this is  very unlikely, since people use it everyday, also on amd64, and sb would have noticed 2. It is wrong in the port(age) version. IOW something went wrong when the distribution took the stock FPC/Lazarus source and adapted it to portage, and didn't test AMD64 properly. Use your distributions bugtracker to report this. 3. Lazarus somehow recycled old settings (e.g. due to a homedir restored from a 32-bit system), and the amd64 recycled it. Backup and erase your ~/.lazarus directory and try again. As I mentioned, I use live SVN sources here (revision 30359, that is - just synced). Thus, option 2. is most likely irrelevant - the only difference between original sources and ones used on my system is the result of a patch tat chandes default paths: Code: [Select]--- lazarus/ide/include/unix/lazbaseconf.inc +++ lazarus/ide/include/unix/lazbaseconf.inc @@ -24,8 +24,9 @@  }  const -  DefaultFPCSrcDirs: array[1..15] of string = ( +  DefaultFPCSrcDirs: array[1..16] of string = (      // search first for sources with right version +    '/usr/lib/fpc/$(FPCVer)/source',      '/usr/share/fpcsrc/$(FPCVer)',      // then search for global paths      '/usr/share/fpcsrc', So I believe there might have been a regression in recent sources... ---------------------------------------------------------------------- .yankee · 2011-04-18 09:49 Yep! Just synced again and I see that debugger/gdbmimiscclasses.pp has clearly been modified. IDEMiniLibC got in place of libc as I can see. Compiles fine now. Thanks for your interest anyway, marcov!