# Problem building devel/cargo port



## ferrum (Mar 6, 2017)

I'm in the process of learning and using FreeBSD.  All the pkgs are built using portsupgrade in the beginning and I tried out synth about a month ago.  I have build failure on devel/cargo using the command `synth build devel/cargo`.

Here's the log file from /var/log/synth/devel___cargo.log


```
=> Building devel/cargo
Started : Sunday, 5 MAR 2017 at 14:42:48 UTC
Platform: 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22 06:12:04 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


--------------------------------------------------
--  Environment
--------------------------------------------------
UNAME_r=11.0-SYNTH
UNAME_m=amd64
UNAME_p=amd64
UNAME_v=FreeBSD 11.0-SYNTH
UNAME_s=FreeBSD
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
SSL_NO_VERIFY_PEER=1
TERM=dumb
PKG_CACHEDIR=/var/cache/pkg8
PKG_DBDIR=/var/db/pkg8
PORTSDIR=/xports
LANG=C
HOME=/root
USER=root



--------------------------------------------------
--  Options
--------------------------------------------------
===> The following configuration options are available for cargo-0.15.0_2:
     BOOTSTRAP=on: Bootstrap using pre-built vendor snapshot
===> Use 'make config' to modify these settings



--------------------------------------------------
--  CONFIGURE_ENV
--------------------------------------------------
MAKE=gmake
PYTHON="/usr/local/bin/python2.7"
PKG_CONFIG=pkgconf
XDG_DATA_HOME=/construction/xports/devel/cargo/work
XDG_CONFIG_HOME=/construction/xports/devel/cargo/work
HOME=/construction/xports/devel/cargo/work
TMPDIR="/tmp"
SHELL=/bin/sh
CONFIG_SHELL=/bin/sh
PATH=/usr/local/libexec/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
CCACHE_DIR="/ccache"



--------------------------------------------------
--  CONFIGURE_ARGS
--------------------------------------------------
--prefix="/usr/local"
--mandir="/usr/local/man"
--cargo="/construction/xports/devel/cargo/work/cargo-nightly-x86_64-unknown-freebsd/cargo/bin/cargo"



--------------------------------------------------
--  MAKE_ENV
--------------------------------------------------
ARGS="--jobs 3"
OPENSSL_DIR="/usr"
LD_LIBRARY_PATH="/construction/xports/devel/cargo/work/cargo-0.15.0/target/snapshot/cargo/lib"
OPENSSLBASE=/usr
OPENSSLDIR=/etc/ssl
OPENSSLINC=/usr/include
OPENSSLLIB=/usr/lib
XDG_DATA_HOME=/construction/xports/devel/cargo/work
XDG_CONFIG_HOME=/construction/xports/devel/cargo/work
HOME=/construction/xports/devel/cargo/work
TMPDIR="/tmp"
NO_PIE=yes
MK_DEBUG_FILES=no
MK_KERNEL_SYMBOLS=no
SHELL=/bin/sh
NO_LINT=YES
PREFIX=/usr/local
LOCALBASE=/usr/local
LIBDIR="/usr/lib"
CC="cc"
CFLAGS="-O2 -pipe  -DNO_IDEA -fstack-protector -fno-strict-aliasing"
CPP="cpp"
CPPFLAGS=""
LDFLAGS="  -fstack-protector"
LIBS=""
CXX="c++"
CXXFLAGS="-O2 -pipe -DNO_IDEA -fstack-protector -fno-strict-aliasing "
MANPREFIX="/usr/local"
PATH=/usr/local/libexec/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
CCACHE_DIR="/ccache"
BSD_INSTALL_PROGRAM="install  -s -m 555"
BSD_INSTALL_LIB="install  -s -m 444"
BSD_INSTALL_SCRIPT="install  -m 555"
BSD_INSTALL_DATA="install  -m 0644"
BSD_INSTALL_MAN="install  -m 444"



--------------------------------------------------
--  MAKE_ARGS
--------------------------------------------------
VERBOSE=1
OPENSSL_CFLAGS=""
DESTDIR=/construction/xports/devel/cargo/work/stage



--------------------------------------------------
--  PLIST_SUB
--------------------------------------------------
PYTHON_INCLUDEDIR=include/python2.7
PYTHON_LIBDIR=lib/python2.7
PYTHON_PLATFORM=freebsd11
PYTHON_PYOEXTENSION=pyo
PYTHON_SITELIBDIR=lib/python2.7/site-packages
PYTHON_SUFFIX=27
PYTHON_VER=2.7
PYTHON_VERSION=python2.7
PYTHON2=""
PYTHON3="@comment "
OSREL=11.0
PREFIX=%D
LOCALBASE=/usr/local
RESETPREFIX=/usr/local
PORTDOCS=""
PORTEXAMPLES=""
LIB32DIR=lib
DOCSDIR="share/doc/cargo"
EXAMPLESDIR="share/examples/cargo"
DATADIR="share/cargo"
WWWDIR="www/cargo"
ETCDIR="etc/cargo"



--------------------------------------------------
--  SUB_LIST
--------------------------------------------------
PREFIX=/usr/local
LOCALBASE=/usr/local
DATADIR=/usr/local/share/cargo
DOCSDIR=/usr/local/share/doc/cargo
EXAMPLESDIR=/usr/local/share/examples/cargo
WWWDIR=/usr/local/www/cargo
ETCDIR=/usr/local/etc/cargo



--------------------------------------------------
--  /etc/make.conf
--------------------------------------------------
SYNTHPROFILE=LiveSystem
USE_PACKAGE_DEPENDS_ONLY=yes
PACKAGE_BUILDING=yes
BATCH=yes
PKG_CREATE_VERBOSE=yes
PORTSDIR=/xports
DISTDIR=/distfiles
WRKDIRPREFIX=/construction
PORT_DBDIR=/options
PACKAGES=/packages
MAKE_JOBS_NUMBER_LIMIT=3
WITH_CCACHE_BUILD=yes
CCACHE_DIR=/ccache
HAVE_COMPAT_IA32_KERN=YES 
CONFIGURE_MAX_CMD_LEN=262144
_SMP_CPUS=4
UID=0
ARCH=amd64
OPSYS=FreeBSD
OSVERSION=1100122
OSREL=11.0
_OSRELEASE=11.0-SYNTH



--------------------------------------------------------------------------------
--  Phase: check-sanity
--------------------------------------------------------------------------------
===>  License APACHE20  MIT accepted by the user



--------------------------------------------------------------------------------
--  Phase: pkg-depends
--------------------------------------------------------------------------------
===>   cargo-0.15.0_2 depends on file: /usr/local/sbin/pkg - not found
===>   Installing existing package /packages/All/pkg-1.10.0_2.txz
Installing pkg-1.10.0_2...
Extracting pkg-1.10.0_2: .......... done
===>   cargo-0.15.0_2 depends on file: /usr/local/sbin/pkg - found
===>   Returning to build of cargo-0.15.0_2



--------------------------------------------------------------------------------
--  Phase: fetch-depends
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
--  Phase: fetch
--------------------------------------------------------------------------------
===>  License APACHE20  MIT accepted by the user
===> Fetching all distfiles required by cargo-0.15.0_2 for building



--------------------------------------------------------------------------------
--  Phase: checksum
--------------------------------------------------------------------------------
===>  License APACHE20  MIT accepted by the user
===> Fetching all distfiles required by cargo-0.15.0_2 for building
=> SHA256 Checksum OK for cargo-registry-0.15.0_2.tar.xz.
=> SHA256 Checksum OK for 2016-11-02/cargo-nightly-x86_64-unknown-freebsd.tar.gz.
=> SHA256 Checksum OK for rust-lang-cargo-0.15.0_GH0.tar.gz.
=> SHA256 Checksum OK for rust-lang-rust-installer-755bc3d_GH0.tar.gz.



--------------------------------------------------------------------------------
--  Phase: extract-depends
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
--  Phase: extract
--------------------------------------------------------------------------------
===>  License APACHE20  MIT accepted by the user
===> Fetching all distfiles required by cargo-0.15.0_2 for building
===>  Extracting for cargo-0.15.0_2
=> SHA256 Checksum OK for cargo-registry-0.15.0_2.tar.xz.
=> SHA256 Checksum OK for 2016-11-02/cargo-nightly-x86_64-unknown-freebsd.tar.gz.
=> SHA256 Checksum OK for rust-lang-cargo-0.15.0_GH0.tar.gz.
=> SHA256 Checksum OK for rust-lang-rust-installer-755bc3d_GH0.tar.gz.
/bin/ln -sf /distfiles/2016-11-02/cargo-nightly-x86_64-unknown-freebsd.tar.gz /construction/xports/devel/cargo/work/cargo-0.15.0/target/dl/



--------------------------------------------------------------------------------
--  Phase: patch-depends
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
--  Phase: patch
--------------------------------------------------------------------------------
===>  Patching for cargo-0.15.0_2
===>  Applying FreeBSD patches for cargo-0.15.0_2



--------------------------------------------------------------------------------
--  Phase: build-depends
--------------------------------------------------------------------------------
===>   cargo-0.15.0_2 depends on executable: cmake - not found
===>   Installing existing package /packages/All/cmake-3.7.2.txz
Installing cmake-3.7.2...
`-- Installing cmake-modules-3.7.2...
`-- Extracting cmake-modules-3.7.2: .......... done
`-- Installing curl-7.53.1...
|   `-- Installing ca_root_nss-3.29.1...
|   `-- Extracting ca_root_nss-3.29.1: ........ done
`-- Extracting curl-7.53.1: .......... done
`-- Installing expat-2.2.0_1...
`-- Extracting expat-2.2.0_1: .......... done
`-- Installing jsoncpp-1.8.0_1...
`-- Extracting jsoncpp-1.8.0_1: .......... done
`-- Installing libarchive-3.2.2,1...
|   `-- Installing liblz4-1.7.5,1...
|   `-- Extracting liblz4-1.7.5,1: .......... done
|   `-- Installing lzo2-2.09...
|   `-- Extracting lzo2-2.09: .......... done
`-- Extracting libarchive-3.2.2,1: .......... done
`-- Installing libuv-1.11.0...
`-- Extracting libuv-1.11.0: .......... done
Extracting cmake-3.7.2: .......... done
Message from ca_root_nss-3.29.1:
********************************* WARNING *********************************

FreeBSD does not, and can not warrant that the certification authorities
whose certificates are included in this package have in any way been
audited for trustworthiness or RFC 3647 compliance.

Assessment and verification of trust is the complete responsibility of the
system administrator.

*********************************** NOTE **********************************

This package installs symlinks to support root certificates discovery by
default for software that uses OpenSSL.

This enables SSL Certificate Verification by client software without manual
intervention.

If you prefer to do this manually, replace the following symlinks with
either an empty file or your site-local certificate bundle.

  * /etc/ssl/cert.pem
  * /usr/local/etc/ssl/cert.pem
  * /usr/local/openssl/cert.pem

***************************************************************************
===>   cargo-0.15.0_2 depends on executable: cmake - found
===>   Returning to build of cargo-0.15.0_2
===>   cargo-0.15.0_2 depends on package: rust>=1.5.0 - not found
===>   Installing existing package /packages/All/rust-1.15.1.txz
Installing rust-1.15.1...
`-- Installing libedit-3.1.20150325_2,1...
`-- Extracting libedit-3.1.20150325_2,1: .......... done
Extracting rust-1.15.1: .......... done
Message from rust-1.15.1:
======================================================================

Printing Rust backtraces requires procfs(5) mounted on /proc .
If you have not already done so, please do the following:

    mount -t procfs proc /proc

To make it permanent, you need the following lines in /etc/fstab:

    proc    /proc        procfs        rw    0    0

======================================================================
===>   cargo-0.15.0_2 depends on package: rust>=1.5.0 - found
===>   Returning to build of cargo-0.15.0_2
===>   cargo-0.15.0_2 depends on executable: gmake - not found
===>   Installing existing package /packages/All/gmake-4.2.1_1.txz
Installing gmake-4.2.1_1...
`-- Installing indexinfo-0.2.6...
`-- Extracting indexinfo-0.2.6: .... done
`-- Installing gettext-runtime-0.19.8.1_1...
`-- Extracting gettext-runtime-0.19.8.1_1: .......... done
Extracting gmake-4.2.1_1: .......... done
===>   cargo-0.15.0_2 depends on executable: gmake - found
===>   Returning to build of cargo-0.15.0_2
===>   cargo-0.15.0_2 depends on file: /usr/local/bin/python2.7 - not found
===>   Installing existing package /packages/All/python27-2.7.13_1.txz
Installing python27-2.7.13_1...
`-- Installing libffi-3.2.1...
`-- Extracting libffi-3.2.1: .......... done
`-- Installing readline-6.3.8...
`-- Extracting readline-6.3.8: .......... done
Extracting python27-2.7.13_1: .......... done
Message from python27-2.7.13_1:
===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

===========================================================================
===>   cargo-0.15.0_2 depends on file: /usr/local/bin/python2.7 - found
===>   Returning to build of cargo-0.15.0_2
===>   cargo-0.15.0_2 depends on package: pkgconf>=0.9.10 - not found
===>   Installing existing package /packages/All/pkgconf-1.3.0.txz
Installing pkgconf-1.3.0...
Extracting pkgconf-1.3.0: .......... done
===>   cargo-0.15.0_2 depends on package: pkgconf>=0.9.10 - found
===>   Returning to build of cargo-0.15.0_2
===>   cargo-0.15.0_2 depends on file: /usr/local/bin/ccache - not found
===>   Installing existing package /packages/All/ccache-3.3.4.txz
Installing ccache-3.3.4...
Extracting ccache-3.3.4: .......... done
Create compiler links...
create symlink for cc
create symlink for cc (world)
create symlink for c++
create symlink for c++ (world)
create symlink for CC
create symlink for CC (world)
create symlink for clang
create symlink for clang (world)
create symlink for clang++
create symlink for clang++ (world)
Message from ccache-3.3.4:
NOTE:
Please read /usr/local/share/doc/ccache/ccache-howto-freebsd.txt for
information on using ccache with FreeBSD ports and src.
===>   cargo-0.15.0_2 depends on file: /usr/local/bin/ccache - found
===>   Returning to build of cargo-0.15.0_2



--------------------------------------------------------------------------------
--  Phase: lib-depends
--------------------------------------------------------------------------------
===>   cargo-0.15.0_2 depends on shared library: libssh2.so - not found
===>   Installing existing package /packages/All/libssh2-1.8.0,3.txz
Installing libssh2-1.8.0,3...
Extracting libssh2-1.8.0,3: .......... done
===>   cargo-0.15.0_2 depends on shared library: libssh2.so - found (/usr/local/lib/libssh2.so)
===>   Returning to build of cargo-0.15.0_2
===>   cargo-0.15.0_2 depends on shared library: libcurl.so - found (/usr/local/lib/libcurl.so)



--------------------------------------------------------------------------------
--  Phase: configure
--------------------------------------------------------------------------------
===>  Configuring for cargo-0.15.0_2
===>   FreeBSD 10 autotools fix applied to /construction/xports/devel/cargo/work/.cargo/registry/src/github.com-1ecc6299db9ec823/libssh2-sys-0.2.4/libssh2/config.rpath
configure: looking for configure programs
configure: found cmp
configure: found mkdir
configure: found printf
configure: found cut
configure: found head
configure: found grep
configure: found xargs
configure: found cp
configure: found find
configure: found uname
configure: found date
configure: found tr
configure: found sed
configure: found cmake
configure: found make
configure: recreating config.tmp
configure: 
configure: processing ./configure args
configure: 
configure: CFG_PREFIX           := /usr/local 
configure: CFG_LOCAL_RUST_ROOT  :=  
configure: CFG_CARGO            := /construction/xports/devel/cargo/wo ...
configure: CFG_RUSTC            := rustc 
configure: CFG_RUSTDOC          := rustdoc 
configure: CFG_CARGO            := /construction/xports/devel/cargo/wo ...
configure: CFG_RUSTC            :=  
configure: error: needed, but unable to find any of: CFG_RUSTC rustc
===>  Script "configure" failed unexpectedly.
Please report the problem to dumbbell@FreeBSD.org [maintainer] and attach the
"/construction/xports/devel/cargo/work/cargo-0.15.0/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /xports/devel/cargo



--------------------------------------------------
--  Termination
--------------------------------------------------
Finished: Sunday, 5 MAR 2017 at 14:42:57 UTC
Duration: 00:00:09
```

I have updated my ports tree several time since the error and tried multiple times but still not working.  Is anyone else having this issue?  This is preventing me from building firefox and gnome-terminal.  

Any help would be appreciated.


----------



## drhowarddrfine (Mar 6, 2017)

There was a bug in the build process  related to lang/rust and, therefore, www/firefox that was just fixed today. It will take a while for it to show up in packages but I don't know if that will be hours or days.


----------

