Subject: | complation failure on OpenBSD 6.3 with clang |
Date: | Tue, 24 Apr 2018 18:10:12 -0700 |
To: | bug-re-engine-RE2 [...] rt.cpan.org |
From: | Nick Owens <mischief [...] offblast.org> |
hi, i've run "cpan -i -I -T re::engine::RE2" (version 0.13) on OpenBSD 6.3.
the default cc is clang. this module fails to compile with
cc -o obj/util/arena.o -DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE
-fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2
-I/usr/local/include -xc++ -DPIC -fPIC -O2 -DNO_THREADS
-Wno-sign-compare -c -I. -DNDEBUG util/arena.cc
In file included from util/arena.cc:5:
./util/util.h:45:10: fatal error: 'tr1/unordered_set' file not found
#include <tr1/unordered_set>
^~~~~~~~~~~~~~~~~~~
1 error generated.
gmake: *** [Makefile:174: obj/util/arena.o] Error 1
gmake: Leaving directory
'/home/mischief/.cpan/build/re-engine-RE2-0.13-Dj10i5/re2'
*** Error 2 in /home/mischief/.cpan/build/re-engine-RE2-0.13-Dj10i5
(Makefile:1070 're2/obj/libre2.a')
DGL/re-engine-RE2-0.13.tar.gz
/usr/bin/make -- NOT OK
the error seems to stem from lack of tr1 support in clang++ 5.0.1 which is
now the default compiler for OpenBSD 6.3/amd64.
i've fixed the problem by executing:
o conf makepl_arg 'DEFINE=-DUSE_CXX0X'
in the cpan shell. i don't think users should have todo this by hand though.
perhaps you can update the vendored re2 source?