[Rspamd-Users] Compile error in util_tests.cxx

Joe Greco lists.rspamd.com at 2ac4deaa.biz.jgreco.net
Fri Dec 22 22:49:47 UTC 2023


Greetings!

I'm working to build rspamd in a /bin/sh-less FreeBSD jailed environment.

The purpose of this is to build Internet-exposed systems in a manner 
that is less vulnerable to stack smash exploits and the like.  Instead
of beginning with a full FreeBSD environment inside the jail and then
installing more stuff, we instead begin with an empty jail and then
place only the stuff that's necessary in there.

Each jail is isolated in a UNIX top level directory, such as /rspamd
or /postfix.  Basically the idea is that you can do a set of steps
like 

tar xvf somepackage-1.2.3.tar.gz
cd somepackage-1.2.3
./configure --prefix=/rspamd
make
make install
cd ..
rm -fr somepackage-1.2.3

for each library or package that is required as part of the jail, and
you end up with a relatively clean jail that only has those things 
inside.

I've been doing this since about the time Poul-Henning Kamp introduced
jails to FreeBSD, and it works very well.  Usually.  :-)

However, I have a bit of a problem.  I don't "do" C++, and rspamd has
thrown a bit of a loop at me.  I'm getting an error I don't really
understand, and certainly don't understand how to rectify.

I'm getting:

------------------------------------------------------------------
[...generally reasonable looking build stuff...]

[ 55%] Building CXX object src/CMakeFiles/rspamd-server.dir/libutil/cxx/utf8_util.cxx.o
[ 55%] Building CXX object src/CMakeFiles/rspamd-server.dir/libutil/cxx/util_tests.cxx.o
/rspamd/src/rspamd-3.7.5/src/libutil/cxx/util_tests.cxx:63:25: error: expected body of lambda
      expression
                        auto compare_vec = []<class T>(const std::vector<T> &v1, const ...
                                             ^
/rspamd/src/rspamd-3.7.5/src/libutil/cxx/util_tests.cxx:63:26: error: expected expression
                        auto compare_vec = []<class T>(const std::vector<T> &v1, const ...
                                              ^
2 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /rspamd/src/rspamd-3.7.5/build
*** Error code 1

Stop.
make[1]: stopped in /rspamd/src/rspamd-3.7.5/build
*** Error code 1

Stop.
make: stopped in /rspamd/src/rspamd-3.7.5/build
------------------------------------------------------------------

rspamd is configured with:

cmake   -DCMAKE_INSTALL_PREFIX=/${type} \
        -DENABLE_HYPERSCAN=ON \
        -DENABLELUAJIT=ON \
        -DCMAKE_BUILD_TYPE=RelWithDebuginfo \
        -DCONFDIR=/${type}/conf \
        -DRUNDIR=/${type}/data/run \
        -DDBDIR=/${type}/data/db \
        -DLOGDIR=/${type}/logs \
        ..

------------------------------------------------------------------

The jail also has the following versions of stuff installed:

openssl=1.1.1w
jemalloc=5.3.0
boost=1_84_0
cmake=3.28.1
readline=8.2
Python=3.12.1
meson=1.3.0
glib=2.78.3
ragel=6.10
LuaJIT=2.1.1693350652
sqlite=3440200
file=5.20
icu4c=55_1
pcre2=10.42
zlib=1.3
libsodium=1.0.19
hyperscan=5.4.2
postfix=3.8.3
redis=7.2.3
rspamd=3.7.5

and rspamd is basically the last thing needed.  If anyone has any
insight into this error, I'd very much appreciate it.

Thanks and Happy Holidays,

... JG
-- 
Joe Greco - sol.net Network Services - Milwaukee, WI - http://www.sol.net
"The strain of anti-intellectualism has been a constant thread winding its way
through our political and cultural life, nurtured by the false notion that
democracy means that 'my ignorance is just as good as your knowledge.'"-Asimov


More information about the Users mailing list