profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ofats/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

ofats/any_invocable 11

Сonservative, move-only equivalent of std::function

ofats/meta_evo 8

Presentation materials for C++Siberia 2019 conference

ofats/wask 1

W-ask - poor substitute of wget utility

napLord/KTL 0

cpp's stl clone

ofats/Catch2 0

A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)

ofats/cmd_2048 0

Command Line 2048 game!

ofats/task_graph 0

Library for statically building execution graphs.

issue openedabseil/abseil-cpp

Cannot use Abseil copts in my project when using Bazel

Hello! I'd like to standardize on Abseil compilation flags in my projects.

I'm using Bazel and trying to use variables sharing from external workspace.

BUILD file is straightforward:

load(
    "@com_google_absl//absl:copts/configure_copts.bzl",
    "ABSL_DEFAULT_COPTS",
    "ABSL_TEST_COPTS",
)

cc_library(
    name = "log",
    hdrs = ["log.h"],
    copts = ABSL_DEFAULT_COPTS,
    deps = [
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/time",
    ],
)

cc_test(
    name = "log_test",
    srcs = ["log_test.cc"],
    copts = ABSL_TEST_COPTS,
    deps = [
        ":log",
        "@com_google_absl//absl/strings",
        "@com_google_googletest//:gtest_main",
    ],
)

However, I'm getting such errors:

ERROR: Analysis of target '//ofats/log:log_test' failed; build aborted: no such package 'absl': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.

I'm referencing correct .bzl file by correct path, double checked.

I started looking more into this and found out that the following setup builds successfully:

load(
    "@com_google_absl//absl:copts/GENERATED_copts.bzl",
    "ABSL_LLVM_FLAGS",
    "ABSL_LLVM_TEST_FLAGS",
)

cc_library(
    name = "log",
    hdrs = ["log.h"],
    copts = ABSL_LLVM_FLAGS,
    deps = [
        ":source_location",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/time",
    ],
)

cc_test(
    name = "log_test",
    srcs = ["log_test.cc"],
    copts = ABSL_LLVM_TEST_FLAGS,
    deps = [
        ":log",
        "@com_google_absl//absl/strings",
        "@com_google_googletest//:gtest_main",
    ],
)

So it seems that, for some reason, Bazel cannot resolve the load label in configure_copts.bzl file when loading from it from external workspace: looks like it treats it as a local label in my project.

Now I'm wondering if it's a problem in Bazel itself (maybe some known limitation?) or in the setup of Abseil copts.

P.S. Abseil doc still point to already non-existent https://github.com/abseil/abseil-cpp/blob/master/absl/copts.bzl.

created time in a day

push eventofats/log

Oleg Fatkhiev

commit sha 7369a7b68c9893101225d3615b1fa51b0412e8be

Simplify log formatting, fix functions in headers.

view details

push time in a day

push eventofats/any_invocable

Oleg Fatkhiev

commit sha 18469ff9aacb3cdb592172e4e69cf05ba36e6e9e

Fix yaml.

view details

push time in 2 days

push eventofats/any_invocable

Oleg Fatkhiev

commit sha ca317a02cb15f141055e07be47e9c09f5acf6058

Fix yaml.

view details

push time in 2 days

push eventofats/any_invocable

Oleg Fatkhiev

commit sha dd35e27ae83556abea4f239064b9fde5eb1d7cb4

Fix yaml.

view details

push time in 2 days

push eventofats/any_invocable

Oleg Fatkhiev

commit sha baa74172090b114051adade1498b0b18d561dee6

Move CI builds to a single file.

view details

push time in 2 days

delete branch ofats/log

delete branch : main

delete time in 9 days

create barnchofats/log

branch : master

created branch time in 9 days

push eventofats/log

Oleg Fatkhiev

commit sha 69e332c30ef4736acfcbbf507b9ac0cb8af70fd7

Add logger and SourceLocation drafts.

view details

push time in 22 days

create barnchofats/log

branch : main

created branch time in 23 days

created repositoryofats/log

created time in 23 days

issue commentabseil/abseil-cpp

Abseil build with -Werror on Bazel fails if using clang-9 or older

Fixing in #1008

ofats

comment created time in a month

pull request commentabseil/abseil-cpp

Add -Wno-unknown-warning-option to ABSL_LLVM_FLAGS

@googlebot I signed it!

ofats

comment created time in a month

PR opened abseil/abseil-cpp

Add -Wno-unknown-warning-option to ABSL_LLVM_FLAGS

To disable warnings on unknown warning flags on older versions of clang.

+5 -0

0 comment

3 changed files

pr created time in a month

create barnchofats/abseil-cpp

branch : fix-unknown-warning-options

created branch time in a month

issue openedabseil/abseil-cpp

Abseil build with -Werror on Bazel fails if using clang-9 or older

Describe the bug

Abseil fails to build if using -Werror on older clang because of unknown warning options. For example, -Wno-implicit-float-conversion is unknown on clang-9.

Steps to reproduce the bug

# On the repo root
$ bazel build ... --action_env=CC=clang-9 --copt=-Werror
INFO: Build option --copt has changed, discarding analysis cache.
INFO: Analyzed 388 targets (0 packages loaded, 2078 targets configured).
INFO: Found 388 targets...
ERROR: <workspace>/absl/hash/BUILD.bazel:119:11: Compiling absl/hash/internal/city.cc failed: (Exit 1): clang-9 failed: error executing command /usr/bin/clang-9 -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 51 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
error: unknown warning option '-Wno-implicit-int-float-conversion'; did you mean '-Wno-implicit-float-conversion'? [-Werror,-Wunknown-warning-option]
INFO: Elapsed time: 10.103s, Critical Path: 5.84s
INFO: 21 processes: 9 internal, 12 linux-sandbox.
FAILED: Build did NOT complete successfully

What version of Abseil are you using?

https://github.com/abseil/abseil-cpp/commit/637722af3a60c17915d3325604a0435ee92a41b4 (master when creating this issue)

What operating system and version are you using

$ uname -a
5.4.0-74-generic #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

What compiler and version are you using?

$ clang-9 -v
clang version 9.0.1-12 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64

What build system are you using?

$ bazel --version
bazel 4.2.0

Additional context

I see that you're using -Werror option when building with clang in your CI: https://github.com/abseil/abseil-cpp/blob/637722af3a60c17915d3325604a0435ee92a41b4/ci/linux_clang-latest_libcxx_bazel.sh#L86 It would have been discovered on older clang easily if you don't use only the latest version.

created time in a month

fork ofats/abseil-cpp

Abseil Common Libraries (C++)

https://abseil.io

fork in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha 124ee7a3e892c07bd9849dc14931928c955163a4

Remove sanitizers.rc usage fron macos and windows builds.

view details

push time in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha 0aee6f6badaf851338ee68a3cb963b503e3c1472

Fix Windows build.

view details

push time in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha 24d0bf40a2ba9fe0b0817f6ba6f493bacea76d1e

Add -Wno-unknown-warning-option, fix Windows build.

view details

push time in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha bf18c32998019dfbee9b9ac4b0d5d17fd886ed71

Temporary disable -Wno-implicit-float-conversion since doesn't work with clang up to 9.

view details

push time in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha 2b42d48fb34d4456adf86a3b1844e7b1e45955c6

Bring warnings, remove standard from targets, update CI.

view details

push time in a month

PR closed catchorg/Catch2

Fix MSVC build using Bazel, format with buildifier.

Description

  • Fix build using Bazel with MSVC compiler: current flag for choosing standard isn't recognized by MSVC, added switch by compiler.
  • Formatted root BUILD.bazel with buildifier.
+25 -9

0 comment

1 changed file

ofats

pr closed time in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha c910ecec70c2e55bb29e601b23900b8c1c56ddae

Fix build.

view details

push time in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha 6c23400dcce184b22de779611ef6466e84e274fb

Setup cache key per platform/compiler/build_type.

view details

push time in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha 8cb9853e79b52ff84685205a9232c6380c7fd266

Fix README.

view details

push time in a month

push eventofats/any_invocable

Oleg Fatkhiev

commit sha 26434bedc6fc8fb1a8843b2d72f05d633e79a4a3

Add Bazel cache to Github actions.

view details

push time in a month

PR opened catchorg/Catch2

Fix MSVC build, format with buildifier.

Description

  • Fix build using Bazel with MSVC compiler: current flag for choosing standard isn't recognized by MSVC, added switch by compiler.
  • Formatted root BUILD.bazel with buildifier.
+25 -9

0 comment

1 changed file

pr created time in a month

push eventofats/Catch2

Oleg Fatkhiev

commit sha d5ac0b7a08d0118cb99dc45b42ab689d83182f1f

Fix MSVC build, format with buildifier.

view details

push time in a month

create barnchofats/Catch2

branch : fix-msvc-build-apply-buildifier

created branch time in a month