Bug 248980 - lang/ocaml can't be built with synth because binutils as dependency is not specified as full path
Summary: lang/ocaml can't be built with synth because binutils as dependency is not sp...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
Keywords: buildisok
Depends on:
Reported: 2020-08-28 22:10 UTC by Bojan Petrovic
Modified: 2020-09-12 00:21 UTC (History)
1 user (show)

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

Makefile patch (448 bytes, patch)
2020-08-28 22:10 UTC, Bojan Petrovic
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bojan Petrovic 2020-08-28 22:10:07 UTC
Created attachment 217602 [details]
Makefile patch

When building lang/ocaml with synth, the package fails to install:

Scanning existing packages.
 progress: 93.07%              

The task is complete.  Final tally:
Initial queue size: 1
    packages built: 1
           ignored: 0
           skipped: 0
            failed: 0

Duration: 00:04:32
The build logs can be found at: /var/log/synth
Would you like to rebuild the local repository (Y/N)? y
Stand by, recursively scanning 1 port serially.
Scanning existing packages.
ocaml-4.05.0_1.txz failed dependency check.
Packages validated, rebuilding local repository.
Local repository successfully rebuilt
Would you like to upgrade your system with the new packages now (Y/N)? y
Updating Synth repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01    
Fetching packagesite.txz: 100%  168 KiB 172.0kB/s    00:01    
Processing entries: 100%
Synth repository update completed. 705 packages processed.
All repositories are up to date.
pkg: No packages available to install matching 'ocaml-4.05.0_1' have been found in the repositories
Unfortunately, the system upgraded failed.

Build log shows an issue with as:

--  Phase: package
===>  Building package for ocaml-4.05.0_1
actual-package-depends: dependency on /usr/bin/as not registered (normal if it belongs to base)
file sizes/checksums  [2433]: .......... done
packing files         [2433]: .......... done
packing directories      [1]: . done

Replacing "as" in BUILD_DEPENDS and RUN_DEPENDS with "${LOCALBASE}/bin/as" fixes the issue for me.
Comment 1 Bojan Petrovic 2020-08-28 22:22:30 UTC

truss -f ocamlopt test.ml |& grep 'exec.*bin/as'

results in

59272: execve("/usr/bin/as",0x80072d2e0,0x80072d408) = 0 (0x0)
59273: execve("/usr/bin/as",0x80072d300,0x80072d408) = 0 (0x0)

I'm not sure whether ocamlopt uses /usr/local/bin/as from binutils.
Comment 2 Automation User 2020-09-12 00:21:14 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/189031628