Recent

Author Topic: [SOLVED] Building FPC AVR crosscompiler fails  (Read 2508 times)

samtux

  • Newbie
  • Posts: 2
[SOLVED] Building FPC AVR crosscompiler fails
« on: November 21, 2017, 08:45:18 pm »
Hi,
according to http://wiki.freepascal.org/AVR I'm trying to build FPC 3.0.2 from the sources in Slackware 14.2 but it fails with this message:
Code: GNU make  [Select][+][-]
  1. Free Pascal Compiler version 3.0.2 [2017/11/21] for x86_64
  2. Copyright (c) 1993-2017 by Florian Klaempfl and others
  3. Target OS: Linux for x86-64
  4. Compiling fpcmake.pp
  5. Compiling fpcmmain.pp
  6. Compiling fpcmdic.pp
  7. fpcmmain.pp(312,54) Warning: Symbol "faHidden" is not portable
  8. Writing Resource String Table file: fpcmmain.rsj
  9. Compiling fpcmwr.pp
  10. Compiling fpcmpkg.pp
  11. Linking fpcmake
  12. /usr/bin/ld: warning: link.res contains output sections; did you forget -T?
  13. 5851 lines compiled, 0.6 sec
  14. 1 warning(s) issued
  15. make[1]: Leaving directory '/usr/src/fpc-3.0.2/utils/fpcm'
  16. make rtl_clean FPC=/usr/src/fpc-3.0.2/compiler/ppcrossavr
  17. make[1]: Entering directory '/usr/src/fpc-3.0.2'
  18. make -C rtl clean
  19. make[2]: Entering directory '/usr/src/fpc-3.0.2/rtl'
  20. /usr/bin/rm -f fpcmade.avr-embedded Package.fpc ./ppas.sh script.res link.res  
  21. /usr/bin/rm -f *.s *_ppas.bat
  22. make -C embedded clean
  23. make[3]: Entering directory '/usr/src/fpc-3.0.2/rtl/embedded'
  24. /usr/bin/rm -f /usr/src/fpc-3.0.2/rtl/units/avr-embedded/system.ppu /usr/src/fpc-3.0.2/rtl/units/avr-embedded/atmega128.ppu /usr/src/fpc-3.0.2/rtl/units/avr-embedded/uuchar.ppu /usr/src/fpc-3.0.2/rtl/units/avr-embedded/objpas.ppu /usr/src/fpc-3.0.2/rtl/units/avr-embedded/heapmgr.ppu /usr/src/fpc-3.0.2/rtl/units/avr-embedded/consoleio.ppu
  25. /usr/bin/rm -f fpcmade.avr-embedded Package.fpc ./ppas.sh script.res link.res  
  26. /usr/bin/rm -f *.s *_ppas.bat
  27. make[3]: Leaving directory '/usr/src/fpc-3.0.2/rtl/embedded'
  28. make[2]: Leaving directory '/usr/src/fpc-3.0.2/rtl'
  29. make[1]: Leaving directory '/usr/src/fpc-3.0.2'
  30. make rtl_all FPC=/usr/src/fpc-3.0.2/compiler/ppcrossavr FPCFPMAKE=/usr/src/fpc-3.0.2/compiler/ppc RELEASE=1 'OPT='
  31. make[1]: Entering directory '/usr/src/fpc-3.0.2'
  32. make -C rtl all
  33. make[2]: Entering directory '/usr/src/fpc-3.0.2/rtl'
  34. make -C embedded all
  35. make[3]: Entering directory '/usr/src/fpc-3.0.2/rtl/embedded'
  36. /usr/bin/mkdir -p /usr/src/fpc-3.0.2/rtl/units/avr-embedded
  37. /usr/src/fpc-3.0.2/compiler/ppcrossavr @rtl.cfg -Ur -Tembedded -Pavr -XPavr- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../avr -FD/usr/avr/bin -FE. -FU/usr/src/fpc-3.0.2/rtl/units/avr-embedded -davr -dRELEASE -Us -Sg system.pp
  38. /usr/src/fpc-3.0.2/compiler/ppcrossavr @rtl.cfg -Ur -Tembedded -Pavr -XPavr- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../avr -FD/usr/avr/bin -FE. -FU/usr/src/fpc-3.0.2/rtl/units/avr-embedded -davr -dRELEASE avr/atmega128.pp
  39. /usr/src/fpc-3.0.2/compiler/ppcrossavr @rtl.cfg -Ur -Tembedded -Pavr -XPavr- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../avr -FD/usr/avr/bin -FE. -FU/usr/src/fpc-3.0.2/rtl/units/avr-embedded -davr -dRELEASE ../inc/uuchar.pp
  40. /usr/src/fpc-3.0.2/compiler/ppcrossavr @rtl.cfg -Ur -Tembedded -Pavr -XPavr- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../avr -FD/usr/avr/bin -FE. -FU/usr/src/fpc-3.0.2/rtl/units/avr-embedded -davr -dRELEASE -I../objpas ../objpas/objpas.pp
  41. objpas.pp(175,24) Fatal: Unknown compilerproc "fpc_ansistr_to_shortstr". Check if you use the correct run time library.
  42. Fatal: Compilation aborted
  43. Makefile:2516: recipe for target 'objpas.ppu' failed
  44. make[3]: *** [objpas.ppu] Error 1
  45. make[3]: *** Waiting for unfinished jobs....
  46. make[3]: Leaving directory '/usr/src/fpc-3.0.2/rtl/embedded'
  47. Makefile:2603: recipe for target 'embedded_all' failed
  48. make[2]: *** [embedded_all] Error 2
  49. make[2]: Leaving directory '/usr/src/fpc-3.0.2/rtl'
  50. Makefile:2521: recipe for target 'rtl_all' failed
  51. make[1]: *** [rtl_all] Error 2
  52. make[1]: Leaving directory '/usr/src/fpc-3.0.2'
  53. Makefile:2837: recipe for target 'base.build-stamp.avr-embedded' failed
  54. make: *** [base.build-stamp.avr-embedded] Error 2

(For the complete log file, see attached file)

Any ideas how to make it build?
« Last Edit: November 22, 2017, 12:12:58 pm by samtux »

ccrause

  • Hero Member
  • *****
  • Posts: 856
Re: Building FPC AVR crosscompiler fails
« Reply #1 on: November 21, 2017, 09:22:27 pm »
I also get that error when building a cross compiler using 3.0.2 source.  I would recommend using the trunk version of the compiler for AVR, quite a number of fixes have been added since 3.0.2. This would obviously need the 3.0.2 compiler to start the bootstrap build process.

samtux

  • Newbie
  • Posts: 2
Re: Building FPC AVR crosscompiler fails
« Reply #2 on: November 22, 2017, 12:12:14 pm »
@ccrause:
Thanks. You're right. Trunk version builds without errors.  :)

 

TinyPortal © 2005-2018