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

Several builds under examples/third_party fail at HEAD #1135

Open
bcsgh opened this issue Dec 16, 2023 · 2 comments
Open

Several builds under examples/third_party fail at HEAD #1135

bcsgh opened this issue Dec 16, 2023 · 2 comments

Comments

@bcsgh
Copy link
Contributor

bcsgh commented Dec 16, 2023

The stuff under examples/third_party looks like it could be a highly valuable resource, but I'm not actually sure any of it works. Which is annoying.

Reproduction:

T=rules_foreign_cc
git clone https://github.com/bazelbuild/rules_foreign_cc.git $T
cd $T/examples/third_party

bazel build -k :all
# More complete:
bazel build -k ...
# Most (likely too)  complete:
bazel query 'kind("http_archive|git_repository",//external:*)' |
    sed "/:.*[/]/d;s/.*:/@/;s~$~//:all~" |
    bazel build -k $(cat)

ERRORS

@rules_perl// (needed by @openssl//)

ERROR: [...]/external/rules_perl/BUILD:74:23: While resolving toolchains for target @rules_perl//:current_toolchain: No matching toolchains found for types @rules_perl//:toolchain_type.
To debug, rerun with --toolchain_resolution_debug='@rules_perl//:toolchain_type'

See fix(?) in PR #1137

@mesa//

Error in download_and_extract: java.io.IOException: Error downloading [https://archive.mesa3d.org//mesa-22.1.4.tar.xz] to [...]/external/mesa/temp12780688070917179032/mesa-22.1.4.tar.xz: No route to host (Host unreachable)

@libpng//

ERROR: [...]/external/libpng/BUILD.bazel:13:6: Foreign Cc - CMake: Building libpng failed:
[...]
external/libpng/contrib/libtests/pngstest.c:3216:24: error: '%d' directive writing between 1 and 11 bytes into a region of size between 10 and 32 [-Werror=format-overflow=]
 3216 |       sprintf(name, "%s%d.png", tmpf, ++counter);
      |                        ^~
[...]

@gperftools//

ERROR: [...]/external/gperftools/BUILD.bazel:11:15: Foreign Cc - Configure: Building gperftools_build failed:
[...]
external/gperftools/src/tcmalloc.cc:2098:36: error: 'void tc_delete_aligned_nothrow(void*, std::align_val_t, const std::nothrow_t&)' alias between functions of incompatible types 'void(void*, std::align_val_t, const std::nothrow_t&)' and 'void(void*)' [-Werror=attribute-alias=]
 2098 | extern "C" PERFTOOLS_DLL_DECL void tc_delete_aligned_nothrow(void* p, std::align_val_t, const std::nothrow_t&) PERFTOOLS_NOTHROW
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
[...]

ERROR: [...]/external/iconv/BUILD.bazel:8:15: Foreign Cc - Configure: Building iconv failed:

@iconv//

WARNING: The target pattern '@iconv//:all' is ambiguous: ':all' is both a wildcard, and the name of an existing filegroup rule; using the latter interpretation
WARNING: The target pattern '@iconv_macos//:all' is ambiguous: ':all' is both a wildcard, and the name of an existing filegroup rule; using the latter interpretation
ERROR: [...]/external/iconv/BUILD.bazel:8:15: Foreign Cc - Configure: Building iconv failed:
[...]
In file included from ./iconv.c:73,
                 from ./iconv_no_i18n.c:2:
./iconv.c: In function 'main':
../srclib/gettext.h:86:34: error: statement with no effect [-Werror=unused-value]
   86 | # define textdomain(Domainname) ((const char *) (Domainname))
      |                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./iconv.c:863:3: note: in expansion of macro 'textdomain'
  863 |   textdomain("libiconv");
      |   ^~~~~~~~~~
[...]

(And a few more)

@jsharpe
Copy link
Member

jsharpe commented Dec 20, 2023

Note that in CI we don't actually run these directly from the examples/third_party workspace but import them from the examples workspace so you may have more luck building these targets from the examples directory.

Also what version of Bazel are you using and what platform?

@bcsgh
Copy link
Contributor Author

bcsgh commented Dec 20, 2023

IMHO in an official repo, any directory of examples that looks like a workspace should be supported. The optics of "they can't even keep the official examples working!" is just bad for marketing. Either that or it should be so clearly broken that nobody would ever be forgiven for expecting it to work. (E.g. make the WORKSPACE file nothing but a comment pointing at where it should be used from.)

FWIW: if it were up to me, there would be a second set of directories with a workspace for each of the ones under third_party with full CI making sure that each works individually and that none of them just work because another is randomly including the right thing.

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