Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-24 Thread Jonas Maebe


On 24 Oct 2014, at 14:29, Marco van de Voort wrote:

Btw, afaik running make in utils/fpcm would only work if you had  
reached

fcl-base, since you need those include dirs.


It worked because the release compiler would use its own fcl-base units.


Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-24 Thread Joost van der Sluis

On 10/24/2014 12:39 AM, Jonas Maebe wrote:

On 23/10/14 17:16, Vsevolod Alekseyev wrote:

There's no separate makefile for fpcmake alone, is there?


It used to be as simple as going into utils/fpcm and performing a make
all, but with the new FPC-based build system I think that is
unfortunately no longer possible.


With the fpcmake-buildsystem it was possible to build one package from 
fpc-trunk using a fpc-release-compiler with a simple make all. But the 
release-version of all dependencies were used.


So when fpcm-trunk uses a new feature in trunk-fcl-base, there was no 
way to compile the trunk-version of fpcm with a release-compiler.


With fppkg this all changed. Now it's always possible to compile 
(single) trunk-packages using the latest release-compiler. The command 
has been altered, though. You have to do 'fppkg build', instead of 'make 
all'. Fppkg will then compile all the packages that fpcm depend on using 
the new compiler.


This does not work if the new fpcm-package uses new compiler features 
offcourse. And the same holds for the rtl because that one is still 
compiled using the fpcmake-system.


There's one problem, still, and that's the same problem you have with 
the fpcmake-system. When the Makefile's do not support a new target, you 
have to re-generate those first using a new version of fpcmake.


The same holds with the fpmake-system. When your fpmake uses some new 
functionality that is only available in the new compiler or a new 
fpmkunit-unit, you have a problem. For this case fppkg uses two 
configurations. One to compile the fpmake.pp-files, and one to compile 
the actual packages. But that's not configured by default.


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-24 Thread Joost van der Sluis

On 10/24/2014 03:32 PM, Joost van der Sluis wrote:

On 10/24/2014 12:39 AM, Jonas Maebe wrote:

On 23/10/14 17:16, Vsevolod Alekseyev wrote:

There's no separate makefile for fpcmake alone, is there?


It used to be as simple as going into utils/fpcm and performing a make
all, but with the new FPC-based build system I think that is
unfortunately no longer possible.



The same holds with the fpmake-system. When your fpmake uses some new
functionality that is only available in the new compiler or a new
fpmkunit-unit, you have a problem. For this case fppkg uses two
configurations. One to compile the fpmake.pp-files, and one to compile
the actual packages. But that's not configured by default.


I've tried to build trunk's fpcm with fpc 2.6.2 and that failed due to 
new features being used in the fpmake.pp. ;(


So in this case already you'll need the double-fpmake-setup. Or you can 
use the attached patch.


Joost.

Index: utils/fpcm/fpmake.pp
===
--- utils/fpcm/fpmake.pp	(revision 28900)
+++ utils/fpcm/fpmake.pp	(working copy)
@@ -85,7 +85,9 @@
   BuildEngine.Log(vlWarning, 'File revision.inc not found. Svn-revision will not be included in fpcmake executable.');
   Exit;
 end;
-
+{$IFDEF VER2_6}
+  Exit;
+{$ELSE}
   // Run svn info, and catch output.
   P := sender as TPackage;
   P.Options.Add('-dREVINC');
@@ -194,6 +196,7 @@
 end
   else
 BuildEngine.Log(vlWarning,'Subversion executable (svn) not found. Svn-revision in fpcmake executable might be out of date.');
+{$ENDIF}
 end;
 end;
 {$endif HAS_UNIT_PROCESS}
@@ -221,7 +224,9 @@
 P.Directory:=ADirectory;
 {$endif ALLPACKAGES}
 P.Version:='2.7.1';
+{$IFNDEF VER2_6}
 P.SeparateArchive:=false;
+{$ENDIF}
 
 P.Dependencies.Add('fcl-base');
 
@@ -233,8 +238,10 @@
 writeln('Process-unit not available. Svn-revision in fpmake executable might be out-of-date.');
 {$endif HAS_UNIT_PROCESS}
 
+{$IFNDEF VER2_6}
 Data2IncBin := AddProgramExtension('data2inc',Defaults.BuildOS);
 p.Commands.AddCommand(caBeforeCompile, Data2IncBin, '-b -s fpcmake.ini fpcmake.inc fpcmakeini','fpcmake.inc','fpcmake.ini');
+{$ENDIF}
 T:=P.Targets.AddUnit('fpcmmain.pp');
 T.install:=false;
 T.ResourceStrings:=true;
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Thaddy de Koning
That may be true, but takes tricks. The compiler from me WILL build 
trunk, because it is a trunk. I do not have much time but as I stated 
before i WILL update it. It just takes a bit longer. Also, I won't do a 
full .deb for it, unless some helps with that. I wasn't able to do that 
yet and do not have experience with package building for Debian..
My starting compiler still will compile trunk with 
OVERRIDEVERSIONCHECK=1. This is a temporary solution until 2.8 is 
released and the debian guys will accept the latest stable 2.8 (which is 
a long way off, I understand): debian won't accept 2.71, because it is 
experimental. Raspbian follows Debeian. Debian is rightfully slow in 
accepting anything but the most stable and release versions. Debian will 
almost never accept anything else.


Point is: to obtain best results on the Raspberry Pi, you WILL need the 
latest FPC. It is really a great compiler for the platform.


The instructions I wrote still work as of 28898 (todays checkout)


Thaddy


On 10/23/2014 2:11 AM, peter green wrote:

Pierre Free Pascal wrote:

https://archive.raspbian.org/raspbian/pool/main/f/fpc/


  The 2.6.4 release is able to successfully compile
a 2.7.1 trunk compiler.

:) Thanks for confirming.


Several files are missing in this source release:


The source package which is made up of  fpc_2.6.4+dfsg-4+rpi1.dsc , 
fpc_2.6.4+dfsg-4+rpi1.debian.tar.xz and fpc_2.6.4+dfsg.orig.tar.gz 
does contain the files you mention. To extract it you use dpkg-source 
-x on the dsc file. This is the source used to build the deb files.


The binary package fpc-source exists primerally for the benefit of 
lazarus users, it appears to contain more than is needed for lazarus 
use but not enough to actually build the compiler which does seem a 
bit strange. This is not raspbian specific, the packages in debian are 
the same way.


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


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Thaddy de Koning

Jonas,

In that case I would advice people to use my version of 2.7.1 for the 
Raspberry Pi and let me deal with any build difficulties. I am fully 
aware you removed the OVERRIDEVERSIONCHECK from the documentation.


The most recently published build by me takes full advantage of most of 
the features for ARMV6 EABIHF.


Plz advice on how to progress,

Thaddy

On 10/23/2014 10:25 AM, Jonas Maebe wrote:

On 23/10/14 10:18, Thaddy de Koning wrote:

That may be true, but takes tricks.

Your OVERRIDEVERSIONCHECK=1 is also a trick (and a really bad one).


The compiler from me WILL build trunk, because it is a trunk.

Please don't make such broad statements. We already get enough bug
reports about people trying to build trunk with another trunk version
and failing. To clarify: trunk revision X is only guaranteed to be able
to build that same trunk revision X. It is also guaranteed to fail when
trying to build other trunk revisions at least some of the time.


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


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Thaddy de Koning
At the moment, there is not a good, publicly available, starting 
compiler other than my unofficial builds.

The real starting compiler has never been public AFAIK.

Maybe the guy(s) or/and girl(s) who have done the original build for the 
Raspberry Pi can shed a light on that one...


On 10/23/2014 10:55 AM, Thaddy de Koning wrote:

Jonas,

In that case I would advice people to use my version of 2.7.1 for the 
Raspberry Pi and let me deal with any build difficulties. I am fully 
aware you removed the OVERRIDEVERSIONCHECK from the documentation.


The most recently published build by me takes full advantage of most 
of the features for ARMV6 EABIHF.


Plz advice on how to progress,

Thaddy

On 10/23/2014 10:25 AM, Jonas Maebe wrote:

On 23/10/14 10:18, Thaddy de Koning wrote:

That may be true, but takes tricks.

Your OVERRIDEVERSIONCHECK=1 is also a trick (and a really bad one).


The compiler from me WILL build trunk, because it is a trunk.

Please don't make such broad statements. We already get enough bug
reports about people trying to build trunk with another trunk version
and failing. To clarify: trunk revision X is only guaranteed to be able
to build that same trunk revision X. It is also guaranteed to fail when
trying to build other trunk revisions at least some of the time.


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




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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 10:55, Thaddy de Koning wrote:

 The most recently published build by me takes full advantage of most of
 the features for ARMV6 EABIHF.
 
 Plz advice on how to progress,

By never saying that people should build trunk with trunk.


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Thaddy de Koning

Which means you shut out the platform.
Which is a teaching platform.

On 10/23/2014 11:04 AM, Jonas Maebe wrote:

On 23/10/14 10:55, Thaddy de Koning wrote:


The most recently published build by me takes full advantage of most of
the features for ARMV6 EABIHF.

Plz advice on how to progress,

By never saying that people should build trunk with trunk.


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


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 11:00, Thaddy de Koning wrote:
 At the moment, there is not a good, publicly available, starting
 compiler other than my unofficial builds.
 The real starting compiler has never been public AFAIK.

The real starting compiler is a cross-compiler. You always have to start
using a cross-compiler when building for a platform on which the
previous release is not available.


Jonas

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Thaddy de Koning
I know it is a cross- compiler. My builds include a (actually 2) 
cross-compiler(based on my own builds 2.7.1) The original is NOT a 
2.6.X build that is publicly available.  That's the point.


Where is the dogfood?

Where is the starting compiler for Raspian/Debian?

Point me at that and I have no complaints.



On 10/23/2014 11:10 AM, Jonas Maebe wrote:

On 23/10/14 11:00, Thaddy de Koning wrote:

At the moment, there is not a good, publicly available, starting
compiler other than my unofficial builds.
The real starting compiler has never been public AFAIK.

The real starting compiler is a cross-compiler. You always have to start
using a cross-compiler when building for a platform on which the
previous release is not available.


Jonas

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


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 11:09, Thaddy de Koning wrote:

 On 10/23/2014 11:04 AM, Jonas Maebe wrote:
 On 23/10/14 10:55, Thaddy de Koning wrote:

 Plz advice on how to progress,
 By never saying that people should build trunk with trunk.

 Which means you shut out the platform.

I'm not saying you can't provide any downloads, nor that Debian/Raspbian
must remove their custom patched 2.6.4 releases. I'm only saying that
you should never encourage people to build trunk with trunk for the
reasons that I have explained many times before.

 Which is a teaching platform.

So don't teach them bad practices that will get them into trouble.


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 11:16, Thaddy de Koning wrote:
 I know it is a cross- compiler. My builds include a (actually 2)
 cross-compiler(based on my own builds 2.7.1) The original is NOT a
 2.6.X build that is publicly available.  That's the point.
 
 Where is the dogfood?
 
 Where is the starting compiler for Raspian/Debian?
 
 Point me at that and I have no complaints.

The starting compiler is any official FPC 2.6.4 compiler that can be
downloaded from our website. With any of those compilers, you can build
both cross and native trunk compiler for any of the targets supported
only by trunk. That's how all targets are bootstrapped.


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Thaddy de Koning

Not for ARMV6 EABIHF

On 10/23/2014 11:23 AM, Jonas Maebe wrote:

On 23/10/14 11:16, Thaddy de Koning wrote:

I know it is a cross- compiler. My builds include a (actually 2)
cross-compiler(based on my own builds 2.7.1) The original is NOT a
2.6.X build that is publicly available.  That's the point.

Where is the dogfood?

Where is the starting compiler for Raspian/Debian?

Point me at that and I have no complaints.

The starting compiler is any official FPC 2.6.4 compiler that can be
downloaded from our website. With any of those compilers, you can build
both cross and native trunk compiler for any of the targets supported
only by trunk. That's how all targets are bootstrapped.


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


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Thaddy de Koning
Bad practise is the only practise if knowledge about good practise is 
not available.
I am fully prepared to accept you are right. In fact, in my professional 
settings I would not do otherwise.
But this is a special case, for a huge platform, and somebody, somehow, 
forgot about the license

Because the starting compiler for Raspbian is not available..

That's the point:

In war ( I am a former tank commander when it was still relevant for an 
19 year old) You improvise when resources are not available.


I agree with you. Get it?
But where's the stuff we can use to do it properly? My stuff works, is 
based on trunk, but not usable?


Ofcourse not.

This goes to the core of the project: either one sticks to the rules, or 
one deviates from it.
This is a blatant case of GPL ignorance, since the starting compiler is 
not made available.

And the compiler is GPL'd

THAT'S my point.

On 10/23/2014 11:16 AM, Jonas Maebe wrote:

On 23/10/14 11:09, Thaddy de Koning wrote:


On 10/23/2014 11:04 AM, Jonas Maebe wrote:

On 23/10/14 10:55, Thaddy de Koning wrote:


Plz advice on how to progress,

By never saying that people should build trunk with trunk.


Which means you shut out the platform.

I'm not saying you can't provide any downloads, nor that Debian/Raspbian
must remove their custom patched 2.6.4 releases. I'm only saying that
you should never encourage people to build trunk with trunk for the
reasons that I have explained many times before.


Which is a teaching platform.

So don't teach them bad practices that will get them into trouble.


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


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 11:28, Thaddy de Koning wrote:
 
 The starting compiler is any official FPC 2.6.4 compiler that can be
 downloaded from our website. With any of those compilers, you can build
 both cross and native trunk compiler for any of the targets supported
 only by trunk. That's how all targets are bootstrapped.

 Not for ARMV6 EABIHF

That's why I said you have to cross-compile. E.g.:
* download FPC 2.6.4 of Linux/i386
* install FPC 2.6.4 for Linux/i386
* install a buildroot for ARM EABI (alternatively: install
cross-binutils and copy /lib and /usr/lib from the target system to a
folder your local machine)
* download the FPC trunk sources
* in the FPC trunk directory, do something like
 make CPU_TARGET=arm OS_TARGET=linux BINUTILSPREFIX=arm-linux-gnueabi-
OPT=-dFPC_ARMHF CROSSOPT=-Cparmv6m -XR/path/to/crosssysroot/ other
options you need all

You may get errors with the above due to missing library search paths
(like mentioned earlier in the thread), but no more than when building
natively.

Again: this is equivalent to the procedure as the one you have to follow
to get an AIX compiler or a compiler for any other target only supported
by trunk.

There are no bootstrap compilers built from secret or specially patched
sources, as you seem to suggest in your other reply. Well, the
Debian/Raspbian 2.6.4 *native* EABIHF compiler is built from specially
patched sources, but those patches are available in the corresponding
Debian source package.


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread peter green

Thaddy de Koning wrote:

Not for ARMV6 EABIHF

Building for ARMV6+vfpv2 armhf is indeed a bit of a messs.

Afaict it's not possible to build a cross compiler that defaults to 
armv6 ARMHF without modifying the source. With the right flags you 
should be able to create a cross-compiler that is armhf but defaults to 
ARMv7 and then with the right flags to that you should be able to build 
a native armv6 armhf compiler using it but I have never tried this.


Since you seem to think we are keeping stuff secret I should say how 
things were actually bootstrapped for debian/raspbian.


The initial armhf port I did (of then-current trunk) was done on an 
armv7 system. using a debian armel build of 2.6.0 and manually setting 
-dFPC_ARMHF. This was easier at the time than it is now because iirc 
debian hadn't yet moved the system libraries to multiarch paths. Once my 
change was accepted into trunk I then backported the changes to 2.6.0 
and packaged them in debian.


Later debian armhf packages were simply built using the existing debian 
packages. I did have to make a small change to get 2.6.2 armhf to build 
with 2.6.0 armhf.


The raspbian packages were based on the debian packages and added a 
further patch to the source to change the default target to armv6+vfpv2. 
The intial raspbian packages were built using the debian armhf packages, 
later raspbian packages were built using previous raspbian packages.


Meanwhile over in trunk fpk (iirc) added a patch to make the compiler 
default to targetting armv6+vfpv2 if the compiler itself was built for 
armv6. A trunk compiler built to target armhf and running on any other 
CPU will default to targetting armv7+vfpv3_d16.


Someone also added code to make fpc look for libraries in multiarch 
paths on armel and armhf (despite me having been previously told that we 
should use fpc.cfg and the fpc maintainers wouldn't do this).


You can sometimes get away with using armhf libraries with an armel 
compiler if you don't care about any C library calls that involve 
floating point being broken. Certainly enough worked for the threaded 
tools used in the FPC build process to work.


IMO there should be an option to the FPC build to build without linking 
against C libraries, it's kinda crazy that we have to screw arround with 
the source to do it.

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Joost van der Sluis

On 10/23/2014 11:49 AM, Jonas Maebe wrote:

On 23/10/14 11:28, Thaddy de Koning wrote:



The starting compiler is any official FPC 2.6.4 compiler that can be
downloaded from our website. With any of those compilers, you can build
both cross and native trunk compiler for any of the targets supported
only by trunk. That's how all targets are bootstrapped.


Not for ARMV6 EABIHF


That's why I said you have to cross-compile. E.g.:
* download FPC 2.6.4 of Linux/i386


And for those who are wondering why Jonas is making such a big point out 
of this: http://bugs.freepascal.org/view.php?id=26930 (Just a bug report 
from today)


We get this kind of bugs, questions and comments all the time. All from 
people who try to build trunk-with-trunk, while they do not know what 
they are doing.


That must stop. So, please, please, *never* say you can/have to build 
fpc-trunk with fpc-trunk. (Unless it's the same revision)


Joost.

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread John Lee
ok, but can we now please return this thread to the original subject re
2.7.1 (and 2.6.4) for rpi. TIA John

On 23 October 2014 13:41, Joost van der Sluis jo...@cnoc.nl wrote:

 On 10/23/2014 11:49 AM, Jonas Maebe wrote:

 On 23/10/14 11:28, Thaddy de Koning wrote:


  The starting compiler is any official FPC 2.6.4 compiler that can be
 downloaded from our website. With any of those compilers, you can build
 both cross and native trunk compiler for any of the targets supported
 only by trunk. That's how all targets are bootstrapped.

  Not for ARMV6 EABIHF


 That's why I said you have to cross-compile. E.g.:
 * download FPC 2.6.4 of Linux/i386


 And for those who are wondering why Jonas is making such a big point out
 of this: http://bugs.freepascal.org/view.php?id=26930 (Just a bug report
 from today)

 We get this kind of bugs, questions and comments all the time. All from
 people who try to build trunk-with-trunk, while they do not know what they
 are doing.

 That must stop. So, please, please, *never* say you can/have to build
 fpc-trunk with fpc-trunk. (Unless it's the same revision)

 Joost.


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

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Vsevolod Alekseyev
With this in mind, how is one supposed to go about implementing a brand 
new target? Should I build a compiler from modified release branch, then 
use that to compile the modified trunk?


On 10/23/2014 5:04 AM, Jonas Maebe wrote:


By never saying that people should build trunk with trunk.


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



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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Marco van de Voort
In our previous episode, Thaddy de Koning said:
 Bad practise is the only practise if knowledge about good practise is 
 not available.

Should I change cursive to bold here then?

http://www.stack.nl/~marcov/buildfaq/#toc-Section-2.2
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 16:21, Vsevolod Alekseyev wrote:
 With this in mind, how is one supposed to go about implementing a brand
 new target? Should I build a compiler from modified release branch, then
 use that to compile the modified trunk?

You build a cross-compiler for your brand new target from the modified
trunk using a release for an already supported target, as explained in
http://lists.freepascal.org/pipermail/fpc-devel/2014-October/034634.html


Jonas

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Vsevolod Alekseyev

If you follow the steps in that post, you'll get the following:

makefile:197: *** The Makefile doesn't support target i386-winphonesim, 
please r

un fpcmake first.  Stop.

If you run fpcmake -Tall -w first, you'll get the same. Looks like the 
first step should be rebuilding fpcmake itself with the new target in 
mind...



On 10/23/2014 10:29 AM, Jonas Maebe wrote:

On 23/10/14 16:21, Vsevolod Alekseyev wrote:

With this in mind, how is one supposed to go about implementing a brand
new target? Should I build a compiler from modified release branch, then
use that to compile the modified trunk?

You build a cross-compiler for your brand new target from the modified
trunk using a release for an already supported target, as explained in
http://lists.freepascal.org/pipermail/fpc-devel/2014-October/034634.html


Jonas

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



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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 17:06, Vsevolod Alekseyev wrote:
 If you follow the steps in that post, you'll get the following:
 
 makefile:197: *** The Makefile doesn't support target i386-winphonesim,
 please r
 un fpcmake first.  Stop.
 
 If you run fpcmake -Tall -w first, you'll get the same. Looks like the
 first step should be rebuilding fpcmake itself with the new target in
 mind...

Yes, indeed. But that's the same regardless of whether you use a trunk
compiler or a compiler from latest release to build everything.


Jonas

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Vsevolod Alekseyev

There's no separate makefile for fpcmake alone, is there?

On 10/23/2014 11:12 AM, Jonas Maebe wrote:

On 23/10/14 17:06, Vsevolod Alekseyev wrote:

If you follow the steps in that post, you'll get the following:

makefile:197: *** The Makefile doesn't support target i386-winphonesim,
please r
un fpcmake first.  Stop.

If you run fpcmake -Tall -w first, you'll get the same. Looks like the
first step should be rebuilding fpcmake itself with the new target in
mind...

Yes, indeed. But that's the same regardless of whether you use a trunk
compiler or a compiler from latest release to build everything.


Jonas

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



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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Paul Breneman

On 10/23/2014 08:41 AM, Joost van der Sluis wrote:

On 10/23/2014 11:49 AM, Jonas Maebe wrote:

On 23/10/14 11:28, Thaddy de Koning wrote:



The starting compiler is any official FPC 2.6.4 compiler that can be
downloaded from our website. With any of those compilers, you can build
both cross and native trunk compiler for any of the targets supported
only by trunk. That's how all targets are bootstrapped.


Not for ARMV6 EABIHF


That's why I said you have to cross-compile. E.g.:
* download FPC 2.6.4 of Linux/i386


And for those who are wondering why Jonas is making such a big point out
of this: http://bugs.freepascal.org/view.php?id=26930 (Just a bug report
from today)

We get this kind of bugs, questions and comments all the time. All from
people who try to build trunk-with-trunk, while they do not know what
they are doing.

That must stop. So, please, please, *never* say you can/have to build
fpc-trunk with fpc-trunk. (Unless it's the same revision)

Joost.



This thread has been *very* educational so thanks to all who 
participated.  I've spent a bit of time during the past 7 years trying 
to figure out how to simplify things by avoiding cross-compiling.


I'll start another thread about this but I think there is a way to 
simplify cross-compiling.  Levinux is a small Qemu download for x86 PC 
(Windows, OS X, Linux) that provides a small Linux VM.  I'd like to see 
something similar but with Debian and all the files and tools needed to 
cross-compile FPC.


Please hold your comments until there is a new thread (feel free to 
start that).  Thanks!


http://mikelev.in/ux/
http://www.turbocontrol.com/devoptions.htm

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Marco van de Voort
In our previous episode, Vsevolod Alekseyev said:
 There's no separate makefile for fpcmake alone, is there?

No. There are more such cases, and while there are tricks for advanced
users, like with the starting compiler version, I suggest you stick to
the official requirement of having the full release installed.

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 17:16, Vsevolod Alekseyev wrote:
 There's no separate makefile for fpcmake alone, is there?

It used to be as simple as going into utils/fpcm and performing a make
all, but with the new FPC-based build system I think that is
unfortunately no longer possible.


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-23 Thread Jonas Maebe
On 23/10/14 17:43, Marco van de Voort wrote:
 In our previous episode, Vsevolod Alekseyev said:
 There's no separate makefile for fpcmake alone, is there?
 
 No. There are more such cases, and while there are tricks for advanced
 users, like with the starting compiler version, I suggest you stick to
 the official requirement of having the full release installed.

The question here was about implementing a new target in FPC and then
regenerating the makefiles for that new target. This requires an fpcmake
built from the trunk sources.

That's not really the same as what the original thread was about though
(which was compiling FPC trunk for a target that was not available in
the previous release, but which has already been fully implemented and
integrated in trunk).


Jonas

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-22 Thread John Lee
Thanks. So what exactly does it do? How does one access? Just for wheezy or
will it work on jessie too? John

On 22 October 2014 00:08, peter green plugw...@p10link.net wrote:

 peter green wrote:

 So it would seem FPC is currently broken on
 stable Raspbian which is a pity.


 It's fine on plain raspbian, unfortunately it seems that the raspberry pi
 foundation are shipping a newer version of binutils which conflicts with
 the fpc packaging from wheezy.

 Since the breakage is not related to plain raspbian I won't be putting a
 fix for this in the main raspbian repository but I intend to set up a
 repository for fixes to raspberry pi foundation screwups soon and i'll post
 a url for that when it's ready.

 Done

 deb http://plugwash.raspbian.org/wsf wheezy-wsf main

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

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-22 Thread peter green

 deb http://plugwash.raspbian.org/wsf wheezy-wsf main

Thanks. So what exactly does it do? How does one access?
It's an apt repository I just set up for fixes to dependency problems 
caused by the foundations webkit-related packages (they shipped an 
updated webkit and a load of related updates including things like gcc 
and binutils)

Just for wheezy or will it work on jessie too? John
Jessie already has the fix in question (and a version of binutils that 
needs the fix) in it's normal repository


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-22 Thread Pierre Free Pascal


 -Message d'origine-
 De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
 boun...@lists.freepascal.org] De la part de peter green
 Envoyé : mardi 21 octobre 2014 10:32
 À : FPC developers' list
 Objet : Re: [fpc-devel] Building 2.7.1 on current Raspbian fails
 
 Paul Michell wrote:
  I should probablly get arround to doing a raspbian version of 2.6.4.
 
 
  Yes please :)
 
 Ok, i've just uploaded 2.6.4

  Great, I just started to test this out,
on a small raspberry.
 
 https://archive.raspbian.org/raspbian/pool/main/f/fpc/

  The 2.6.4 release is able to successfully compile
a 2.7.1 trunk compiler.
 
  But I tried to recompile the sources that are part of your packages,
but this fails:
  Several files are missing in this source release:
all Makefile's (this is not a real problem as they are generated using
fpcmake utility (this works)
but also
  rtl/arm/makefile.cpu 
and all the assembler source which have a .as suffix instead of the
generated assembler
file which have just a .s suffix.

  After adding from official 2.6.4 sources:
  rtl/arm/makefile.cpu
and
  rtl/linux/arm/*.as

  compiler/msg/errore.msg (from /usr/lib/fpc/2.6.4/msg directory, not from
official source, as there is at least one armhf specific change)

using
  fpcmake -Tall -r in both rtl and compiler directories

  I was finally able to  cycle successfully.

But I still think that those files should also be included inside the
sources...

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-22 Thread peter green

Pierre Free Pascal wrote:

https://archive.raspbian.org/raspbian/pool/main/f/fpc/



  The 2.6.4 release is able to successfully compile
a 2.7.1 trunk compiler.
  

:) Thanks for confirming.


Several files are missing in this source release:


The source package which is made up of  fpc_2.6.4+dfsg-4+rpi1.dsc , 
fpc_2.6.4+dfsg-4+rpi1.debian.tar.xz and fpc_2.6.4+dfsg.orig.tar.gz does 
contain the files you mention. To extract it you use dpkg-source -x on 
the dsc file. This is the source used to build the deb files.


The binary package fpc-source exists primerally for the benefit of 
lazarus users, it appears to contain more than is needed for lazarus use 
but not enough to actually build the compiler which does seem a bit 
strange. This is not raspbian specific, the packages in debian are the 
same way.


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-21 Thread peter green

Paul Michell wrote:

I should probablly get arround to doing a raspbian version of 2.6.4.



Yes please :)


Ok, i've just uploaded 2.6.4

https://archive.raspbian.org/raspbian/pool/main/f/fpc/


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-21 Thread Paul Michell
On Tuesday 21 Oct 2014 09:31:42 peter green wrote:
 Ok, i've just uploaded 2.6.4
 
 https://archive.raspbian.org/raspbian/pool/main/f/fpc/

Thank you, how am I best to install this?

I naively thought that would update the version installed
when you perform:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fpc

When I do this on a completely clean 2014-09-09-wheezy-raspbian I get:

Reading package lists... Done
Building dependency tree   
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 fpc : Depends: fpc-2.6.0 (= 2.6.0-9+rpi1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Do I need to upgrade to Jessie, or do the packages have to be 
installed by hand?

Thanks,

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-21 Thread John Lee
Don't know why you have this problem with wheezy, but can confirm I'm
running rpi jessie, and the 'sudo' sequence above works for me ok ie does
70Mbyte download  installs fpc with no errors. Haven't really tested it,
but help says it is 2.6.2 -8 rpil+b2 2014/7/21 for arm.

john


On 21 October 2014 12:58, Paul Michell p...@michellcomputing.co.uk wrote:

 On Tuesday 21 Oct 2014 09:31:42 peter green wrote:
  Ok, i've just uploaded 2.6.4
 
  https://archive.raspbian.org/raspbian/pool/main/f/fpc/

 Thank you, how am I best to install this?

 I naively thought that would update the version installed
 when you perform:

 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get install fpc

 When I do this on a completely clean 2014-09-09-wheezy-raspbian I get:

 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Some packages could not be installed. This may mean that you have
 requested an impossible situation or if you are using the unstable
 distribution that some required packages have not yet been created
 or been moved out of Incoming.
 The following information may help to resolve the situation:

 The following packages have unmet dependencies:
  fpc : Depends: fpc-2.6.0 (= 2.6.0-9+rpi1) but it is not going to be
 installed
 E: Unable to correct problems, you have held broken packages.

 Do I need to upgrade to Jessie, or do the packages have to be
 installed by hand?

 Thanks,

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

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-21 Thread Paul Michell
On Tuesday 21 Oct 2014 13:45:25 John Lee wrote:
 Don't know why you have this problem with wheezy, but can confirm I'm
 running rpi jessie, and the 'sudo' sequence above works for me ok ie does
 70Mbyte download  installs fpc with no errors. Haven't really tested it,
 but help says it is 2.6.2 -8 rpil+b2 2014/7/21 for arm.
 
 john

I have just done a dist-upgrade and tried again and as you say, I now
have an installed 2.6.2.  So it would seem FPC is currently broken on
stable Raspbian which is a pity.

I'll see if I have any better luck compiling trunk now!

Thanks John


 On 21 October 2014 12:58, Paul Michell p...@michellcomputing.co.uk wrote:
 
  On Tuesday 21 Oct 2014 09:31:42 peter green wrote:
   Ok, i've just uploaded 2.6.4
  
   https://archive.raspbian.org/raspbian/pool/main/f/fpc/
 
  Thank you, how am I best to install this?
 
  I naively thought that would update the version installed
  when you perform:
 
  sudo apt-get update
  sudo apt-get upgrade
  sudo apt-get install fpc
 
  When I do this on a completely clean 2014-09-09-wheezy-raspbian I get:
 
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:
 
  The following packages have unmet dependencies:
   fpc : Depends: fpc-2.6.0 (= 2.6.0-9+rpi1) but it is not going to be
  installed
  E: Unable to correct problems, you have held broken packages.
 
  Do I need to upgrade to Jessie, or do the packages have to be
  installed by hand?
 
  Thanks,
 
  Paul
  ___
  fpc-devel maillist  -  fpc-devel@lists.freepascal.org
  http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
 

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-21 Thread peter green

Paul Michell wrote:

On Tuesday 21 Oct 2014 13:45:25 John Lee wrote:
  

Don't know why you have this problem with wheezy, but can confirm I'm
running rpi jessie, and the 'sudo' sequence above works for me ok ie does
70Mbyte download  installs fpc with no errors. Haven't really tested it,
but help says it is 2.6.2 -8 rpil+b2 2014/7/21 for arm.

john



I have just done a dist-upgrade and tried again and as you say, I now
have an installed 2.6.2.  
Raspbian jessie should have 2.6.4 soon (it's already in raspbian 
jessie-staging..).


Raspbian wheezy will be staying with 2.6.0

So it would seem FPC is currently broken on
stable Raspbian which is a pity.
  
It's fine on plain raspbian, unfortunately it seems that the raspberry 
pi foundation are shipping a newer version of binutils which conflicts 
with the fpc packaging from wheezy.


Since the breakage is not related to plain raspbian I won't be putting a 
fix for this in the main raspbian repository but I intend to set up a 
repository for fixes to raspberry pi foundation screwups soon and i'll 
post a url for that when it's ready.

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-21 Thread peter green

peter green wrote:

So it would seem FPC is currently broken on
stable Raspbian which is a pity.
  
It's fine on plain raspbian, unfortunately it seems that the raspberry 
pi foundation are shipping a newer version of binutils which conflicts 
with the fpc packaging from wheezy.


Since the breakage is not related to plain raspbian I won't be putting 
a fix for this in the main raspbian repository but I intend to set up 
a repository for fixes to raspberry pi foundation screwups soon and 
i'll post a url for that when it's ready.

Done

deb http://plugwash.raspbian.org/wsf wheezy-wsf main
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread Paul Michell
On Friday 17 Oct 2014 23:02:29 John Lee wrote:
 Looks as if you have a working fpc 2.7.1 snapshot for rpi. IAre you
 planning to make this available on your web site? If not, can you zip pls
 it, and put it on cloud or some ftp site - I'll then put it on fpc ftp site.

John

I was intending to publish the build process on my blog once I was confident it 
really was a properly working snapshot.  I would be happy to make a binary 
available
as well.  However, there is a lot more to getting this right than first meets 
the eye!

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread Paul Michell
On Saturday 18 Oct 2014 12:12:26 Marco van de Voort wrote:
...
 (fpdoc requiring crt*)
 
 crt* files are part of build-essentials and are basically *nix binary
 startup code.
 
 Most binaries don't need them, since they use RTL supplied versions of these
 startup files for pascal-only programs. Only when a program links to libc
 this changes.
 
 Currently fpdoc can optionally use (c)threads (recommended for lcl.chm
 building, halving the time almost), and has some characterset support
 (cwstrings), both of which require libc.
 
 If this for any reason is not convenient, try to comment cwstring, in the
 uses list of fpdoc.

Thanks Marco,

Ideally, I would like to establish a build process that doesn't require any
changes to the FPC codebase.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread Paul Michell
On Sunday 19 Oct 2014 02:32:49 peter green wrote:
 Paul Michell wrote:
  I'm currently trying to build 2.7.1 from SVN on the latest Raspbian 
  (2014-09-09).
  I've previously built this with either 2.6.0 from the repository, or with 
  Thaddy de Koning's build from March 2014.
 
  Currently, neither of these will build 2.7.1 on a Raspberry Pi.  So I have 
  also tried with the generic arm-linux
  release archive (fpc-2.6.4.arm-linux.tar).  This installed without error 
  and I can compile projects on the Pi with it.

 What errors are you getting when you try to build with the fpc from the 
 repository.

I'm sorry, I didn't record them at the time. I will need to re-run it later 
this week to find out.
 
 Have you tried the 2.6.2 version from raspbian jessie?

No, I thought 2.6.0 was the latest FPC on raspbian?

 I should probablly get arround to doing a raspbian version of 2.6.4.

Yes please :)

  However, when trying to build 2.7.1 (make all) it creates a compiler 
  binary, but fails whilst compiling fpmake.  
  This looks similar to the bug 0024056 which is flagged as resolved.  The 
  solution suggested there is to install 
  build-essential, but this is installed by default on Raspbian, so I think 
  there must be something else wrong? 
 Most likely you are trying to build an armel compiler rather than an 
 armhf one.

Yes you are right, it does produce armel by default

 It may be possible to bootstrap an armhf compiler off an armel one with 
 the right settings but it's something I haven't tried in a while.

That is what I was intending to try. 
Previously I have used Thaddy's armhf build as my seed compiler.


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread Marco van de Voort
In our previous episode, Paul Michell said:
 Ideally, I would like to establish a build process that doesn't require any
 changes to the FPC codebase.

Then you must learn to setup a complete cross-compile setup, including
target libraries and startup, and make sure the compiler only finds those.
(IOW strict separation of host and target binaries)

Some of my experiences in early crosscompiling were added to the buildfaq. 
(linked from the FPC documentation website)

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread John Lee
ok, thanks, let me know where I can get rpi wheezy or jessie binary when
you are ready  I'll publish it as an fpc ftp snapshot. I'll do same for
2.6.x too.

John

On 20 October 2014 10:59, Paul Michell p...@michellcomputing.co.uk wrote:

 On Friday 17 Oct 2014 23:02:29 John Lee wrote:
  Looks as if you have a working fpc 2.7.1 snapshot for rpi. IAre you
  planning to make this available on your web site? If not, can you zip pls
  it, and put it on cloud or some ftp site - I'll then put it on fpc ftp
 site.

 John

 I was intending to publish the build process on my blog once I was
 confident it
 really was a properly working snapshot.  I would be happy to make a binary
 available
 as well.  However, there is a lot more to getting this right than first
 meets the eye!

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

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread peter green

John Lee wrote:

I'll do same for 2.6.x too.
Note that plain 2.6.x doesn't support armhf, in debian/raspbian we have 
a patch adding support.

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-18 Thread Marco van de Voort
In our previous episode, Paul Michell said:
  make clean all NO_UNIT_PROCESS OPT=-dNO_THREADING
 
 I have now! ;)
 
 It got passed the prior problem, but now halts with a similar issue in fpdoc.
 
 Thanks Joost

(fpdoc requiring crt*)

crt* files are part of build-essentials and are basically *nix binary
startup code.

Most binaries don't need them, since they use RTL supplied versions of these
startup files for pascal-only programs. Only when a program links to libc
this changes.

Currently fpdoc can optionally use (c)threads (recommended for lcl.chm
building, halving the time almost), and has some characterset support
(cwstrings), both of which require libc.

If this for any reason is not convenient, try to comment cwstring, in the
uses list of fpdoc.

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-18 Thread peter green

Paul Michell wrote:

I'm currently trying to build 2.7.1 from SVN on the latest Raspbian 
(2014-09-09).
I've previously built this with either 2.6.0 from the repository, or with 
Thaddy de Koning's build from March 2014.

Currently, neither of these will build 2.7.1 on a Raspberry Pi.  So I have also 
tried with the generic arm-linux
release archive (fpc-2.6.4.arm-linux.tar).  This installed without error and I 
can compile projects on the Pi with it.
  
What errors are you getting when you try to build with the fpc from the 
repository.


Have you tried the 2.6.2 version from raspbian jessie?

I should probablly get arround to doing a raspbian version of 2.6.4.
However, when trying to build 2.7.1 (make all) it creates a compiler binary, but fails whilst compiling fpmake.  
This looks similar to the bug 0024056 which is flagged as resolved.  The solution suggested there is to install 
build-essential, but this is installed by default on Raspbian, so I think there must be something else wrong? 
Most likely you are trying to build an armel compiler rather than an 
armhf one.


It may be possible to bootstrap an armhf compiler off an armel one with 
the right settings but it's something I haven't tried in a while.

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


[fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
I'm currently trying to build 2.7.1 from SVN on the latest Raspbian 
(2014-09-09).
I've previously built this with either 2.6.0 from the repository, or with 
Thaddy de Koning's build from March 2014.

Currently, neither of these will build 2.7.1 on a Raspberry Pi.  So I have also 
tried with the generic arm-linux
release archive (fpc-2.6.4.arm-linux.tar).  This installed without error and I 
can compile projects on the Pi with it.

However, when trying to build 2.7.1 (make all) it creates a compiler binary, 
but fails whilst compiling fpmake.  
This looks similar to the bug 0024056 which is flagged as resolved.  The 
solution suggested there is to install 
build-essential, but this is installed by default on Raspbian, so I think there 
must be something else wrong? 

Could anyone suggest what I could try now?

Thanks,

Paul Michell



/home/pi/Projects/FreePascal/fpctmp/compiler/ppcarm fpmake.pp  
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fpmkunit/units_bs/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux  
Free Pascal Compiler version 2.7.1 [2014/10/17] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for ARMEL
Compiling fpmake.pp
fpmake.pp(16,3) Note: Local variable T is assigned but never used
Assembling fpmake
Linking fpmake
fpmake.pp(46) Warning: crti.o not found, this will probably cause a linking 
failure
fpmake.pp(46) Warning: crtbegin.o not found, this will probably cause a 
linking failure
fpmake.pp(46) Warning: crtend.o not found, this will probably cause a linking 
failure
fpmake.pp(46) Warning: crtn.o not found, this will probably cause a linking 
failure
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
fpmake.pp(46) Error: Error while linking
fpmake.pp(46) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Makefile:1645: recipe for target 'fpmake' failed
make[2]: *** [fpmake] Error 1
make[2]: Leaving directory '/home/pi/Projects/FreePascal/fpctmp/packages'
Makefile:2599: recipe for target 'packages_smart' failed
make[1]: *** [packages_smart] Error 2
make[1]: Leaving directory '/home/pi/Projects/FreePascal/fpctmp'
Makefile:2795: recipe for target 'build-stamp.arm-linux' failed
make: *** [build-stamp.arm-linux] Error 2

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Joost van der Sluis

On 10/17/2014 12:09 PM, Paul Michell wrote:

I'm currently trying to build 2.7.1 from SVN on the latest Raspbian 
(2014-09-09).
I've previously built this with either 2.6.0 from the repository, or with 
Thaddy de Koning's build from March 2014.

Currently, neither of these will build 2.7.1 on a Raspberry Pi.  So I have also 
tried with the generic arm-linux
release archive (fpc-2.6.4.arm-linux.tar).  This installed without error and I 
can compile projects on the Pi with it.

However, when trying to build 2.7.1 (make all) it creates a compiler binary, 
but fails whilst compiling fpmake.
This looks similar to the bug 0024056 which is flagged as resolved.  The 
solution suggested there is to install
build-essential, but this is installed by default on Raspbian, so I think there 
must be something else wrong?


Did you try

make clean all NO_UNIT_PROCESS OPT=-dNO_THREADING

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
On Friday 17 Oct 2014 11:35:30 Henry Vermaak wrote:
 
  fpmake.pp(46) Warning: crti.o not found, this will probably cause a 
  linking failure
  fpmake.pp(46) Warning: crtbegin.o not found, this will probably cause a 
  linking failure
  fpmake.pp(46) Warning: crtend.o not found, this will probably cause a 
  linking failure
  fpmake.pp(46) Warning: crtn.o not found, this will probably cause a 
  linking failure
 
 Where are these files on your system?  I remember after multiarch
 happened on debian I had to add some library paths to get fpc to link.
 This sounds like a similar issue.

They do not exist in my FP directory tree.  However there are copies in the 
Raspian /usr/lib
tree here:

/usr/lib/arm-linux-gnueabihf/crti.o
/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o
/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o
/usr/lib/arm-linux-gnueabihf/crtn.o 
 
Thanks,

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Thaddy de Koning
This is known. I forgot a bit about my rasp, but I will try to make a 
new build + build instructions within a week.

The warnings can be -partially - ignored though...

Tnx Paul, maybe we can coordinate this?

On 10/17/2014 1:02 PM, Paul Michell wrote:

On Friday 17 Oct 2014 11:35:30 Henry Vermaak wrote:


fpmake.pp(46) Warning: crti.o not found, this will probably cause a linking 
failure
fpmake.pp(46) Warning: crtbegin.o not found, this will probably cause a 
linking failure
fpmake.pp(46) Warning: crtend.o not found, this will probably cause a linking 
failure
fpmake.pp(46) Warning: crtn.o not found, this will probably cause a linking 
failure

Where are these files on your system?  I remember after multiarch
happened on debian I had to add some library paths to get fpc to link.
This sounds like a similar issue.

They do not exist in my FP directory tree.  However there are copies in the 
Raspian /usr/lib
tree here:

/usr/lib/arm-linux-gnueabihf/crti.o
/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o
/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o
/usr/lib/arm-linux-gnueabihf/crtn.o
  
Thanks,


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


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
On Friday 17 Oct 2014 12:40:58 Joost van der Sluis wrote:
 Did you try
 
 make clean all NO_UNIT_PROCESS OPT=-dNO_THREADING

I have now! ;)

It got passed the prior problem, but now halts with a similar issue in fpdoc.

Thanks Joost

--

Start compiling package fpdoc for target arm-linux.
Executing command /usr/bin/bin2obj -o fpdoc/plusimage.inc -c PlusImageData 
fpdoc/images/plus.png
Executing command /usr/bin/bin2obj -o fpdoc/minusimage.inc -c MinusImageData 
fpdoc/images/minus.png
   Compiling fpdoc/BuildUnit_fpdoc.pp
   Compiling fpdoc/dglobals.pp
   Compiling fpdoc/dwriter.pp
   Compiling fpdoc/fpdocxmlopts.pas
   Compiling fpdoc/fpdocproj.pas
   Compiling fpdoc/dw_xml.pp
   Compiling fpdoc/sh_pas.pp
   Compiling fpdoc/dw_html.pp
   Compiling fpdoc/fpdocclasstree.pp
   Compiling fpdoc/dw_latex.pp
   Compiling fpdoc/dwlinear.pp
   Compiling fpdoc/dw_txt.pp
   Compiling fpdoc/dw_man.pp
   Compiling fpdoc/dw_linrtf.pp
   Compiling fpdoc/dw_dxml.pp
   Compiling fpdoc/mkfpdoc.pp
   Compiling fpdoc/dw_ipflin.pas
   Compiling fpdoc/fpdoc.pp
   Linking fpdoc/bin/arm-linux/fpdoc
The installer encountered the following error:
External command /home/pi/Projects/FreePascal/fpctmp/compiler/ppcarm -Tlinux 
-FEfpdoc/bin/arm-linux -FUfpdoc/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-base/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-res/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/rtl-objpas/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-xml/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/iconvenc/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-passrc/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-process/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/chm/units/arm-linux/ -Ur -Xs 
-O2 -n -Fu/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/paszlib/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-process/units/arm-lin
 ux -Fu/home/pi/Projects/FreePascal/fpctmp/packages/hash/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/libtar/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fpmkunit/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-json/units/arm-linux 
-dNO_THREADING -darm -dRELEASE -S2h -viq fpdoc/fpdoc.pp failed with exit code 
256. Console output:
Target OS: Linux for ARMEL
Compiling fpdoc/fpdoc.pp
Assembling fpdoc
Linking fpdoc/bin/arm-linux/fpdoc
fpdoc.pp(410) Error: Error while linking
fpdoc.pp(410) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
/usr/bin/ld: warning: fpdoc/bin/arm-linux/link.res contains output sections; 
did you forget -T?
/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x90): undefined reference to `_init'

Makefile:2314: recipe for target 'all' failed
make[2]: *** [all] Error 1
make[2]: Leaving directory '/home/pi/Projects/FreePascal/fpctmp/utils'
Makefile:2550: recipe for target 'utils_all' failed
make[1]: *** [utils_all] Error 2
make[1]: Leaving directory '/home/pi/Projects/FreePascal/fpctmp'
Makefile:2795: recipe for target 'build-stamp.arm-linux' failed
make: *** [build-stamp.arm-linux] Error 2



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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
On Friday 17 Oct 2014 13:06:21 Thaddy de Koning wrote:
 This is known. I forgot a bit about my rasp, but I will try to make a 
 new build + build instructions within a week.
 The warnings can be -partially - ignored though...
 
 Tnx Paul, maybe we can coordinate this?

Yes, of course, feel free to email me off-list about this.

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Marc Weustink

Paul Michell wrote:

I'm currently trying to build 2.7.1 from SVN on the latest Raspbian 
(2014-09-09).
I've previously built this with either 2.6.0 from the repository, or with 
Thaddy de Koning's build from March 2014.

Currently, neither of these will build 2.7.1 on a Raspberry Pi.  So I have also 
tried with the generic arm-linux
release archive (fpc-2.6.4.arm-linux.tar).  This installed without error and I 
can compile projects on the Pi with it.

However, when trying to build 2.7.1 (make all) it creates a compiler binary, 
but fails whilst compiling fpmake.
This looks similar to the bug 0024056 which is flagged as resolved.  The 
solution suggested there is to install
build-essential, but this is installed by default on Raspbian, so I think there 
must be something else wrong?

Could anyone suggest what I could try now?


last month I was able to cycle a linux/arm compiler from r28726 using 
linux/x86 in the compiler dir:


make cycle OS_TARGET=linux CPU_TARGET=arm CROSSOPT=-CpARMV6 -CfVFPV2 
-OoFASTMATH FPC=~/bin/ppc386_271


(ppc386_271 is my cycled trunk compiler, build with 2.6)

I used this compiler to compile fpc (r28726) on PI using in the compiler 
dir.:

make cycle PP=~/bin/ppcarmhf OPT=-dFPC_ARMHF

(ppcarmhf is the compiler copied+renamed from the previous step)

with the resulting compiler I could compile all of r28726
(make install PREFIX=~ in compiler and rtl dir)

make all OVERRIDEVERSIONCHECK=1

Marc

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
On Friday 17 Oct 2014 12:02:23 Paul Michell wrote:
 On Friday 17 Oct 2014 11:35:30 Henry Vermaak wrote:
   ...
  Where are these files on your system?  I remember after multiarch
  happened on debian I had to add some library paths to get fpc to link.
  This sounds like a similar issue.
 
 They do not exist in my FP directory tree.  However there are copies in the 
 Raspian /usr/lib
 tree here:
 
 /usr/lib/arm-linux-gnueabihf/crti.o
 /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o
 /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o
 /usr/lib/arm-linux-gnueabihf/crtn.o 
  

Henry was correct about the paths.  I managed to complete the build with:

make all OPT=-dNO_THREADING -Fl/usr/lib/arm-linux-gnueabihf 
-Fl/usr/lib/gcc/arm-linux-gnueabihf/4.6

I'm not sure I need the -dNO_THREADING, but I left it in from Joost's 
suggestion.

The new build was then installed with:

sudo make install PREFIX=/usr
sudo make install sourceinstall PREFIX=/usr  [Not sure if I need this as well?]

Recreated the symlink with:

sudo rm -f /usr/bin/ppcarm
sudo ln -s /usr/lib/fpc/2.7.1/ppcarm /usr/bin/ppcarm

Then created the new config with:

sudo /usr/lib/fpc/2.7.1/samplecfg /usr/lib/fpc/2.7.1 /etc

This seems to do the trick, I could compile my Pi projects again, although I 
had to add the two paths
to my build commands.

What are the files crti.o, crtn.o, crtbegin.o, crtend.o used for by Free Pascal?
Is this dependency something new, or has it always been there?

Thanks for all of your suggestions,

Kind regards,

Paul Michell


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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread waldo kitty

On 10/17/2014 10:58 AM, Paul Michell wrote:

What are the files crti.o, crtn.o, crtbegin.o, crtend.o used for by Free Pascal?


from their name, many think they are CRT related but they are C RunTime 
libraries, actually...



Is this dependency something new, or has it always been there?


if you use C libraries, i suspect they are needed and have been for a while...

the above is an educated guess... i'm happy to be corrected by others more 
knowledgeable than myself :)


--
 NOTE: No off-list assistance is given without prior approval.
   Please *keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread John Lee
Paul

Looks as if you have a working fpc 2.7.1 snapshot for rpi. IAre you
planning to make this available on your web site? If not, can you zip pls
it, and put it on cloud or some ftp site - I'll then put it on fpc ftp site.

TIA John

On 17 October 2014 21:16, waldo kitty wkitt...@windstream.net wrote:

 On 10/17/2014 10:58 AM, Paul Michell wrote:

 What are the files crti.o, crtn.o, crtbegin.o, crtend.o used for by Free
 Pascal?


 from their name, many think they are CRT related but they are C RunTime
 libraries, actually...

  Is this dependency something new, or has it always been there?


 if you use C libraries, i suspect they are needed and have been for a
 while...

 the above is an educated guess... i'm happy to be corrected by others more
 knowledgeable than myself :)

 --
  NOTE: No off-list assistance is given without prior approval.
Please *keep mailing list traffic on the list* unless
private contact is specifically requested and granted.

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

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