From owner-freebsd-ports@freebsd.org Wed Oct 26 23:01:59 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 252F3C23136 for ; Wed, 26 Oct 2016 23:01:59 +0000 (UTC) (envelope-from dewaynegeraghty@gmail.com) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E009CD3B for ; Wed, 26 Oct 2016 23:01:58 +0000 (UTC) (envelope-from dewaynegeraghty@gmail.com) Received: by mail-oi0-x234.google.com with SMTP id i127so17091284oia.2 for ; Wed, 26 Oct 2016 16:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=fDfdrZ/o1KrbhulB53GuIp0XI7we6YPwl7zmk2PH5yE=; b=rvrE0Iqm4DFQT/DlHhfMvKvozulpvi9UjtKmacZqjCg365CnMcVkbGHDD3yHHr0YRq IfP1wqFhPJnhmXJpuEMSCSOMrWJNDzGmf+a7y3Shcfl+HaNAFWwuDwUR3ly52AL03rdp L7/7XG43wRusCup6jdSIL1vI6hXdfABv3kEcM2VcvuqaurPhRtTxbzj95a3yn7deGaCu CgvA4H6755p4nQcIFutpNZxshlvz2nE1/l2KsTTwHbohFvBRqi1Tv3ALWGWqeMxgUToE 2OQZGaSMpAYO96vj7O40/boGjAxUDXenwCl97KQFFqlMPUDIuWNV6/4PlsAhihri+u4c KkeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fDfdrZ/o1KrbhulB53GuIp0XI7we6YPwl7zmk2PH5yE=; b=auayCxARteu3QVyjqGQPcVeMw+GLsT1ySJuKAuzaJTt+H1ltSlGH95c1iLJjPHbZZ9 aXzRdrLOgHfd+I5i/doIPhlKMukwJfHiy/+Kc8yf0EdL+fqha5dQ03GbH7Zrbmc1VOw2 hbqNpeYFfw9CQDETe3/f/tL9fxXY+9iwUUIPWpdJVLgMAUS1vPexSytI4mJByjKkAkNd +MAaufjXNOkXoPyQD48Iha1m4E9c2QurnZOXnP5qD2OoDIiqasFElINFvOhacc+dpjks AaOJEVkBeujDTtzpD7JE1EYamakVYc0y5E6UYAsTyxFSCMkkHgBQFOrF+aSdmwXaDKfJ 0Xmw== X-Gm-Message-State: ABUngvc5AmL3/gCOzzIxb1YdxSerVjex4ByXV+ARkU2F2J1zMsZIuE57yZUbv4UNBgV/tM/7ff+xUcNrZOvFAA== X-Received: by 10.107.137.84 with SMTP id l81mr4540073iod.63.1477522917832; Wed, 26 Oct 2016 16:01:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.14.17 with HTTP; Wed, 26 Oct 2016 16:01:27 -0700 (PDT) From: Dewayne Geraghty Date: Thu, 27 Oct 2016 10:01:27 +1100 Message-ID: Subject: Problem with gcc5 std library when building ports To: ports-list freebsd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Oct 2016 23:01:59 -0000 Have spent a couple of days trying to build around 800 ports with gcc5. This one has me stumped! Can anyone help regarding the apparant absence of snprintf from std? Am I missing something, perhaps LDCONFIG or? I've looked in /usr/ports/Mk/ bsd.gcc.mk and /usr/ports/Mk/bsd.port.mk but this is an area that I'm unfamiliar, so nothing really stood out. If I change the compiler from gcc5 to clang everything compiles and runs correctly. I have in /etc/make.conf USE_GCC= 5 and to use clang, I just comment out the above. So everything is constant, on FreeBSD 10.3Stable (updated and rebuilt overnight) For example: /usr/ports/devel/jsoncpp (but many share this problem) g++5 -o buildscons/linux-gcc-FreeBSD/src/lib_json/json_reader.o -c -O2 -pipe -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 -g0 -ggdb0 -DSTRIP_FBSDID -UDEBUGGING -UDEBUG -march=c3-2 -mtune=c3-2 -Wl,-rpath=/usr/local/lib/gcc5 -fno-strict-aliasing --std=c++11 -Wl,-rpath=/usr/local/lib/gcc5 -Iinclude src/lib_json/json_reader.cpp src/lib_json/json_reader.cpp: In member function 'std::__cxx11::string Json::Reader::getLocationLineAndColumn(Json::Reader::Location) const': src/lib_json/json_reader.cpp:34:18: error: 'snprintf' is not a member of 'std' #define snprintf std::snprintf And for completeness: # ldconfig -r | grep -E "gcc|\+" search directories: /lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/lib/gcc5:/usr/local/lib/heimdal:/usr/local/lib/perl5/5.20/mach/CORE 35:-lgcc_s.1 => /lib/libgcc_s.so.1 38:-lc++.1 => /usr/lib/libc++.so.1 126:-lcc1.0 => /usr/local/lib/gcc5/libcc1.so.0 127:-lgcc_s.1 => /usr/local/lib/gcc5/libgcc_s.so.1 128:-lstdc++.6 => /usr/local/lib/gcc5/libstdc++.so.6 129:-lcilkrts.5 => /usr/local/lib/gcc5/libcilkrts.so.5 130:-lssp.0 => /usr/local/lib/gcc5/libssp.so.0 131:-lquadmath.0 => /usr/local/lib/gcc5/libquadmath.so.0 132:-lgfortran.3 => /usr/local/lib/gcc5/libgfortran.so.3 133:-lobjc.4 => /usr/local/lib/gcc5/libobjc.so.4 134:-lgomp.1 => /usr/local/lib/gcc5/libgomp.so.1 135:-lgomp-plugin-host_nonshm.1 => /usr/local/lib/gcc5/libgomp-plugin-host_nonshm.so.1 136:-litm.1 => /usr/local/lib/gcc5/libitm.so.1 137:-latomic.1 => /usr/local/lib/gcc5/libatomic.so.1 Regards, Dewayne