Hi, I'm using FPC 2.7.1 under 64-bit FreeBSD 9.1. I have to use 2.7.1 (updated about a week ago), so I could get the fixes for threading and memory corruption under FreeBSD (disussed a while back on mailing list).
Anyway, every now and again my projects (a few of them) fail to link as follows ----8<-------------8<-------------8<-------------8<-------------8<---- Hint: Start of reading config file /home/graemeg/.fpc.cfg Hint: End of reading config file /home/graemeg/.fpc.cfg Free Pascal Compiler version 2.7.1 [2013/03/04] for x86_64 Copyright (c) 1993-2013 by Florian Klaempfl and others Target OS: FreeBSD for x86-64 Compiling m2compiler.lpr Compiling frm_options.pas ...snip... Linking /data/devel/MasterMaths/m2_system/Bin/x86_64-freebsd/m2compiler /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/m2compiler.o:(.fpc+0xa70): undefined reference to `DEBUGSTART_$M2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/m2compiler.o:(.fpc+0xa78): undefined reference to `DEBUGEND_$M2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/m2compiler.o:(.data+0x3d0): undefined reference to `FINALIZE$_$M2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/frm_options.o: In function `FORMSHOW': /data/devel/MasterMaths/m2_system/Source/compiler//frm_options.pas:40: undefined reference to `M2COMPILER_$$_GM2COMPILER$$TM2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler//frm_options.pas:41: undefined reference to `M2COMPILER_$$_GM2COMPILER$$TM2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/frm_options.o: In function `BTNOKCLICKED': /data/devel/MasterMaths/m2_system/Source/compiler//frm_options.pas:47: undefined reference to `M2COMPILER_$$_GM2COMPILER$$TM2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler//frm_options.pas:48: undefined reference to `M2COMPILER_$$_GM2COMPILER$$TM2COMPILER' m2compiler.lpr(71,1) Error: Error while linking /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/m2compiler.o:(.fpc+0xa70): undefined reference to `DEBUGSTART_$M2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/m2compiler.o:(.fpc+0xa78): undefined reference to `DEBUGEND_$M2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/m2compiler.o:(.data+0x3d0): undefined reference to `FINALIZE$_$M2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/frm_options.o: In function `FORMSHOW': /data/devel/MasterMaths/m2_system/Source/compiler//frm_options.pas:40: undefined reference to `M2COMPILER_$$_GM2COMPILER$$TM2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler//frm_options.pas:41: undefined reference to `M2COMPILER_$$_GM2COMPILER$$TM2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler/units/x86_64-freebsd/frm_options.o: In function `BTNOKCLICKED': /data/devel/MasterMaths/m2_system/Source/compiler//frm_options.pas:47: undefined reference to `M2COMPILER_$$_GM2COMPILER$$TM2COMPILER' /data/devel/MasterMaths/m2_system/Source/compiler//frm_options.pas:48: undefined reference to `M2COMPILER_$$_GM2COMPILER$$TM2COMPILER' m2compiler.lpr(71,1) Error: Error while linking m2compiler.lpr(71,1) Fatal: There were 1 errors compiling module, stopping ----8<-------------8<-------------8<-------------8<-------------8<---- I have cleared out every single *.o, *.a, *.ppu etc. file I could find. I have even created a extrafpc.cfg file to bypass the usage of Lazarus packages, then use the compiler from the command line, and make sure everything gets compiled into a single unit output directory. Usage is as follows fpc @extrafpc.cfg m2compiler.lpr As I said, this linking failure happens randomly with different projects. I then just keep clearing the unit output directories, try and rebuild everything, and then magically it will start linking successfully again??? Any idea why? Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal