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

Type conversion error at archive_read_data_block #109

Closed
srib opened this issue Apr 9, 2015 · 9 comments
Closed

Type conversion error at archive_read_data_block #109

srib opened this issue Apr 9, 2015 · 9 comments

Comments

@srib
Copy link

srib commented Apr 9, 2015

I tried to compile bazel on Ubuntu Trusty 14.04, i686.

I get this compilation error:

Compiling client .cc files...
src/main/cpp/blaze.cc: In function ‘void blaze::ActuallyExtractData(const string&, const string&)’:
src/main/cpp/blaze.cc:806:71: error: cannot convert ‘off_t* {aka long int*}’ to ‘int64_t* {aka long long int*}’ for argument ‘4’ to ‘int archive_read_data_block(archive*, const void**, size_t*, int64_t*)’
       retval = archive_read_data_block(blaze_zip, &buf, &size, &offset);

I fixed it using static casting int64_t to long long int.

long long int offset1 = static_cast<int64_t> (offset);
retval = archive_read_data_block(blaze_zip, &buf, &size, &offset1);

Is there a better fix for this?

@damienmg
Copy link
Contributor

hanwen did a change to that I think we have to roll it back. We don't have 32 bit machine so it is a bit tricky to debug.

@ulfjack
Copy link
Contributor

ulfjack commented Apr 10, 2015

Hanwen's change isn't live yet (sorry!).

@damienmg
Copy link
Contributor

Indeed my bad. So hopefully it should be solved when the change come live.

@ulfjack
Copy link
Contributor

ulfjack commented Apr 10, 2015

Should be live now.

@ulfjack ulfjack closed this as completed Apr 10, 2015
@srib
Copy link
Author

srib commented Apr 10, 2015

The problem hasn't been fixed. I still get the same error message.

@damienmg damienmg reopened this Apr 10, 2015
@damienmg
Copy link
Contributor

The change isn't live yet.

@ulfjack
Copy link
Contributor

ulfjack commented Apr 10, 2015

Sorry about that.

@hanwen
Copy link
Contributor

hanwen commented Apr 13, 2015

fixed by 8d676c5

(I thought github would autoclose the issues?)

@hanwen hanwen closed this as completed Apr 13, 2015
@damienmg
Copy link
Contributor

8d676c5 refer to bug #18 not this one.

@srib srib unassigned hanwen Sep 1, 2015
tomaszstrejczek added a commit to tomaszstrejczek/bazel that referenced this issue Oct 20, 2019
* Add md5sum function

* Add md5 rule for tests

* Add --experimental_enable_runfiles for Windows ci tests

* Fixes bazelbuild#109
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

4 participants