Bug 251712 - lang/fpc: uses incorrect linker path
Summary: lang/fpc: uses incorrect linker path
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-09 17:27 UTC by Dmitry Marakasov
Modified: 2021-01-14 21:13 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (acm)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer freebsd_triage 2020-12-09 17:27:17 UTC
I've noticed a problem when compiling games/hedgewars port: it builds fine in poudriere, but fails on the host, being unable to link test fpc program trying to run /bin/ld.bfd (which does not exist). I've tracked it down to this patch:

https://svnweb.freebsd.org/ports/head/lang/fpc/files/patch-compiler_systems_t__bsd.pas?revision=556252&view=markup

It composes linker path based on LOCALBASE environment variable. This doesn't seem right as LOCALBASE is not guaranteed to be set (however it seems to be set in poudriere). It looks like LOCALBASE value at the time of fpc build should be hardcoded into the source here. Additionally, though it uses ld.bfd from binutils, fpc does not have runtime dependency on binutils. This should be fixed as well.
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-01-14 21:11:26 UTC
A commit references this bug:

Author: acm
Date: Thu Jan 14 21:11:21 UTC 2021
New revision: 561593
URL: https://svnweb.freebsd.org/changeset/ports/561593

Log:
  - lang/fpc revert way like linker is taken by fpc compiler
  - lang/fpc add binutils to RUN_DEPENDS
  - editors/lazarus add binutils to RUN_DEPENDS
  - editors/lazarus add gmake to RUN_DEPENDS
  - editors/lazarus install fpc units like RUN_DEPENDS too
  - Bump PORTREVISiON of fpc/lazarus ports

  PR:		251712
  Reported by:	amdmi3

Changes:
  head/archivers/peazip/Makefile
  head/cad/zcad/Makefile
  head/comms/cqrlog/Makefile
  head/databases/fpc-mysql/Makefile
  head/databases/fpc-sqlite/Makefile
  head/devel/fpc-fcl-db/Makefile
  head/devel/fpc-fcl-fpcunit/Makefile
  head/devel/fpc-fcl-passrc/Makefile
  head/editors/cudatext/Makefile
  head/editors/lazarus/Makefile
  head/games/hedgewars/Makefile
  head/graphics/lazpaint/Makefile
  head/lang/fpc/Makefile
  head/lang/fpc/files/patch-compiler_systems_t__bsd.pas
  head/lang/fpc-base/Makefile
  head/lang/fpc-rtl-extra/Makefile
  head/lang/fpc-rtl-generics/Makefile
  head/lang/fpc-rtl-objpas/Makefile
  head/lang/fpc-units/Makefile
  head/lang/fpc-utils/Makefile
  head/lang/nbc/Makefile
  head/multimedia/winff/Makefile
  head/net-p2p/awgg/Makefile
  head/net-p2p/transmission-remote-gui/Makefile
  head/russian/emkatic/Makefile
  head/science/checkmol/Makefile
  head/science/mol2ps/Makefile
  head/x11-fm/doublecmd/Makefile
Comment 2 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2021-01-14 21:13:39 UTC
- Hi Dimitry, I have reverted some things and added some runtime dependencies to fpc and lazarus ports. Thanks for your PR. Tell me if it works for you