[fpc-pascal] Is there some reason why the linker cannot find crti.o, crtn.o etc?

2015-06-29 Thread vfclists .
These messages come up almost always when I compile a project:

Warning: "crti.o" not found, this will probably cause a linking failure
templateSys.lpr(39,1) Warning: "crtn.o" not found, this will probably cause
a linking failure.

On a 32bit system the files are located in /usr/lib/i386-gnu and
/usr/lib/gcc/i686-linux-gnu

find /usr/lib -type f -name crt*

/usr/lib/i386-linux-gnu/crti.o
/usr/lib/i386-linux-gnu/crtn.o
/usr/lib/gcc/i686-linux-gnu/4.X/crtbegin.o
/usr/lib/gcc/i686-linux-gnu/4.X/crtend.o

I don't know if some of them are debug builds which may have other
attributes which make them undetectable by the linker.

Some of the errors may also be related to the gnu tools and not be
FPC/Lazarus related.

This issue bit me when I was trying to cross compile some synopse libraries
(I have forgotten how I fixed it) and I want to know how it can be fixed
permanently in my installations.


-- 
Frank Church

===
http://devblog.brahmancreations.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Help building FPC on armhf

2015-06-29 Thread Andrew Brunner


On 6/28/2015 8:56 AM, Michael Ring wrote:

I am using parameters suggested on this page (modified for armv7a):

http://michellcomputing.co.uk/blog/2014/05/freepascal-2-7-1-on-raspberry-pi/ 



OPT="-dREVINC -dFPC_ARMHF -CX -CpARMV7A -CfVFPV3_D16 -OpARMV7A -O2 
-OoFASTMATH -XX -Xs"


as your error seems to be caused by some conditional parsing the extra 
defines above might help (or not .)


Michael


Hi Michael,

I tried to use the options above to no avail.  Thanks for the effort though.

--
Andrew Brunner

Aurawin LLC
512.850.3117
https://aurawin.com/

Aurawin is a great new way to store, share and enjoy your photos, videos, 
music, and more.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Help building FPC on armhf

2015-06-29 Thread Jonas Maebe


Andrew Brunner wrote on Sun, 28 Jun 2015:

make clean all OPT=-dARMHF DEBUG=1 OS_TARGET=linux CPU_TARGET=arm  
CPU_SOURCE=arm


Building crashes at compiling system.pp

as   -o /Developer/FPC/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as
as  -o /Developer/FPC/rtl/units/arm-linux/cprt0.o arm/cprt0.as
as  -o /Developer/FPC/rtl/units/arm-linux/gprt0.o arm/gprt0.as
as  -o /Developer/FPC/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as
/Developer/FPC/compiler/ppc1 -Ur -gl -Ur -Xs -O2 -n -Fi../inc  
-Fi../arm -Fi../unix -Fiarm -FE.  
-FU/Developer/FPC/rtl/units/arm-linux -dARMHF -darm -dDEBUG  
-dRELEASE -Us -Sg system.pp
flt_pack.inc(119,5) Error: Syntax error while parsing a conditional  
compiling expression


That suggests a miscompiled ppc1. You can try using OPT="-dARMHF -O-"  
for the initial bootstrap to avoid potential wrong optimisations by  
the 2.6.4 starting compiler. Unrelated to this, you should probably  
also specify the correct architecture and VFP version for your  
platform, similar to what Michael suggested (but not necessarily the  
same, as it depends on your CPU).



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Help building FPC on armhf

2015-06-29 Thread Michael Ring
I think I now remember having the same problem before, can you please 
try to build with "-O-" instead of -O2 ?


In the past the compiler threw an exception in system.pas, perhaps it 
now displays an error message.


Michael

Am 29.06.15 um 14:13 schrieb Andrew Brunner:


On 6/28/2015 8:56 AM, Michael Ring wrote:

I am using parameters suggested on this page (modified for armv7a):

http://michellcomputing.co.uk/blog/2014/05/freepascal-2-7-1-on-raspberry-pi/ 



OPT="-dREVINC -dFPC_ARMHF -CX -CpARMV7A -CfVFPV3_D16 -OpARMV7A -O2 
-OoFASTMATH -XX -Xs"


as your error seems to be caused by some conditional parsing the 
extra defines above might help (or not .)


Michael


Hi Michael,

I tried to use the options above to no avail.  Thanks for the effort 
though.




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Help building FPC on armhf

2015-06-29 Thread Michael Ring
At least for debian the values for Floating point should be OK for the 
Wandboard:


"Currently the Debian armhf port requires at least an ARMv7 CPU with 
Thumb-2 and VFP3D16." (https://wiki.debian.org/ArmHardFloatPort)


Michael

Am 29.06.15 um 14:41 schrieb Jonas Maebe:


Andrew Brunner wrote on Sun, 28 Jun 2015:

make clean all OPT=-dARMHF DEBUG=1 OS_TARGET=linux CPU_TARGET=arm 
CPU_SOURCE=arm


Building crashes at compiling system.pp

as   -o /Developer/FPC/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as
as  -o /Developer/FPC/rtl/units/arm-linux/cprt0.o arm/cprt0.as
as  -o /Developer/FPC/rtl/units/arm-linux/gprt0.o arm/gprt0.as
as  -o /Developer/FPC/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as
/Developer/FPC/compiler/ppc1 -Ur -gl -Ur -Xs -O2 -n -Fi../inc 
-Fi../arm -Fi../unix -Fiarm -FE. 
-FU/Developer/FPC/rtl/units/arm-linux -dARMHF -darm -dDEBUG -dRELEASE 
-Us -Sg system.pp
flt_pack.inc(119,5) Error: Syntax error while parsing a conditional 
compiling expression


That suggests a miscompiled ppc1. You can try using OPT="-dARMHF -O-" 
for the initial bootstrap to avoid potential wrong optimisations by 
the 2.6.4 starting compiler. Unrelated to this, you should probably 
also specify the correct architecture and VFP version for your 
platform, similar to what Michael suggested (but not necessarily the 
same, as it depends on your CPU).



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is there some reason why the linker cannot find crti.o, crtn.o etc?

2015-06-29 Thread Marco van de Voort
In our previous episode, vfclists . said:
> Warning: "crti.o" not found, this will probably cause a linking failure
> templateSys.lpr(39,1) Warning: "crtn.o" not found, this will probably cause
> a linking failure.

Under Linux, the directory for those files is passed to FPC by a -Fl line in
the fpc.cfg which is setup by the installer script (standalone pkg) or the
distribution (in the case of a distribution package)
 
Usually that installer calls fpcmkcfg which calls gcc with
--print-libgcc-file-name to determine the location.

This assumes everything is configured correctly when FPC was installed, if
not, try rerunning fpcmkcfg or manually fixing fpc.cfg

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] TDBF licensing

2015-06-29 Thread Graeme Geldenhuys
Hi,

Am I correct in understanding that TDBF included with FPC is a LGPL
licensed component, the one that doesn't have the static linking
exception. So I can't use it in any commercial products or tools without
being forced to release all my source code?

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/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TDBF licensing

2015-06-29 Thread Jonas Maebe
On 30/06/15 00:09, Graeme Geldenhuys wrote:
> Am I correct in understanding that TDBF included with FPC is a LGPL
> licensed component, the one that doesn't have the static linking
> exception.

TDBF originally comes from http://sourceforge.net/projects/tdbf/ and is
indeed distributed under the LGPL.

> So I can't use it in any commercial products or tools without
> being forced to release all my source code?

It doesn't matter whether the products or tools are commercial or not.
The LGPL means that if you link statically against TDBF, you have to
provide (on request) the object files of your program to customers that
bought the original tool so they can relink it against newer/modified
versions of the TDBF code.

There is no reason why you would ever have to release your own source
code, except if you would start mixing your own source code into the
TDBF units or so.


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TDBF licensing

2015-06-29 Thread Graeme Geldenhuys
Thanks Jonas for all the information. I'll pass this information on to
the person that asked me.

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/cgi-bin/mailman/listinfo/fpc-pascal