Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
656 views
in Technique[技术] by (71.8m points)

compilation - zlib/bz2 library and headers are requried for compiling R

Trying to compile R-3.3.2 on Debian Jessie, all dependencies are installed. However the ./configure script complains about the zlib/bzip2 library versions not matching with the minimum requirement.

Minimum version required:

  • zlib: 1.2.6 (installed version: 1.2.11)
  • bzip2: 1.0.6 (installed version: 1.0.6)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

After looking at the parts of configure script checking the library versions, it seems that it compares versions with strcmp or strncmp. Since "1.2.11" is lexicographically smaller that "1.2.6" it return a non-zero value indicating that the match failed. Besides, it just compares the first 5 characters which is also not what it is intented. So, it's a bug in configure script. Changing the script fixed the issue.

For zlib, find this line:

exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);

Change it to:

exit(ZLIB_VERNUM < 0x1250);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...