Zstd: pzstd does not compile on CentOS 6 based systems

Created on 27 Sep 2016  路  7Comments  路  Source: facebook/zstd

pzstd won't build cleanly on RHEL 6 system:

$ make
g++ -I../../lib -I../../lib/common -I../../programs -I. -O3 -std=c++11   -c Pzstd.cpp -o Pzstd.o
cc1plus: error: unrecognized command line option "-std=c++11"
make: *** [Pzstd.o] Error 1
$ g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)

Most helpful comment

I spent some time backporting the code. I'm certain I can make it compile on g++4.5, and fairly certain I can get it compiling with g++4.4.

However, there are quite a few known bugs with g++4.4 - 4.7 c++0x support, and it will require quite a bit testing to make sure we aren't triggering any of them.

All 7 comments

cc @terrelln
damned, gcc 4.4 is pretty old now...

@Cyan4973 - I know! I must confess raising this issue felt like a moral dilemma (really @trixpan, really?!?!) :smiley:

pzstd uses C++11 features heavily. It should certainly build with g++4.8 and above.

It might be reasonable to get it compiling with g++4.4 with partial C++0x support, I will take a look.

I spent some time backporting the code. I'm certain I can make it compile on g++4.5, and fairly certain I can get it compiling with g++4.4.

However, there are quite a few known bugs with g++4.4 - 4.7 c++0x support, and it will require quite a bit testing to make sure we aren't triggering any of them.

one could use the newer gcc version from the devtoolset-*...
sclo/x86_64/rh/devtoolset-3/devtoolset-3-gcc-4.9.2-6.2.el6.x86_64.rpm
sclo/x86_64/rh/devtoolset-4/devtoolset-4-gcc-5.2.1-2.2.el6.x86_64.rpm
sclo/x86_64/rh/devtoolset-4/devtoolset-4-gcc-5.3.1-6.1.el6.x86_64.rpm
sclo/x86_64/rh/devtoolset-6/devtoolset-6-gcc-6.2.1-3.1.el6.x86_64.rpm

I managed to build it this way on CentOS 6:

yum install git devtoolset-4-gcc devtoolset-4-gcc-c++

git clone https://github.com/facebook/zstd.git

export PATH=$PATH:/opt/rh/devtoolset-4/root/usr/bin
cd zstd
make
cd contrib/pzstd
make

We are moving away from pzstd, towards native multi-threading support within zstd directly.

One consequence is that the code paths are different : pzstd is C++11, while zstd is C-GNU90.
As a consequence, we'll stop supporting pzstd in the next release. It will still remain available in contrib/pzstd for users which do want it, though we invite them to switch to zstd whenever possible. pzstd will eventually be deprecated and disappear from repository in the future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

planet36 picture planet36  路  3Comments

terrelln picture terrelln  路  3Comments

animalize picture animalize  路  3Comments

rgdoliveira picture rgdoliveira  路  3Comments

Hedda picture Hedda  路  4Comments