[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