[icu-support] Bazel build targets

11 views
Skip to first unread message

Stevo Mitrić

unread,
Jul 25, 2024, 6:10:05 PM7/25/24
to icu-s...@lists.sourceforge.net
Hi!

We are trying to use the ICU library in our project that is based on the bazel build system and we are having some trouble including all the things we need. We cannot seem to find a target to include the `StringSearch` class definition. Even after adding all targets to our bazel build file, the compiler is still complaining about a non-defined class (this however does not happen when we don't try to use the class, ex. with just doing "#include "unicode/stsearch.h"). The linker error is as follows:

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: icu_75::StringSearch::StringSearch(icu_75::UnicodeString const&, icu_75::UnicodeString const&, icu_75::RuleBasedCollator*, icu_75::BreakIterator*, UErrorCode&)

How to correctly include and use the `StringSearch` class with our bazel project?


Stevo Mitrić
Software Engineer
+381 63 782 8622
stevo....@databricks.com
Spaces Navigator II
Milutina Milankovića 1
Belgrade 11070, Serbia

Markus Scherer

unread,
Jul 25, 2024, 8:23:23 PM7/25/24
to ICU support mailing list
Hi Stevo,

The Bazel build files that we currently have are not intended for general use.
We use them as a special-purpose build system for Unicode data updates where we need to build tools with parts of the libraries, generate data files and initializer source code, use those to build higher-level tools, generate more data, ... and spiral up.

Sorry for the confusion!
markus

Vincent Tsao

unread,
Apr 2, 2025, 12:15:00 AMApr 2
to icu-support, Markus Scherer, ICU support mailing list
I know this is an old thread, but I've recently gotten ICU onto the BCR (https://registry.bazel.build/modules/icu) if you're interested. I know the Bazel portion is meant for internal ICU dev, but most of the core lib has been Bazelfied enough that it's usable after I patched it to compile with the data files.

It doesn't seem like it would take much to add more targets to the existing BUILD files to include the rest of the library (like adding StringSearch).
Reply all
Reply to author
Forward
0 new messages