Bug 209249 - www/squid-devel: build fails on FreeBSD 9
Summary: www/squid-devel: build fails on FreeBSD 9
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Matthew Seaman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-03 19:10 UTC by Pavel Timofeev
Modified: 2016-05-07 11:28 UTC (History)
1 user (show)

See Also:


Attachments
port patch (730 bytes, patch)
2016-05-06 13:39 UTC, Pavel Timofeev
timp87: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Timofeev 2016-05-03 19:10:09 UTC
FBSD 9 both i386 and amd64 fails with the following message:

===>  Building for squid-devel-4.0.9
Making all in compat
depbase=`echo assert.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; /bin/sh ../libtool  --tag=CXX    --mode=compile clang++ -DHAVE_CONFIG_H    -I.. -I../include  -I../lib -I../src  -I../include  -I/usr/include  -I/usr/include  -I../libltdl -I/usr/include  -Werror -Qunused-arguments -Wno-deprecated-register  -D_REENTRANT -I/usr/include  -O2 -pipe -I/usr/include -fno-strict-aliasing -std=c++11 -I/usr/local/include -MT assert.lo -MD -MP -MF $depbase.Tpo -c -o assert.lo assert.cc && mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  clang++ -DHAVE_CONFIG_H -I.. -I../include -I../lib -I../src -I../include -I/usr/include -I/usr/include -I../libltdl -I/usr/include -Werror -Qunused-arguments -Wno-deprecated-register -D_REENTRANT -I/usr/include -O2 -pipe -I/usr/include -fno-strict-aliasing -std=c++11 -I/usr/local/include -MT assert.lo -MD -MP -MF .deps/assert.Tpo -c assert.cc  -fPIC -DPIC -o .libs/assert.o
In file included from assert.cc:9:
In file included from ../include/squid.h:43:
In file included from ../compat/compat.h:59:
./compat/types.h:62:10: fatal error: 'cstdint' file not found
#include <cstdint>
         ^
1 error generated.
*** [assert.lo] Error code 1
Comment 1 Pavel Timofeev 2016-05-04 04:33:01 UTC
Turns out, we need not only C++11 compiler, but also C++11 libs.
Hope this small change will help

% diff -u Makefile.orig Makefile
--- Makefile.orig	2016-05-03 12:44:42.346609000 +0300
+++ Makefile	2016-05-03 12:44:54.046582000 +0300
@@ -28,7 +28,7 @@
 
 CONFLICTS=	squid*-3.*
 
-USES=		compiler:c++11-lang cpe perl5 shebangfix tar:xz
+USES=		compiler:c++11-lib cpe perl5 shebangfix tar:xz
 CPE_VENDOR=	squid-cache
 SHEBANG_FILES=	scripts/*.pl contrib/*.pl tools/*.pl
 GNU_CONFIGURE=	yes


Testing in poudriere
Comment 2 Pavel Timofeev 2016-05-04 07:00:26 UTC
(In reply to timp87 from comment #1)
Build on FBSD 9 fails

...
Making all in time_quota
depbase=`echo ext_time_quota_acl.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; g++48 -DHAVE_CONFIG_H  -DDEFAULT_QUOTA_DB=\"/var/ext_time_quota.db\"    -I../../../.. -I../../../../include  -I../../../../lib -I../../../.
./src  -I../../../../include  -I/usr/include  -I/usr/include  -I../../../../libltdl -I/usr/include -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Woverloaded-virtual -Werror -Wno-deprecated-register 
-pipe -D_REENTRANT -I/usr/include  -O2 -pipe -I/usr/include -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 -std=c++11 -I/usr/local/include -MT ext_time_quo
ta_acl.o -MD -MP -MF $depbase.Tpo -c -o ext_time_quota_acl.o ext_time_quota_acl.cc && mv -f $depbase.Tpo $depbase.Po
/bin/sh ../../../../libtool  --tag=CXX    --mode=link g++48 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Woverloaded-virtual -Werror -Wno-deprecated-register -pipe -D_REENTRANT  -I/usr/include  -O2
 -pipe -I/usr/include -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 -std=c++11 -I/usr/local/include  -L/usr/lib  -pthread  -L/usr/lib -fstack-protector -W
l,-rpath=/usr/local/lib/gcc48 -L/usr/local/lib/gcc48 -L/usr/local/lib -Wl,-R/usr/local/lib -o ext_time_quota_acl ext_time_quota_acl.o ../../../../compat/libcompatsquid.la    
libtool: link: g++48 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Woverloaded-virtual -Werror -Wno-deprecated-register -pipe -D_REENTRANT -I/usr/include -O2 -pipe -I/usr/include -fstack-protector -
Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 -std=c++11 -I/usr/local/include -pthread -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -Wl,-R/usr/local/lib -o ext_time_quo
ta_acl ext_time_quota_acl.o  -L/usr/lib -L/usr/local/lib/gcc48 -L/usr/local/lib ../../../../compat/.libs/libcompatsquid.a -pthread
ext_time_quota_acl.o: In function `main':
ext_time_quota_acl.cc:(.text.startup+0x4f8): undefined reference to `std::ctype<char>::_M_widen_init() const'
collect2: error: ld returned 1 exit status
*** [ext_time_quota_acl] Error code 1
1 error
*** [all-recursive] Error code 1
1 error
*** [all-recursive] Error code 1
1 error
*** [all-recursive] Error code 1
1 error
*** [all] Error code 2
1 error
Comment 3 Pavel Timofeev 2016-05-06 13:39:40 UTC
Created attachment 170045 [details]
port patch

* ask for c++11 libs, not only compier;
* mark broken under FreeBSD9 until we find a solution.
Comment 4 Matthew Seaman freebsd_committer freebsd_triage 2016-05-06 15:11:39 UTC
I still need to do the delete-copy-patch thing to make this port acquire the history from www/squid.  Can't do that in one commit as the FreeBSD SVN repo refuses since replacing a file "can lose history" (how ironic).  So I'm going to have to do that in several commits...
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-05-07 11:27:51 UTC
A commit references this bug:

Author: matthew
Date: Sat May  7 11:27:07 UTC 2016
New revision: 414772
URL: https://svnweb.freebsd.org/changeset/ports/414772

Log:
  Switch to USES=compiler:c++11-lib rather than c++11-lang in an attempt
  to improve compilability on older OS versions.

  Even so, mark as broken on 9.x for now, until remaining compilation
  problems can be solved.

  PR:		209249
  Submitted by:	timp87@gmail.com (maintainer)

Changes:
  head/www/squid-devel/Makefile
Comment 6 Matthew Seaman freebsd_committer freebsd_triage 2016-05-07 11:28:57 UTC
Committed, thanks!