Bug 193827 - ucspi-tcp doesn't build with IPV6 option off
Summary: ucspi-tcp doesn't build with IPV6 option off
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-22 06:39 UTC by kyuupichan
Modified: 2014-10-06 15:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kyuupichan 2014-09-22 06:39:02 UTC
My system:

DragonFly zotac.akihabara.co.uk 3.9-DEVELOPMENT DragonFly v3.9.0.597.g07f336-DEVELOPMENT #2: Fri Sep 19 23:52:56 JST 2014     root@zotac.akihabara.co.uk:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

I noticed tcpclient didn't work resolving hostnames; I think this is because the default port uses the IPV6 option.  I'm not sure whether this is supposed to work.  For example with the default port:

$ tcpclient dnsseed.bluematt.me 8333 sh -c 'echo $TCPREMOTEIP'
tcpclient: fatal: no IP address for dnsseed.bluematt.me

I tried deselecting the IPV6 option and rebuilding.  However changing the option means patches are not applied, in particular error.h doesn't have the errno fix.  This causes the build to fail (on my system) as so:

/usr/libexec/binutils224/elf/ld.bfd: errno: TLS definition in /usr/lib/libc.so section .tbss mismatches non-TLS reference in unix.a(buffer_get.o)
/usr/lib/libc.so: error adding symbols: Bad value
*** [addcr] Error code 1

This is easily fixed with the following change to the top of error.h:

   #include <errno.h>

instead of

   extern int errno;

With the above one-line change the package builds and installs, and works:

$ tcpclient dnsseed.bluematt.me 8333 sh -c 'echo $TCPREMOTEIP'
120.69.148.210

Please update the port so that the error.h issue is patched regardless of option selection.  Thanks.
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2014-09-22 13:12:48 UTC
over to maintainer
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-10-06 11:12:47 UTC
A commit references this bug:

Author: garga
Date: Mon Oct  6 11:12:27 UTC 2014
New revision: 370153
URL: https://svnweb.freebsd.org/changeset/ports/370153

Log:
  - Fix build with option IPV6 disabled

  PR:		193827
  Submitted by:	kyuupichan@gmail.com
  MFH:		2014Q4

Changes:
  head/sysutils/ucspi-tcp/Makefile
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-10-06 15:26:08 UTC
A commit references this bug:

Author: garga
Date: Mon Oct  6 15:25:29 UTC 2014
New revision: 370187
URL: https://svnweb.freebsd.org/changeset/ports/370187

Log:
  MFH: r370153

  - Fix build with option IPV6 disabled

  PR:		193827
  Submitted by:	kyuupichan@gmail.com
  Approved by:	ports-secteam (zi@)

Changes:
_U  branches/2014Q4/
  branches/2014Q4/sysutils/ucspi-tcp/Makefile