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

bazel doesn't build on CentOS 6 #172

Closed
huahang opened this issue Apr 30, 2015 · 6 comments
Closed

bazel doesn't build on CentOS 6 #172

huahang opened this issue Apr 30, 2015 · 6 comments
Assignees

Comments

@huahang
Copy link

huahang commented Apr 30, 2015

When I was trying to build bazel on CentOS 6, I got the following error:

src/main/cpp/blaze.cc: In function ‘std::string blaze::GetInstallBase(const string&, const string&)’:
src/main/cpp/blaze.cc:210:39: error: ‘archive_read_free’ was not declared in this scope
   retval = archive_read_free(blaze_zip);
                                       ^
src/main/cpp/blaze.cc: In function ‘void blaze::ActuallyExtractData(const string&, const string&)’:
src/main/cpp/blaze.cc:825:39: error: ‘archive_read_free’ was not declared in this scope
   retval = archive_read_free(blaze_zip);
                                       ^

It seems that the libarchive-devel package shipped with CentOS 6 is too old?

@ulfjack
Copy link
Contributor

ulfjack commented Apr 30, 2015

On Thu, Apr 30, 2015 at 10:31 AM, huahang notifications@github.com wrote:

When I was trying to build bazel on CentOS 6, I got the following error:

src/main/cpp/blaze.cc: In function ‘std::string blaze::GetInstallBase(const string&, const string&)’:
src/main/cpp/blaze.cc:210:39: error: ‘archive_read_free’ was not declared in this scope
retval = archive_read_free(blaze_zip);
^
src/main/cpp/blaze.cc: In function ‘void blaze::ActuallyExtractData(const string&, const string&)’:
src/main/cpp/blaze.cc:825:39: error: ‘archive_read_free’ was not declared in this scope
retval = archive_read_free(blaze_zip);
^

It seems that the libarchive-devel package shipped with CentOS 6 is too
old?

You're in a better position to answer that question... What version is it?

We've been considering ways of removing the libarchive dependency, either
by using the zip reader implementation from ijar, which we also ship, or
from the JDK. It's not ready yet, though.


Reply to this email directly or view it on GitHub
#172.

@huahang
Copy link
Author

huahang commented Apr 30, 2015

I believe it is the version 2.8.3 of libarchive that ships with CentOS 6. It is too old for bazel right now. It would be great if this dependency could be removed. :-)

@ulfjack
Copy link
Contributor

ulfjack commented Apr 30, 2015

That's ancient. The new function has been there since February 2010. You
can try replacing archive_read_free with archive_read_finish and see if
that works.

On Thu, Apr 30, 2015 at 11:55 AM, huahang notifications@github.com wrote:

I believe it is the version 2.8.3 of libarchive that ships with CentOS 6.
It is too old for bazel right now. It would be great if this dependency
could be removed. :-)


Reply to this email directly or view it on GitHub
#172 (comment).

@hanwen
Copy link
Contributor

hanwen commented May 11, 2015

See https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/bazel-discuss/HB5p5fSrI24/M69ZlY0z4k4J for instructoins for RHEL 5. Does that work for Centos 6 ?

@huahang
Copy link
Author

huahang commented May 13, 2015

@ulfjack Replacing archive_read_free() with archive_read_finish() works for CentOS 6. But it causes a warning in Ubuntu 14.04. Since archive_read_finish() is just a deprecated synonym for archive_read_free() introduced with libarchive 3.0 according to http://manpages.ubuntu.com/manpages/saucy/man3/archive_read_free.3.html, can we just use archive_read_finish() for libarchive version lower than 3.0 and archive_read_free() for 3.0 and above? I code review of this idea has been submitted in gerrit and please have a look. :-)

https://bazel-review.googlesource.com/#/c/1300

@hanwen
Copy link
Contributor

hanwen commented Jun 2, 2015

fixed by eb6e903

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

No branches or pull requests

4 participants