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

Unable to compile bazel under Mac 10.9.5 #9

Closed
wentao opened this issue Mar 17, 2015 · 7 comments
Closed

Unable to compile bazel under Mac 10.9.5 #9

wentao opened this issue Mar 17, 2015 · 7 comments

Comments

@wentao
Copy link

wentao commented Mar 17, 2015

Did using port to install libarchive, but the compile.sh script failed at link step, complaining about the missing symbols of archive related methods for x86_64 arch.

Creating JavaBuilder_deploy.jar...
Compiling client .cc files...
Linking client...
Undefined symbols for architecture x86_64:
"_archive_entry_pathname", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_entry_perm", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_errno", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_error_string", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_read_data", referenced from:
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_read_data_block", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_read_free", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_read_new", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_read_next_header", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_read_open_filename", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
"_archive_read_support_format_zip", referenced from:
blaze::ActuallyExtractData(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
blaze::GetInstallBase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in blaze.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@wentao
Copy link
Author

wentao commented Mar 17, 2015

Did another try with:

  • download libarchive from github
  • compile it by myself

Then link against the customized libarchive with the following command

export CFLAGS=-I../libarchive/libarchive; export LDFLAGS=-L../libarchive ; ./compile.sh

Still failed...

@ulfjack
Copy link
Contributor

ulfjack commented Mar 17, 2015

Uhm, works for me. I'm at a loss what could cause this. It seems like the most likely explanation is that the symbols aren't there. I'm using homebrew on this machine, so the output may look different:

$ ls fromhost/
BUILD archive.h archive_entry.h empty.c libarchive.a

$ ls -l fromhost/libarchive.a
-r--r--r-- 1 ulfjack 5000 965808 Mar 17 21:40 fromhost/libarchive.a

$ nm fromhost/libarchive.a | grep "_archive_read_close"
0000000000000ca1 T ___archive_read_close_filters
0000000000002b88 S ___archive_read_close_filters.eh
0000000000001d54 t __archive_read_close
0000000000002f40 s __archive_read_close.eh
U _archive_read_close
U ___archive_read_close_filters
0000000000000deb t __archive_read_close
0000000000003298 s __archive_read_close.eh
0000000000000044 T _archive_read_close
00000000000004a8 S _archive_read_close.eh

@kchodorow
Copy link
Contributor

I've reproduced, looking into it...

@kchodorow
Copy link
Contributor

This is a byproduct of any extremely hacky thing we're doing in compile.sh. If you delete the file fromhost/BUILD and re-run compile.sh, it should work.

I'll work on fixing the compile script.

@wentao
Copy link
Author

wentao commented Mar 17, 2015

Yes, it works now! Thanks!

@wentao wentao closed this as completed Mar 17, 2015
@kchodorow
Copy link
Contributor

For future reference, this should now be fixed in the compile script, too (fixed by bdc2496).

@wentao
Copy link
Author

wentao commented Mar 18, 2015

Cool, thanks!

On Wed, Mar 18, 2015 at 12:27 PM Kristina [email protected] wrote:

For future reference, this should now be fixed in the compile script, too
(fixed by bdc2496
bdc2496
).


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

nkoroste pushed a commit to nkoroste/bazel that referenced this issue Aug 18, 2020
Tags are not propagated from targets to actions for Android rules. bazelbuild#8830

This PR adds basic propagation of tags from the android_binary target it's actions.

Testing with aquery with the Android repo:

./bazelw aquery 'mnemonic(RClassGenerator, //apps/mushroom:mushroom-gms)'
./bazelw aquery 'mnemonic(JavaDeployJar, //apps/mushroom:mushroom-gms)'
./bazelw aquery 'mnemonic(ApkBuilder, //apps/mushroom:mushroom-gms)'
etc.
nkoroste pushed a commit to nkoroste/bazel that referenced this issue Feb 23, 2021
Tags are not propagated from targets to actions for Android rules. bazelbuild#8830

This PR adds basic propagation of tags from the android_binary target it's actions.

Testing with aquery with the Android repo:

./bazelw aquery 'mnemonic(RClassGenerator, //apps/mushroom:mushroom-gms)'
./bazelw aquery 'mnemonic(JavaDeployJar, //apps/mushroom:mushroom-gms)'
./bazelw aquery 'mnemonic(ApkBuilder, //apps/mushroom:mushroom-gms)'
etc.
meteorcloudy pushed a commit to meteorcloudy/bazel that referenced this issue May 7, 2021
Give source archive and patch files integrity
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

3 participants