Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some supplements #22

Closed
mdzz9527 opened this issue Jun 8, 2018 · 14 comments
Closed

Some supplements #22

mdzz9527 opened this issue Jun 8, 2018 · 14 comments

Comments

@mdzz9527
Copy link

mdzz9527 commented Jun 8, 2018

在根据readme进行安装,出现了一些错误,查阅资料验证后特此处留下正确安装过程:

snzip.tar.gz
首先在此留下我编译好的包,可以随意放在目录下使用,依赖已经打包到一起了,
tar -zxvf snzip.tar.gz
cd /{You path}/snzip/bin/
. ./precommand.sh
然后就可以使用snzip了。

1、先下载snappy、Snzip的安装包
git clone https://github.com/kubo/snzip.git
wget https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz

2、准备环境
yum install -y gcc gcc-c++ autoconf automake libtool cmake openssl-devel
3、安装snappy
tar -zxvf snappy-1.1.3.tar.gz
cd snappy-1.1.3
./configure --prefix=/root/software/snappy
make
make install
4、安装snzip
./autogen.sh

出现如下错误:
1528371205 1

需要升级一下autoconf
查看当前autoconf版本

rpm -qf /usr/bin/autoconf

卸载当前版本autoconf,下载安装新版本

rpm -e --nodeps autoconf-2.63
wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar -zxvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/
make && make install
查看版本
/usr/bin/autoconf -V

继续安装snzip

./autogen.sh
./configure --with-snappy=/root/software/snappy --prefix=/root/software/snzip
make && make install
安装完成

此时在software目录下

经过测试,snzip只依赖于snappy下的lib目录。

我们把software拷贝到别的机器上使用时需要执行

export LD_LIBRARY_PATH=/{Your path}/snappy/lib:$LD_LIBRARY_PATH
否则会报出错误
error while loading shared libraries:libsnappy.so.1: cannot open shared object file: No such file or directory

在此我留下自己编译好的包,解压后只用先执行bin下的. ./precommand.sh 即可使用snzip,无需再安装。
snzip.tar.gz

@kubo
Copy link
Owner

kubo commented Jun 8, 2018

@Mr-Malone
Could you write it in English? I cannot read Chinese.

@mdzz9527
Copy link
Author

Follow your steps to compile snzip, and some problems arise.

@mdzz9527
Copy link
Author

Above are the steps I practiced and corrected.

@kubo
Copy link
Owner

kubo commented Oct 7, 2018

When libsnappy.so.1 is in /root/software/snappy/lib, snzip works fine because it is configured with --with-snappy=/root/software/snappy and it has a rpath attribute whose value is /root/software/snappy/lib.

$ wget https://github.com/kubo/snzip/files/2084488/snzip.tar.gz
$ tar xvfz snzip.tar.gz
$ readelf -d snzip/bin/snzip | grep RPATH
 0x000000000000000f (RPATH)              Library rpath: [/root/software/snappy/lib]

When libsnappy.so.1 is not found in /root/software/snappy/lib or standard shared library directories, snzip doesn't run. I don't think it is a problem related to snzip. It is by design.

Could you explain your request? I cannot understand 30 percents of characters in your Chinese comment. I guess that they are simplified characters used in China. Even when they have same shape, some of them have definitely different meanings. For example in Japanese is the wife of a king and I don't think that you use it with such meaning. I guess that 安装 in Chinese is install, which is, however, インストール or 導入 in Japanese.

@mdzz9527
Copy link
Author

mdzz9527 commented Oct 7, 2018

I agree with you

@mdzz9527 mdzz9527 closed this as completed Oct 7, 2018
@mdzz9527
Copy link
Author

There are some problems with your readme, because if you follow your steps to compile, there will be some problems. What I provide is the green version of snzip.I think you need the green version of snzip, and I hope you'll allow me to make some modifications to readme to perfect your project.

@mdzz9527 mdzz9527 reopened this Oct 17, 2018
@kubo
Copy link
Owner

kubo commented Oct 17, 2018

Could you summarize the problems? The procedures in README are fine for me. I'm using Ubuntu 16.04 x86_64.
One problem seems to be caused by autoconf version. It is worth to notice required autoconf version.
What are others?

@mdzz9527
Copy link
Author

I'm using Centos6 x86_64.The problem I want to solve is that compiled software can be put anywhere, that is, green software.Not everyone has access to the server.Another point is that the software compiled according to your instructions is not available, and I want it to be friendlier and easier to use.

@kubo
Copy link
Owner

kubo commented Oct 19, 2018

The problem I want to solve is that compiled software can be put anywhere, that is, green software. Not everyone has access to the server.

I have not heard green software. I googled with "green software" and cannot find such definition.
Well, I understand that some people need such software. However most linux programs are not designed to be what you say green software. So I have no will to change snzip if it isn't easy. Luckily for you, it is easy. Just linking with static version of snappy library. I'll add a new configure option --with-static-snappy which creates snzip including snappy library.

Another point is that the software compiled according to your instructions is not available, and I want it to be friendlier and easier to use.

Which do you say?

  1. It is not available even on the machine where it was compiled.
  2. It is not available as what you say green software.

If it is the former, I'll fix document. If the latter, I don't think that it is a problem.

@kubo
Copy link
Owner

kubo commented Oct 21, 2018

I'll rewrite README.md to build with snappy 1.1.7. Autoconf build configuration had been deprecated since snappy 1.1.5 and was removed in snappy 1.1.7.

@mdzz9527
Copy link
Author

That's the good news.
Green software is a special name in China.
portable application.

@kubo
Copy link
Owner

kubo commented Oct 23, 2018

809c6f2 was committed. It adds --with-static-snappy configure option.
README.md has not been rewritten yet.

@mdzz9527
Copy link
Author

Can I join the contributors?

@kubo
Copy link
Owner

kubo commented Oct 24, 2018

Can I join the contributors?

What type of contributor do you want to become?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants