[fpc-pascal] Linking FPC units with Visual Studio 2013 projects

2015-08-20 Thread Tobias Giesen
Hello,

I have to compile a few Pascal units with FPC and add them to a Visual 
C++ project. After adding system.o to the Visual C++ project, I get 
linker errors like this:

system.o : error LNK2001: unresolved external symbol _$dll$kernel32$Sleep

Apparently the Microsoft linker does not recognize the FPC way of
mangling the DLL dependencies? Is there a way to compile the RTL in a
way that Microsoft can link? Or anything else I can do?

Thanks.
Tobias Giesen


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


[fpc-pascal] Linking FPC units with Visual Studio 2013 projects

2015-08-20 Thread tobiasgiesen
Hello,

I have to compile a few Pascal units with FPC and add them to a Visual 
C++ project. After adding system.o to the Visual C++ project, I get 
linker errors like this:

system.o : error LNK2001: unresolved external symbol _$dll$kernel32$Sleep

Apparently the Microsoft linker does not recognize the FPC way of
mangling the DLL dependencies? Is there a way to compile the RTL in a
way that Microsoft can link? Or anything else I can do?

Thanks.
Tobias Giesen


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


Re: [fpc-pascal] quality of FPC random

2015-08-20 Thread Peter
http://www.2uo.de/myths-about-urandom/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] I-Pascal: IDE based on IntelliJ platform

2015-08-20 Thread George Bakhtadze
Hi all,

I-Pascal  is  an  IDE  (mainly code editor) for Object Pascal based on
IntelliJ platform. Other products based on the platform includes IDEA,
WebStorm, Android Studio.

The  platform  is built around AST (abstract syntax tree) concept. The
AST is built from code and used for analysis. This approach allows IDE
to  "understand"  code  while  doing  completion,  navigation,  static
analysis etc.

The project's main focus is code: editing, navigation, analysis.

Currently implemented features are:
 . highlightingforsomekindsoferrors(missing
 declarations/implementations)
 . quick fixes for the errors
 . context aware code completion
 . navigation to overridden/descendant methods/classes
 . navigation to super methods/classes
 . PPU/DCU interface decompilation (FPC 2.7.x or above is needed)
 . rename refactoring
 . integration with Free Pascal compiler as well as Delphi compiler
and others.

The project site:
http://www.siberika.com/siberika/ipascal.html

Installation and usage instructions:
http://www.siberika.com/siberika/install.html

Feedback is highly appreciated.

-- 
Best regards, George

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 03:16 PM, Jonas Maebe wrote:

Chris Moody wrote:

To further add to the confusion, I found my Raspberry did not have
locate installed, so I asked apt-get to get a copy and it obtained:

Unpacking locate (from .../locate_4.4.2-4_armhf.deb) ...

I did locate https://blogs.oracle.com/jtc/entry/is_it_armhf_or_armel and
going by Jim's blog I'm running an armhf system.

So I don't know what I have :(.


That indeed suggests you have an armhf system. I really don't get why 
it's installing an ARMEL compiler. Please file a bug with Raspbian 
about that.


You can bootstrap an armhf 3.0 compiler on an armel system, but it's a 
bit tricky:

1) install the armel compiler (you already did that
2) build FPC with OPT="-dFPC_ARMHF" FPCMAKEOPT="-dNO_THREADING"

This last parameter removes the libc dependency from fpmake, so it 
won't need the _init and _fini symbols. It does not remove threading 
support from the RTL itself, so that's fine.


This way, FPC 3.0 should build successfully, and you should end up 
with an FPC 3.0 ARMHF compiler. You can verify it by running 
"./fpcsrc/compiler/ppcarm -l nonexisting.pp" afterwards and checking 
that it says it targets ARMHF.


If that is the case, install it in a subdirectory of your home 
directory (make ... install INSTALL_PREFIX=$HOME/somedir), create a 
symbolic link from $HOME/somedir/bin/ppcarm to 
$HOME/somedir/lib/fpc/3.0/ppcarm, add $HOME/somedir/bin to the front 
of your path, and finally add the following lines to ~/.fpc.cfg


#ifdef VER3_0
-Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/rtl
#endif

That should enable you to use both "fpc" and "ppcarm" to compile 
programs using this newly built FPC 3.0.



Jonas


Seems it compiles but still complains about linking.

Free Pascal Compiler version 3.0.0rc1 [2015/08/20] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for ARMHF

Assembling dentist
Linking Dentist
Dentist.pas(106) Warning: "crtbegin.o" not found, this will probably 
cause a linking failure
Dentist.pas(106) Warning: "crtend.o" not found, this will probably cause 
a linking failure

/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
10358 lines compiled, 8.9 sec
10 warning(s) issued
2 note(s) issued


Thanks for the help Jonas and others!

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 03:16 PM, Jonas Maebe wrote:

Chris Moody wrote:

To further add to the confusion, I found my Raspberry did not have
locate installed, so I asked apt-get to get a copy and it obtained:

Unpacking locate (from .../locate_4.4.2-4_armhf.deb) ...

I did locate https://blogs.oracle.com/jtc/entry/is_it_armhf_or_armel and
going by Jim's blog I'm running an armhf system.

So I don't know what I have :(.


That indeed suggests you have an armhf system. I really don't get why 
it's installing an ARMEL compiler. Please file a bug with Raspbian 
about that.


You can bootstrap an armhf 3.0 compiler on an armel system, but it's a 
bit tricky:

1) install the armel compiler (you already did that
2) build FPC with OPT="-dFPC_ARMHF" FPCMAKEOPT="-dNO_THREADING"

This last parameter removes the libc dependency from fpmake, so it 
won't need the _init and _fini symbols. It does not remove threading 
support from the RTL itself, so that's fine.


This way, FPC 3.0 should build successfully, and you should end up 
with an FPC 3.0 ARMHF compiler. You can verify it by running 
"./fpcsrc/compiler/ppcarm -l nonexisting.pp" afterwards and checking 
that it says it targets ARMHF.


If that is the case, install it in a subdirectory of your home 
directory (make ... install INSTALL_PREFIX=$HOME/somedir), create a 
symbolic link from $HOME/somedir/bin/ppcarm to 
$HOME/somedir/lib/fpc/3.0/ppcarm, add $HOME/somedir/bin to the front 
of your path, and finally add the following lines to ~/.fpc.cfg


#ifdef VER3_0
-Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/rtl
#endif

That should enable you to use both "fpc" and "ppcarm" to compile 
programs using this newly built FPC 3.0.



Jonas


./ppcarm -l nonexisting.pp
Free Pascal Compiler version 3.0.0rc1 [2015/08/20] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling nonexisting.pp
Fatal: Cannot open file "nonexisting.pp"
Fatal: Compilation aborted

Yay! thanks for all the help everyone!

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


Re: [fpc-pascal] quality of FPC random

2015-08-20 Thread David W Noon
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 20 Aug 2015 22:50:05 +0200, Klaus Hartnegg ()
wrote about "Re: [fpc-pascal] quality of FPC random" (in
<55d63d7d.6040...@gmx.de>):

> Am 14.08.2015 um 15:38 schrieb Xiangrong Fang:
>> I need to generate random numbers to be used as IV of block
>> ciphers.  My question is: is FPC built-in PRNG good enough as
>> comparing to /dev/urandom?
> 
> NO!!! For crypto always use /dev/urandom
> 
>> On the other hand, /dev/urandom in my impression is fairly slow,
>> how is the speed of Random() comparing to that?
> 
> Speed is irrelevant, because you do not need many truely random
> numbers for crypto. For crypto always use /dev/urandom

man 4 random

The /dev/urandom device can resort to a PRNG and can, therefore, be
attacked when used for crypto.  Consequently, /dev/urandom is *not*
universally suitable for cryptographic purposes.

In contrast, /dev/random is based on the system entropy pool.  Its
numbers are genuinely random.  The downside is that if the entropy
pool runs low on bytes, read requests will block until the pool is
refilled.

On this machine, I have a hardware random number generator on the bus
control chipset and a daemon process that uses the hardware to top up
the entropy pool when it gets low.  I highly recommend such a set-up.
 Failing that, you can use the HAVEGE daemon (Google is your friend)
to top up the entropy pool from other sources, if you don't have a
hardware RNG.
- -- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
david.w.n...@googlemail.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlXWWF4ACgkQogYgcI4W/5RqJQCgsVvdf3ihJrvqs4UQdICQTB7T
epkAoMXQR+Kjai///7EibePEoT6RUoq/
=IGX0
-END PGP SIGNATURE-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe

Chris Moody wrote:

To further add to the confusion, I found my Raspberry did not have
locate installed, so I asked apt-get to get a copy and it obtained:

Unpacking locate (from .../locate_4.4.2-4_armhf.deb) ...

I did locate https://blogs.oracle.com/jtc/entry/is_it_armhf_or_armel and
going by Jim's blog I'm running an armhf system.

So I don't know what I have :(.


That indeed suggests you have an armhf system. I really don't get why 
it's installing an ARMEL compiler. Please file a bug with Raspbian about 
that.


You can bootstrap an armhf 3.0 compiler on an armel system, but it's a 
bit tricky:

1) install the armel compiler (you already did that
2) build FPC with OPT="-dFPC_ARMHF" FPCMAKEOPT="-dNO_THREADING"

This last parameter removes the libc dependency from fpmake, so it won't 
need the _init and _fini symbols. It does not remove threading support 
from the RTL itself, so that's fine.


This way, FPC 3.0 should build successfully, and you should end up with 
an FPC 3.0 ARMHF compiler. You can verify it by running 
"./fpcsrc/compiler/ppcarm -l nonexisting.pp" afterwards and checking 
that it says it targets ARMHF.


If that is the case, install it in a subdirectory of your home directory 
(make ... install INSTALL_PREFIX=$HOME/somedir), create a symbolic link 
from $HOME/somedir/bin/ppcarm to $HOME/somedir/lib/fpc/3.0/ppcarm, add 
$HOME/somedir/bin to the front of your path, and finally add the 
following lines to ~/.fpc.cfg


#ifdef VER3_0
-Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/home/pi/somedir/lib/fpc/$fpcversion/units/$fpctarget/rtl
#endif

That should enable you to use both "fpc" and "ppcarm" to compile 
programs using this newly built FPC 3.0.



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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 02:38 PM, Jonas Maebe wrote:

Chris Moody wrote:

The current FPC is from apt-get

pi@raspberrypi ~ $ which fpc
/usr/bin/fpc
pi@raspberrypi ~ $ which ppcarm
/usr/bin/ppcarm


Ok, now please remove and reinstall that compiler (apt-get remove fpc; 
apt-get install fpc) to ensure it has not been overwritten by any of 
your experiments.


Next, if you execute
  /usr/bin/ppcarm -l nonexistingfile.pp

what is the complete compiler output?


Jonas


pi@raspberrypi ~ $ /usr/bin/ppcarm -l nonexistingfile.pp
Free Pascal Compiler version 2.6.4 [2014/03/21] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for ARMEL
Compiling nonexistingfile.pp
Fatal: Can't open file "nonexistingfile.pp"
Fatal: Compilation aborted

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe

Tomas Hajny wrote:

I don't want to raise the confusion any further, especially if my
knowledge of ARM is zero. However - are you sure that the output of target
as displayed by FPC really shows the correct information reflecting the
supported ABI?


$ ./bin/ppcarmhf2 -l noexisting.pp
Free Pascal Compiler version 2.6.4-dfsg+armhf [1970/01/03] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling noexisting.pp
Fatal: Can't open file "noexisting.pp"

(the weird compiler date is because I built it myself from the Debian 
sources, and the date on this system is not set)



I ask because a trunk cross-compiler built for armeb using
make fullcycle shows "Linux for ARMEL" too (just like it does for the real
ARMEL version)...


That's because the default compiler that gets built for PPC_TARGET=arm 
is ARMEL these days, while originally it was ARMEB. The fullcycle target 
in the Makefile has not been updated for that.


So yes, this is completely unrelated, as both of those compilers are in 
fact ARMEL compilers.



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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Tomas Hajny
On Thu, August 20, 2015 17:01, Jonas Maebe wrote:
> On 20/08/15 16:19, Chris Moody wrote:


Jonas,

>> I see that the target is:
>>
>> Target OS: Linux for ARMEL
 .
 .
>> is the target os the issue?
>
> Yes, it is. Are you certain that this is with the system-installed
> compiler, and not with one of the ones that you tried to install or
> compile yourself? What does "which fpc" and "which ppcarm" show?
 .
 .

I don't want to raise the confusion any further, especially if my
knowledge of ARM is zero. However - are you sure that the output of target
as displayed by FPC really shows the correct information reflecting the
supported ABI? I ask because a trunk cross-compiler built for armeb using
make fullcycle shows "Linux for ARMEL" too (just like it does for the real
ARMEL version)...

Tomas


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe

Chris Moody wrote:

The current FPC is from apt-get

pi@raspberrypi ~ $ which fpc
/usr/bin/fpc
pi@raspberrypi ~ $ which ppcarm
/usr/bin/ppcarm


Ok, now please remove and reinstall that compiler (apt-get remove fpc; 
apt-get install fpc) to ensure it has not been overwritten by any of 
your experiments.


Next, if you execute
  /usr/bin/ppcarm -l nonexistingfile.pp

what is the complete compiler output?


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 08:01 AM, Jonas Maebe wrote:

On 20/08/15 16:19, Chris Moody wrote:

I see that the target is:

Target OS: Linux for ARMEL

I do have /usr/lib/arm-linux-gnueabihf/crti.o

I don't need to specify -Fu/usr/lib/fpc/2.6.4/units/arm-linux

is the target os the issue?

Yes, it is. Are you certain that this is with the system-installed
compiler, and not with one of the ones that you tried to install or
compile yourself? What does "which fpc" and "which ppcarm" show?

Which version of Raspbian do you have? From what I can see in
http://archive.raspbian.org/raspbian/dists/stable/main/source/Sources.xz
, the fpc package definitely is the Debian one with the hardfloat
patches (2.6.4+dfsg-4+rpi1). Of course, they might still have compiled
it for softfp, but that would seem weird.


Jonas

PS: your linker is fine and unrelated.
___



The current FPC is from apt-get

pi@raspberrypi ~ $ which fpc
/usr/bin/fpc
pi@raspberrypi ~ $ which ppcarm
/usr/bin/ppcarm

https://www.raspberrypi.org/downloads/raspbian/ << this is the version 
of Rasbian I just installed a couple of days of ago.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 09:52 AM, Jonas Maebe wrote:

On 20/08/15 18:25, Graeme Geldenhuys wrote:

On 2015-08-20 16:01, Jonas Maebe wrote:

Yes, it is. Are you certain that this is with the system-installed
compiler

My working FPC 2.6.0 and 2.6.2 also says "Linux for ARMEL".

Incidentally, if I do 'sudo apt-get install ' I see apt
output like "Get:   armel "
It can be any package like 'git', 'mc' etc.  My Raspbian is from 2012 -
no idea how to find out the exact version number.

Ok, in that case it seems that there are in fact non-hard float versions
of Raspbian. Your compiler may work because you also installed the ARMEL
version of libc6-dev.

That's another thing:
* Chris may also to solve his problem by installing the ARMEL version of
libc6-dev (package name: libc6-dev-armel )
* however, if he then compiles his program and gives the compiled binary
to a customer, it may not work if they are using an ARM hard-float
installation (unless they also install the libc6-dev-armel package). Of
course, if compiles it for hard float and the customer has a softfp
system, it will also cause problems.

So maybe it would be useful to first determine whether the customer has
an armel or armhf system.


Jonas

To further add to the confusion, I found my Raspberry did not have 
locate installed, so I asked apt-get to get a copy and it obtained:


Unpacking locate (from .../locate_4.4.2-4_armhf.deb) ...

I did locate https://blogs.oracle.com/jtc/entry/is_it_armhf_or_armel and 
going by Jim's blog I'm running an armhf system.


So I don't know what I have :(.

Chris


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


Re: [fpc-pascal] quality of FPC random

2015-08-20 Thread Klaus Hartnegg

Am 14.08.2015 um 15:38 schrieb Xiangrong Fang:

I need to generate random numbers to be used as IV of block ciphers.  My
question is: is FPC built-in PRNG good enough as comparing to /dev/urandom?


NO!!!
For crypto always use /dev/urandom


On the other hand, /dev/urandom in my impression is fairly slow, how is
the speed of Random() comparing to that?


Speed is irrelevant, because you do not need many truely random numbers 
for crypto.

For crypto always use /dev/urandom

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe
On 20/08/15 18:25, Graeme Geldenhuys wrote:
> On 2015-08-20 16:01, Jonas Maebe wrote:
>> > Yes, it is. Are you certain that this is with the system-installed
>> > compiler
> My working FPC 2.6.0 and 2.6.2 also says "Linux for ARMEL".
> 
> Incidentally, if I do 'sudo apt-get install ' I see apt
> output like "Get:   armel "
> It can be any package like 'git', 'mc' etc.  My Raspbian is from 2012 -
> no idea how to find out the exact version number.

Ok, in that case it seems that there are in fact non-hard float versions
of Raspbian. Your compiler may work because you also installed the ARMEL
version of libc6-dev.

That's another thing:
* Chris may also to solve his problem by installing the ARMEL version of
libc6-dev (package name: libc6-dev-armel )
* however, if he then compiles his program and gives the compiled binary
to a customer, it may not work if they are using an ARM hard-float
installation (unless they also install the libc6-dev-armel package). Of
course, if compiles it for hard float and the customer has a softfp
system, it will also cause problems.

So maybe it would be useful to first determine whether the customer has
an armel or armhf system.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Graeme Geldenhuys
On 2015-08-20 16:01, Jonas Maebe wrote:
> Yes, it is. Are you certain that this is with the system-installed
> compiler

My working FPC 2.6.0 and 2.6.2 also says "Linux for ARMEL".

Incidentally, if I do 'sudo apt-get install ' I see apt
output like "Get:   armel "
It can be any package like 'git', 'mc' etc.  My Raspbian is from 2012 -
no idea how to find out the exact version number.

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] *SPAM* Re: *SPAM* Re: Windows IOT Core

2015-08-20 Thread Sven Barth
Am 20.08.2015 16:21 schrieb "Michael Schnell" :
>
> On 08/20/2015 02:31 PM, Sven Barth wrote:
>>
>>
>> Microsoft will probably only allow the usage of Apps (in contrast to
normal Win32 programs) there. Thus of course it requires the RT API.
>>
>
> I am happy to report that you are wrong :-)
>
> A colleague of mine already since a few days does have the Intel IOT Core
DevKit including the "MinnowBoard Max" and he runs Delphi programs on same.
And he is really happy with the performance of the Device.
>
> So fpc programs compiled for Windows should run out of the box.

In that case FPC should work as well of course.
Might be worthwhile to test the ARM variant again, because if that allows
normal C/C++ applications as well, then we could at least add a arm-win32
target for that (I've seen that mingw-w64 provides arm-binutils so that
problem could be solved as well).

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

Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Martin Schreiber
On Thursday 20 August 2015 15:47:59 Chris Moody wrote:

> > http://sourceforge.net/projects/mseide-msegui/files/fpcarm/
>
> I downloaded the file from this URL and had it overwrite my installed
> FPC 2.64 files and I still got :
>
> /usr/bin/ld: warning: link.res contains output sections; did you forget -T?
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x88): undefined reference to `_fini'
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x90): undefined reference to `_init'
> Dentist.pas(106) Error: Error while linking
> Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /usr/bin/ppcarm returned an error exitcode
>
> I did notice the file I downloaded did not include a new version of ld,
> so not sure if I did the correct thing or not.
>
Probably not, I assume the .fpc.cfg is not correct.

If you like to use the fixes_3_0 compiler:

On the Pi extract fpc_eabihf_3_0_1.tar.gz to /home/pi/fpc/3_0, copy 
attached .fpc.cfg to /home/pi.

In order to compile your application:
/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm -Fu \ 


Did you try the cross compiling environment?

Martin
#
# Config file generated by fpcmkcfg on 20-8-15 - 15:23:28
# Example fpc.cfg for Free Pascal Compiler
#

# --
# Defines (preprocessor)
# --

#
# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
#
# -d is the same as #DEFINE
# -u is the same as #UNDEF
#

#
# Some examples (for switches see below, and the -? helppages)
#
# Try compiling with the -dRELEASE or -dDEBUG on the commandline
#

# For a release compile with optimizes and strip debuginfo
#IFDEF RELEASE
  -O2
  -Xs
  #WRITE Compiling Release Version
#ENDIF

# For a debug version compile with debuginfo and all codegeneration checks on
#IFDEF DEBUG
  -gl
  -Crtoi
  #WRITE Compiling Debug Version
#ENDIF

# assembling
#ifdef darwin
# use pipes instead of temporary files for assembling
-ap
# path to Xcode 4.3+ utilities (no problem if it doesn't exist)
-FD/Applications/Xcode.app/Contents/Developer/usr/bin
#endif

# 
# Parsing switches
# 

# Pascal language mode
#  -Mfpc  free pascal dialect (default)
#  -Mobjfpc   switch some Delphi 2 extensions on
#  -Mdelphi   tries to be Delphi compatible
#  -Mtp   tries to be TP/BP 7.0 compatible
#  -Mgpc  tries to be gpc compatible
#  -Mmacpas   tries to be compatible to the macintosh pascal dialects
#
# Turn on Object Pascal extensions by default
#-Mobjfpc

# Assembler reader mode
#  -Rdefault  use default assembler
#  -Ratt  read AT&T style assembler
#  -Rintelread Intel style assembler
#
# All assembler blocks are AT&T styled by default
#-Ratt

# Semantic checking
#  -S2same as -Mobjfpc
#  -Scsupports operators like C (*=,+=,/= and -=)
#  -Sainclude assertion code.
#  -Sdsame as -Mdelphi
#  -Se error options.  is a combination of the following:
#  : compiler stops after  errors (default is 1)
# w   : compiler stops also after warnings
# n   : compiler stops also after notes
# h   : compiler stops also after hints
#  -Sgallow LABEL and GOTO
#  -ShUse ansistrings
#  -Sisupport C++ styled INLINE
#  -Skload fpcylix unit
#  -SI set interface style to 
# -SIcomCOM compatible interface (default)
# -SIcorba  CORBA compatible interface
#  -Smsupport macros like C (global)
#  -Sosame as -Mtp
#  -Spsame as -Mgpc
#  -Ssconstructor name must be init (destructor must be done)
#  -Sxenable exception keywords (default in Delphi/ObjFPC modes)
#
# Allow goto, inline, C-operators, C-vars
-Sgic

# ---
# Code generation
# ---

# Uncomment the next line if you always want static/dynamic units by default
# (can be overruled with -CD, -CS at the commandline)
#-CS
#-CD

# Set the default heapsize to 8Mb
#-Ch800

# Set default codegeneration checks (iocheck, overflow, range, stack)
#-Ci
#-Co
#-Cr
#-Ct

# Optimizer switches
# -Osgenerate smaller code
# -Oa=N  set alignment to N
# -O1level 1 optimizations (quick optimizations, debuggable)
# -O2level 2 optimizations (-O1 + optimizations which make debugging more difficult)
# -O3level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster)
# -Oo switch on optimalization x. See fpc -i for possible values
# -OoNO   switch off optimalization x. See fpc -i for possible values
# -Op set target cpu for optimizing, see fpc -i for possible values

#ifdef darwin
#ifdef cpui386
-Cppentiumm
-Oppentiumm
#endif
#endif

# ---
# Set Filenames and Paths
# -

Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe
On 20/08/15 16:19, Chris Moody wrote:
>>
> 
> I see that the target is:
> 
> Target OS: Linux for ARMEL
> 
> I do have /usr/lib/arm-linux-gnueabihf/crti.o
> 
> I don't need to specify -Fu/usr/lib/fpc/2.6.4/units/arm-linux
> 
> is the target os the issue?

Yes, it is. Are you certain that this is with the system-installed
compiler, and not with one of the ones that you tried to install or
compile yourself? What does "which fpc" and "which ppcarm" show?

Which version of Raspbian do you have? From what I can see in
http://archive.raspbian.org/raspbian/dists/stable/main/source/Sources.xz
, the fpc package definitely is the Debian one with the hardfloat
patches (2.6.4+dfsg-4+rpi1). Of course, they might still have compiled
it for softfp, but that would seem weird.


Jonas

PS: your linker is fine and unrelated.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 07:02 AM, Graeme Geldenhuys wrote:

On 2015-08-20 14:46, Chris Moody wrote:

Thanks for that. Do you happen to know if you can build console based
apps with it also?

Yes definitely. I just tried with the latest archive from Paul. I could
compile and link console apps and fpGUI's demo IDE (gui app).

Regards,
   - Graeme -


I think my issue could be that its compiling either for the wrong chip 
set, or something, as this also failed in the ld stage.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 07:37 AM, Martin Schreiber wrote:

On Thursday 20 August 2015 16:03:11 Chris Moody wrote:

I've done that. Still can't compile code due to ld:

Assembling dentist
Linking Dentist
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
function `_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
function `_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
Dentist.pas(106) Error: Error while linking
Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode


I saw that linker error too. A workaround was to add "xlib" to "uses". This
needs an installed xlib-devel package, I don't remember the exact name.

Martin


I'm hoping this is not the solution for me, as this is a console only 
app. I would assume by the name xlib would make it more for XWindows?


Chris

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Martin Schreiber
On Thursday 20 August 2015 16:03:11 Chris Moody wrote:
>
> I've done that. Still can't compile code due to ld:
>
> Assembling dentist
> Linking Dentist
> /usr/bin/ld: warning: link.res contains output sections; did you forget -T?
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x88): undefined reference to `_fini'
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x90): undefined reference to `_init'
> Dentist.pas(106) Error: Error while linking
> Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /usr/bin/ppcarm returned an error exitcode
>
I saw that linker error too. A workaround was to add "xlib" to "uses". This 
needs an installed xlib-devel package, I don't remember the exact name.

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Henry Vermaak
On Thu, Aug 20, 2015 at 04:19:33PM +0200, Jonas Maebe wrote:
> On 20/08/15 16:15, Henry Vermaak wrote:
> > Those symbols (_fini and _init) are defined in crti.o.  Try `locate
> > crti.o`, you'll get something like /usr/lib/{arch-triplet}/crti.o.  Add
> > this directory to your fpc options with -Fl.  E.g. fpc
> > -Fl/usr/lib/arm-linux-gnueabi
> 
> Please do not do that. The compiler looks for that file in the correct
> location.

I'm glad that's fixed then.  I've had to do this on all my (Debian
based) embedded systems, since the compiler never looked in the right
place.

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


Re: [fpc-pascal] *SPAM* Re: *SPAM* Re: Windows IOT Core

2015-08-20 Thread Michael Schnell

On 08/20/2015 02:31 PM, Sven Barth wrote:


Microsoft will probably only allow the usage of Apps (in contrast to 
normal Win32 programs) there. Thus of course it requires the RT API.




I am happy to report that you are wrong :-)

A colleague of mine already since a few days does have the Intel IOT 
Core DevKit including the "MinnowBoard Max" and he runs Delphi programs 
on same. And he is really happy with the performance of the Device.


So fpc programs compiled for Windows should run out of the box.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe
On 20/08/15 16:15, Henry Vermaak wrote:
> Those symbols (_fini and _init) are defined in crti.o.  Try `locate
> crti.o`, you'll get something like /usr/lib/{arch-triplet}/crti.o.  Add
> this directory to your fpc options with -Fl.  E.g. fpc
> -Fl/usr/lib/arm-linux-gnueabi

Please do not do that. The compiler looks for that file in the correct
location. Telling it to look for it in a different location will make it
try to link the file for a wrong ABI.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 07:11 AM, Jonas Maebe wrote:

On 20/08/15 16:03, Chris Moody wrote:

Assembling dentist
Linking Dentist
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
function `_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
function `_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
Dentist.pas(106) Error: Error while linking
Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode

Does the compiler also say "Target OS: Linux for ARMHF"?


That is the result of: fpc Dentist.pas -Fusource/lib
-Fu/usr/lib/fpc/2.6.4/units/arm-linux

If you need -Fu/usr/lib/fpc/2.6.4/units/arm-linux, that means the
configuration file (/etc/fpc.cfg) has not been generated properly. It
should have been generated when you installed fpc.

Secondly, do you have a file called /usr/lib/arm-linux-gnueabihf/crti.o
? That is the file containing the _init and _fini symbols. FPC for ARMHF
will automatically search /usr/lib/arm-linux-gnueabihf/ for that file if
libc is linked and add it to the linker script.

If you don't have that file, install the libc6-dev package (sudo apt-get
install libc6-dev). I would expect the fpc package to depend on that though.


Jonas



I see that the target is:

Target OS: Linux for ARMEL

I do have /usr/lib/arm-linux-gnueabihf/crti.o

I don't need to specify -Fu/usr/lib/fpc/2.6.4/units/arm-linux

is the target os the issue?

Chris

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


Re: [fpc-pascal] *SPAM* Re: *SPAM* Re: Windows IOT Core

2015-08-20 Thread Michael Schnell

On 08/20/2015 02:31 PM, Sven Barth wrote:


Please keep in mind that while Windows 10 works on PCs, smartphones, 
the XBox, the HoloLens and other embedded systems this does not mean 
that developers are allowed to use the Win32 API everywhere (in fact 
the only one which allows it seems to be PC).





I thought IOT Core would have been a strategy to fight Linux. But if it 
does not allow to run decent software this will not work.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Henry Vermaak
On Thu, Aug 20, 2015 at 07:03:11AM -0700, Chris Moody wrote:
> Assembling dentist
> Linking Dentist
> /usr/bin/ld: warning: link.res contains output sections; did you forget -T?
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x88): undefined reference to `_fini'
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x90): undefined reference to `_init'
> Dentist.pas(106) Error: Error while linking
> Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /usr/bin/ppcarm returned an error exitcode
> 
> That is the result of: fpc Dentist.pas -Fusource/lib
> -Fu/usr/lib/fpc/2.6.4/units/arm-linux

Those symbols (_fini and _init) are defined in crti.o.  Try `locate
crti.o`, you'll get something like /usr/lib/{arch-triplet}/crti.o.  Add
this directory to your fpc options with -Fl.  E.g. fpc
-Fl/usr/lib/arm-linux-gnueabi

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe
On 20/08/15 16:03, Chris Moody wrote:
> 
> Assembling dentist
> Linking Dentist
> /usr/bin/ld: warning: link.res contains output sections; did you forget -T?
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x88): undefined reference to `_fini'
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x90): undefined reference to `_init'
> Dentist.pas(106) Error: Error while linking
> Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /usr/bin/ppcarm returned an error exitcode

Does the compiler also say "Target OS: Linux for ARMHF"?

> That is the result of: fpc Dentist.pas -Fusource/lib
> -Fu/usr/lib/fpc/2.6.4/units/arm-linux

If you need -Fu/usr/lib/fpc/2.6.4/units/arm-linux, that means the
configuration file (/etc/fpc.cfg) has not been generated properly. It
should have been generated when you installed fpc.

Secondly, do you have a file called /usr/lib/arm-linux-gnueabihf/crti.o
? That is the file containing the _init and _fini symbols. FPC for ARMHF
will automatically search /usr/lib/arm-linux-gnueabihf/ for that file if
libc is linked and add it to the linker script.

If you don't have that file, install the libc6-dev package (sudo apt-get
install libc6-dev). I would expect the fpc package to depend on that though.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Graeme Geldenhuys
On 2015-08-20 15:03, Chris Moody wrote:
> I've done that. Still can't compile code due to ld:

If you want I can dump my 4GB SD card to a compressed img and make it
available for download on my server. It is the stock Raspbian with
EasyFPC - thus a working FPC 2.6.2 compiler.

Alternatively, I can email you the copy of ld I have on my RPi - if that
will help. I just checked, it is ld v2.2

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] Issue with Linking

2015-08-20 Thread Jonas Maebe
On 20/08/15 15:46, Chris Moody wrote:
> Thanks for that. Do you happen to know if you can build console based
> apps with it also? I have a deadline fast approaching, and at this point
> seriously considering re-writing the code in a language I know is
> supported on the Pi.

I still don't understand why you don't simply install FPC 2.6.4 using
the package manager of the Linux distribution on your Raspberry Pi. You
can't get more supported than that.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 06:56 AM, Jonas Maebe wrote:

On 20/08/15 15:46, Chris Moody wrote:

Thanks for that. Do you happen to know if you can build console based
apps with it also? I have a deadline fast approaching, and at this point
seriously considering re-writing the code in a language I know is
supported on the Pi.

I still don't understand why you don't simply install FPC 2.6.4 using
the package manager of the Linux distribution on your Raspberry Pi. You
can't get more supported than that.


Jonas
___


Hi Jonas,

I've done that. Still can't compile code due to ld:

Assembling dentist
Linking Dentist
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In 
function `_haltproc_eabi':

(.text+0x88): undefined reference to `_fini'
/home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In 
function `_haltproc_eabi':

(.text+0x90): undefined reference to `_init'
Dentist.pas(106) Error: Error while linking
Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode

That is the result of: fpc Dentist.pas -Fusource/lib 
-Fu/usr/lib/fpc/2.6.4/units/arm-linux


So I'm not sure where to go from here.

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Graeme Geldenhuys
On 2015-08-20 14:46, Chris Moody wrote:
> Thanks for that. Do you happen to know if you can build console based 
> apps with it also?

Yes definitely. I just tried with the latest archive from Paul. I could
compile and link console apps and fpGUI's demo IDE (gui app).

Regards,
  - Graeme -

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/19/2015 10:52 PM, Martin Schreiber wrote:

On Thursday 20 August 2015 00:56:46 Chris Moody wrote:

How do I verify what mine uses? I've found the directions at
http://michellcomputing.co.uk/blog/2014/05/freepascal-2-7-1-on-raspberry-pi
/ can't seem to be followed as Thaddy seems to not renewed his domain name.

This makes it unable to get the seed compiler, unless someone else knows
of another location? I was unable to find another one.


http://sourceforge.net/projects/mseide-msegui/files/fpcarm/


I downloaded the file from this URL and had it overwrite my installed 
FPC 2.64 files and I still got :


/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In 
function `_haltproc_eabi':

(.text+0x88): undefined reference to `_fini'
/home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In 
function `_haltproc_eabi':

(.text+0x90): undefined reference to `_init'
Dentist.pas(106) Error: Error while linking
Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode

I did notice the file I downloaded did not include a new version of ld, 
so not sure if I did the correct thing or not.


Chris

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Chris Moody



On 08/20/2015 04:53 AM, Graeme Geldenhuys wrote:

Hi Chris,

I thought you might try the following pre-built FPC ARM compiler created
by Paul Breneman - packaged as "EasyfpGUI". He packages everything you
need to get started into a single 5.7MB zip archive. It even includes
fpGUI and some demo programs (serial debug terminal, fpGUI's visual
forms designer, fpGUI alpha  IDE).

Visit this URL:

   http://www.turbocontrol.com/easyfpgui.htm

...then scroll down to the "ARM systems" section. The first few links
are for Linux/ARM systems. All instructions are shown there too.


Regards,
   - Graeme -


Hi Graeme,

Thanks for that. Do you happen to know if you can build console based 
apps with it also? I have a deadline fast approaching, and at this point 
seriously considering re-writing the code in a language I know is 
supported on the Pi.


I had first chosen FreePascal, because Turbo Pascal was the language I 
fell in love with first, when I was learning to program. However for the 
issues I've been having I'm really having to re-think if its been worth it.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Martin Schreiber
On Thursday 20 August 2015 14:46:15 Jonas Maebe wrote:

> > May I suggest to open a section in the Wiki where the necessary settings
> > for different known ARM hardware/software targets are listed, can be
> > approved by the experts and added to "compiler/README.txt" where it can
> > be kept in sync with the corresponding FPC version?
>
> That is virtually impossible. You can perfectly install a softfp
> toolchain and libraries on a Raspberry Pi if you want. Or a hardfloat
> distribution on a Pandaboard that originally came with a softfp Linux
> version. Even if you would only consider default installations, then I
> think there is still no one expert enough to know the details about
> every possible combination of ARM board and version of a particular
> Linux distribution.
>
I don't mean "every possible combination" but known working settings for usual 
hardware/software targets. Therefore the Wiki where platform supporter can 
publish there findings in a central place.
I accept that an up-to-date and maintained "compiler/README.txt" is a pipe 
dream.

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


Re: [fpc-pascal] IS operator and library created objects

2015-08-20 Thread Mark Morgan Lloyd

Michael Schnell wrote:

On 08/20/2015 03:42 AM, Fabio Luis Girardi wrote:


Everyone know some alternative (or more elegant)...


AFAIK FPC does not support using objects (er even strings) cross a 
dynamic library interface.


Unless you explicitly use the cmem library. However even then it's 
basically restricted to passing/returning strings as procedure 
parameters/results.


Delphi has "Runtime Packages" for this. But those are not (yet) 
implemented in fpc (which would need to do that for all OSes)


So you need to do "flat" library calls: no objects, no strings, ...


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe
On 20/08/15 14:34, Martin Schreiber wrote:
> On Thursday 20 August 2015 10:01:03 Jonas Maebe wrote:
>>
>> The problem Linux/ARM specifically is also that you have to be pretty
>> much an expert at Linux/ARM and know exactly what the capabilities of
>> your ARM hardware are before you can know what you have to build,
>> independent of instructions regarding how to build it (which doesn't
>> mean that instructions regarding how to build it are superfluous, of
>> course).
>>
> May I suggest to open a section in the Wiki where the necessary settings for 
> different known ARM hardware/software targets are listed, can be approved by 
> the experts and added to "compiler/README.txt" where it can be kept in sync 
> with the corresponding FPC version?

That is virtually impossible. You can perfectly install a softfp
toolchain and libraries on a Raspberry Pi if you want. Or a hardfloat
distribution on a Pandaboard that originally came with a softfp Linux
version. Even if you would only consider default installations, then I
think there is still no one expert enough to know the details about
every possible combination of ARM board and version of a particular
Linux distribution.

The only thing we can document is how to build the various compiler
flavours for different ARM ABIs and hardware features. Which combination
you have is something you will always have to figure out for yourself,
and is completely unrelated to FPC (FPC uses standard terminology in
this respect).


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Martin Schreiber
On Thursday 20 August 2015 10:01:03 Jonas Maebe wrote:
>
> The problem Linux/ARM specifically is also that you have to be pretty
> much an expert at Linux/ARM and know exactly what the capabilities of
> your ARM hardware are before you can know what you have to build,
> independent of instructions regarding how to build it (which doesn't
> mean that instructions regarding how to build it are superfluous, of
> course).
>
May I suggest to open a section in the Wiki where the necessary settings for 
different known ARM hardware/software targets are listed, can be approved by 
the experts and added to "compiler/README.txt" where it can be kept in sync 
with the corresponding FPC version?
I don't dare to open such a Wiki section myself because I don't know enough 
about the matter and I don't know if and where the FPC team likes to place 
such information.

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


Re: [fpc-pascal] *SPAM* Re: Windows IOT Core

2015-08-20 Thread Sven Barth
Am 20.08.2015 12:45 schrieb "Michael Schnell" :
>
> On 08/20/2015 08:02 AM, Sven Barth wrote:
>>
>>
>>
>> Not if Microsoft requires apps to use the Windows RT APIs (probably even
in form of universal apps). Because FPC has zero, null, nadda support for
this.
>>
>> And even then you'd need a suitable assembler that can assemble to
ARM-COFF (don't know whether mingw has something suitable there).
>>
> OK, This is the answer regarding ARM (e.g. running on a RASPi) that I did
expect.
>
> What about the Intel brand of WIN IOT Core ?
>
> I read that Microsoft claims that "there is only one Windows 10)" so the
RT API should be non existing or optional.

Microsoft will probably only allow the usage of Apps (in contrast to normal
Win32 programs) there. Thus of course it requires the RT API.

Please keep in mind that while Windows 10 works on PCs, smartphones, the
XBox, the HoloLens and other embedded systems this does not mean that
developers are allowed to use the Win32 API everywhere (in fact the only
one which allows it seems to be PC).

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

Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Graeme Geldenhuys
Hi Chris,

I thought you might try the following pre-built FPC ARM compiler created
by Paul Breneman - packaged as "EasyfpGUI". He packages everything you
need to get started into a single 5.7MB zip archive. It even includes
fpGUI and some demo programs (serial debug terminal, fpGUI's visual
forms designer, fpGUI alpha  IDE).

Visit this URL:

  http://www.turbocontrol.com/easyfpgui.htm

...then scroll down to the "ARM systems" section. The first few links
are for Linux/ARM systems. All instructions are shown there too.


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] IS operator and library created objects

2015-08-20 Thread Michael Schnell

On 08/20/2015 03:42 AM, Fabio Luis Girardi wrote:


Everyone know some alternative (or more elegant)...


AFAIK FPC does not support using objects (er even strings) cross a 
dynamic library interface.


Delphi has "Runtime Packages" for this. But those are not (yet) 
implemented in fpc (which would need to do that for all OSes)


So you need to do "flat" library calls: no objects, no strings, ...

-Michael

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


Re: [fpc-pascal] *SPAM* Re: Windows IOT Core

2015-08-20 Thread Michael Van Canneyt



On Thu, 20 Aug 2015, Michael Schnell wrote:


On 08/20/2015 08:02 AM, Sven Barth wrote:



Not if Microsoft requires apps to use the Windows RT APIs (probably even in 
form of universal apps). Because FPC has zero, null, nadda support for 
this.


And even then you'd need a suitable assembler that can assemble to ARM-COFF 
(don't know whether mingw has something suitable there).


OK, This is the answer regarding ARM (e.g. running on a RASPi) that I did 
expect.


What about the Intel brand of WIN IOT Core ?

I read that Microsoft claims that "there is only one Windows 10)" so the RT 
API should be non existing or optional.


Hah :)

Since when do you believe what companies tell you ?

RT is definitely optional on Windows 10 desktop, Intel. 
Given the above slogan, that would mean the same is true for Windows IOT ?


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


Re: [fpc-pascal] *SPAM* Re: Windows IOT Core

2015-08-20 Thread Michael Schnell

On 08/20/2015 08:02 AM, Sven Barth wrote:



Not if Microsoft requires apps to use the Windows RT APIs (probably 
even in form of universal apps). Because FPC has zero, null, nadda 
support for this.


And even then you'd need a suitable assembler that can assemble to 
ARM-COFF (don't know whether mingw has something suitable there).


OK, This is the answer regarding ARM (e.g. running on a RASPi) that I 
did expect.


What about the Intel brand of WIN IOT Core ?

I read that Microsoft claims that "there is only one Windows 10)" so the 
RT API should be non existing or optional.


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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe

Martin Schreiber wrote:

Where can we find a list of the possible and necessary options for building
the Free Pascal compiler? "compiler/README.txt" looks incomplete.


The most complete documentation is Marco's buildfaq:


How can we find out the possible make targets and its meanings in "compiler"
other than analyzing the make file?


There is no such documentation at this time, although in general adding 
CPU_TARGET=x OS_TARGET=y is all you need.


The problem Linux/ARM specifically is also that you have to be pretty 
much an expert at Linux/ARM and know exactly what the capabilities of 
your ARM hardware are before you can know what you have to build, 
independent of instructions regarding how to build it (which doesn't 
mean that instructions regarding how to build it are superfluous, of 
course).


The reason is that there are so many different incompatible versions of 
that platform:

* OABI big/little endian
* OABI with AFP big/little endian
* (EABI versions 0 to 5) with softfloat (always little endian)
* ((EABI versions 0 to 5) with softfp) and ((no fpu) or VFPv2 or 
(VFPv3/4 with (d16 or d32))) (always little endian)
* ((EABI version 5) with hard-float) and (VFPv2 or (VFPv3/4 with (d16 or 
d32))) (always little endian)


And there are probably already more in the mean time...

Now, OABI is basically unused nowadays and with the EABI targets there 
are some fairly safe defaults, so even if you don't know the exact VFP 
unit or what EABI version you have, the compiler and assembler/linker 
will generally use something by default that works (albeit not 
necessarily optimal). So it's not as bad as it may seem at first sight 
from the above list, but it's far from trivial.


Additionally, the ARM port of FPC was the first one that had to support 
multiple ABIs for the same platform, and as a result has not been 
implemented in the best way possible, requiring different compiler 
binaries to target different ABIs (which is why these extra OPT= 
parameters are required). Changing that also requires overhauling the 
build system though, as we would have to store units compiled for a 
different ABI in different directories. There's an svn branch for this 
(http://svn.freepascal.org/svn/fpc/branches/target-subdir/ ), but fpmake 
support for this is still missing (the Makefiles already work fine).



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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Martin Schreiber
On Thursday 20 August 2015 09:07:59 Jonas Maebe wrote:
> Chris Moody wrote:
> > Free Pascal Compiler version 3.0.0rc1 [2015/08/19] for arm
> > Copyright (c) 1993-2015 by Florian Klaempfl and others
> > Target OS: Linux for ARMEL
>
> This means that you probably did not specify OPT=-dFPC_ARMHF while
> building FPC 3.0.
>
Where can we find a list of the possible and necessary options for building 
the Free Pascal compiler? "compiler/README.txt" looks incomplete.
How can we find out the possible make targets and its meanings in "compiler" 
other than analyzing the make file?

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


Re: [fpc-pascal] Issue with Linking

2015-08-20 Thread Jonas Maebe

Chris Moody wrote:

Free Pascal Compiler version 3.0.0rc1 [2015/08/19] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for ARMEL


This means that you probably did not specify OPT=-dFPC_ARMHF while 
building FPC 3.0.



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