From owner-freebsd-ports@FreeBSD.ORG Thu Feb 27 04:05:49 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03A79F61 for ; Thu, 27 Feb 2014 04:05:49 +0000 (UTC) Received: from mail-pb0-x236.google.com (mail-pb0-x236.google.com [IPv6:2607:f8b0:400e:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D176D11D2 for ; Thu, 27 Feb 2014 04:05:48 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id uo5so1956703pbc.13 for ; Wed, 26 Feb 2014 20:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=or48ZM9ZcMki9dUWhCiuOopLx/vG+N2T2czOxiZ1BdI=; b=mR5INghd5s9jD3BunZ1wqNBTQvsUpCnuj65YCazRCiaRv4BpUcdL6T2TnATf+5UlGZ 5f7N2rkNuGVE/YB2zZSfDXoI3C/6ll7FvTvz/WqOVGH5tmZd2vyG62DC0KI5vDgk6i/i /TqBiGda5HU6Ne15z5QQKo2ucgWbCp2yY01VKRkoYDkOX7XaGtaaP/qkJmV+W5h9jig8 TuTEE8lXQ7LInIh6NUPwcsL1mOJZ2iUjoF7Pi8K5XXhYBlMtr+j/mWHpXyuHyCSbDMPR mhQIEhIIrUXXg17p9MmH4encIRPih7kk8JHwO7W1F+759SfDG0QsGP4aJtBuTTD75H05 AxtA== MIME-Version: 1.0 X-Received: by 10.68.93.161 with SMTP id cv1mr11123046pbb.122.1393473948383; Wed, 26 Feb 2014 20:05:48 -0800 (PST) Received: by 10.70.82.131 with HTTP; Wed, 26 Feb 2014 20:05:48 -0800 (PST) Date: Thu, 27 Feb 2014 11:05:48 +0700 Message-ID: Subject: google-sparsehash on FreeBSD 10, we should not resolve the problem that way. From: Tam Nguyen Duc To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 04:05:49 -0000 So I just updated to FreeBSD 10, and almost all of my works were broken because of a single port: google-sparsehash. This is really frustrating, not because it cost me a lot time to fix a relatively simple library, but because the way the problem was 'resolved' by the port maintainer. One of the most critical changes from FreeBSD 9 to 10 is the switch from GCC to Clang. For some reason, google-sparsehash refused to be compiled with Clang, but was fine with GCC. Perhap, this caused the port maintainer to make a (questionable) decision: made google-sparsehash depends on gcc48 and used gcc48 to compile the library. And yes, it compiled fine. But then I compiled my own library with google-sparsehash, it failed miserably because of 'tr1' problem (gcc48 still used std::tr1 namespace, but clang has put it to the upper std namespace). I tried compiling my lib with gcc, but it also didn't work, because my other dependancies were all compiled with clang. What's good about a library, if it is compilable but we can't use it? The problem was indeed resolved for the port maintainer, but not for me. So, my point is: to resolve an incompatible problem, you should always tweak the piece to adapt with the system, not change the whole system to accept the piece. Now, return to the problem itself. I knew that google-sparsehash does not install any .so file, just header files (it uses templates heavily). In fact, this library does not need compiling, the only thing that was compiled is the test case. So, my 'solution' is simple. Screw the test, I do not want it anyway. Fixing the test case so it can be built with Clang is the job of google-sparsehash owner, not me, and also not the port maintainer. TL, DR. Delete every line about "TESTS" in Makefile.am, automake --add-missing, autoreconf, and it's done.