Bug 225524 - devel/libftdi fails to build on 10.3 & 11.1
Summary: devel/libftdi fails to build on 10.3 & 11.1
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: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-29 06:36 UTC by Johan Ström
Modified: 2018-02-10 19:56 UTC (History)
3 users (show)

See Also:


Attachments
svn-diff-libftdi (539 bytes, patch)
2018-01-29 18:29 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Ström 2018-01-29 06:36:28 UTC
When building libftdi on FreeBSD 10.3 using poudriere, it fails with the following as of late. I suspect it has to do with the python3 changes made a while back:


===========================================================================
=>> Recording filesystem state for prebuild... done
=======================<phase: configure      >============================
===>   libftdi-0.20_10 depends on file: /usr/local/bin/cmake - found
===>   libftdi-0.20_10 depends on executable: ninja - found
===>   libftdi-0.20_10 depends on package: pkgconf>=1.3.0_1 - found
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
*** Error code 64

Stop.
make: stopped in /usr/ports/devel/libftdi
build of devel/libftdi | libftdi-0.20_10 ended at Mon Jan 29 07:21:44 CET 2018
build time: 00:00:04
!!! build failure encountered !!!
[00:00:09] Error: Build failed in phase: configure
[00:00:09] Cleaning up
[00:00:09] Unmounting file systems




Running with testport -i and then running make -d A to get some more debuggign:

===>   libftdi-0.20_10 depends on file: /usr/local/bin/cmake - found
===>   libftdi-0.20_10 depends on executable: ninja - found
===>   libftdi-0.20_10 depends on package: pkgconf>=1.3.0_1 - found
 recheck(build-depends): update time from  0:00:00 Jan 01, 1970 to now
Examining lib-depends...non-existent....PHONY node...out-of-date.
lib-depends:? = 
lib-depends:> = 
 recheck(lib-depends): update time from  0:00:00 Jan 01, 1970 to now
Examining /wrkdirs/usr/ports/devel/libftdi/work/.bin...modified  6:29:57 Jan 29, 2018...up-to-date.
Examining create-binary-alias...non-existent....PHONY node...out-of-date.
create-binary-alias:> = /wrkdirs/usr/ports/devel/libftdi/work/.bin
create-binary-alias:? = /wrkdirs/usr/ports/devel/libftdi/work/.bin
Applying[] :U to ""
Result[] of :U is "swig3.0"
Applying[] :U to ""
Result[] of :U is "swig"
install -l rs `which swig3.0` /wrkdirs/usr/ports/devel/libftdi/work/.bin/swig
Execute: 'install -l rs `which swig3.0` /wrkdirs/usr/ports/devel/libftdi/work/.bin/swig'
Applying[.MAKE.EXPORTED] :O to "LANG LC_ALL"
Result[.MAKE.EXPORTED] of :O is "LANG LC_ALL"
Applying[.MAKE.EXPORTED] :u to "LANG LC_ALL"
Result[.MAKE.EXPORTED] of :u is "LANG LC_ALL"
+ which swig3.0
+ install -l rs /wrkdirs/usr/ports/devel/libftdi/work/.bin/swig
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...

*** Failed target:  create-binary-alias
*** Failed command: install -l rs `which swig3.0` /wrkdirs/usr/ports/devel/libftdi/work/.bin/swig
*** Error code 64



The problem is most likely 

BINARY_ALIAS=   swig=swig3.0

which is enabled even if python support is NOT enabled (which I don't have).

Enabling python support & building works fine. cleaning and then unmarking python support and building then works fine too, as swig3.0 is now installed.
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-29 17:24:26 UTC
Cannot confirm the error with poudriere (10.4).
But in the port, with PYTHON=off:
===>   libftdi-0.20_10 depends on shared library: libboost_system.so - found (/usr/local/lib/libboost_system.so)
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
*** Error code 64

Stop.
make[1]: stopped in /usr/ports/devel/libftdi
*** Error code 1


Can you try to change in the Makefile:
BINARY_ALIAS=   swig=swig3.0
to
.if defined(PORT_OPTIONS:MPYTHON)
    BINARY_ALIAS=   swig=swig3.0
.endif


(before BINARY_ALIAS no space, but a tab)

with this change it works in the port, and I guess on your system with poudriere.
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-29 17:44:32 UTC
Sorry, the syntax was wrong:
Change it to
.if {PORT_OPTIONS:MPYTHON}
        BINARY_ALIAS=   swig=swig3.0
.endif
Comment 3 Johan Ström 2018-01-29 18:12:01 UTC
With the given patch the port builds fine!
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-29 18:29:41 UTC
Created attachment 190168 [details]
svn-diff-libftdi
Comment 5 Johan Ström 2018-02-10 18:50:50 UTC
Noticed build fails with same error on 11.1
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-02-10 19:39:22 UTC
A commit references this bug:

Author: tobik
Date: Sat Feb 10 19:38:23 UTC 2018
New revision: 461415
URL: https://svnweb.freebsd.org/changeset/ports/461415

Log:
  devel/libftdi: Fix build without PYTHON after r451798

  BINARY_ALIAS is set unconditionally but swig3.0 is only available with
  PYTHON=on and create-binary-alias will fail when it is missing.

  PR:		225524
  Reported by:	johan@stromnet.se

Changes:
  head/devel/libftdi/Makefile
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-02-10 19:55:39 UTC
A commit references this bug:

Author: tobik
Date: Sat Feb 10 19:55:27 UTC 2018
New revision: 461417
URL: https://svnweb.freebsd.org/changeset/ports/461417

Log:
  MFH: r461415

  devel/libftdi: Fix build without PYTHON after r451798

  BINARY_ALIAS is set unconditionally but swig3.0 is only available with
  PYTHON=on and create-binary-alias will fail when it is missing.

  PR:		225524
  Reported by:	johan@stromnet.se

  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q1/
  branches/2018Q1/devel/libftdi/Makefile
Comment 8 Tobias Kortkamp freebsd_committer freebsd_triage 2018-02-10 19:56:19 UTC
Committed, thanks!