Closed SpaceIm closed 3 years ago
this is from an official build instructions (http://userguide.icu-project.org/icufaq)
You need GNU's make program version 3.8 or later, and you need to run the runConfigureICU script, which is located in the icu/source directory.
all their docs reference runConfigureICU
http://userguide.icu-project.org/icudata
http://userguide.icu-project.org/packaging
we're building with runConfigureICU
for 4 years already, and so far didn't encounter any problems with it.
TypeError: sequence item 0: expected str instance, NoneType found
this definitely needs an improvement for error handling in recipe. still, not a problem of runConfigureICU
, which is robust and reliable.
It's not robust, it doesn't handle many platforms.
It's not robust, it doesn't handle many platforms.
for instance? for really exotic platforms (e.g. HP-UX), they have a note:
if you are not using the runConfigureICU script, or your platform is not supported by the script,
you may need to set your CC, CXX, CFLAGS and CXXFLAGS environment variables,
and type "./configure".
HP-UX users, please see this note regarding HP-UX multithreaded build issues with newer compilers.
Solaris users, please see this note regarding Solaris multithreaded build issues.
otherwise, for major CCI platforms (Linux, Macos, Windows) it's well supported.
more, runConfigureICU
is responsible to ensure that correct configure flags are propagated for all supported (and tested) platforms.
for instance?
iOS, tvOS, watchOS, Android (let's just say iOS & Android)? Less exotic than HP-UX.
more, runConfigureICU is responsible to ensure that correct configure flags are propagated for all supported (and tested) platforms.
Yes, some of them seem to be important, but does it honor CFLAGS and CXXFLAGS coming from profile?
Yes, some of them seem to be important, but does it honor CFLAGS and CXXFLAGS coming from profile?
seems like they just override, for some platforms, at least: https://chromium.googlesource.com/chromium/deps/icu/+/refs/heads/main/source/runConfigureICU#364
iOS, tvOS, watchOS, Android (let's just say iOS & Android)? Less exotic than HP-UX.
they literally say:
Can you help me build ICU4C for...
We can try.. make sure you read the latest "readme" and also the ICU Data section. You might also searching the icu-support archives, and then posting a question there. Additionally, sites such as StackOverflow may have helpful tips for your topic.
Android NDK
Please try searching the icu-support archives and also see StackOverflow.
iPhone
Please try searching the icu-support archives and also see StackOverflow.
so they don't provide any good instructions for that platforms. there are some gists and other scripts to build for iOS/Android available in the wild. some of them e.g. just use ./runConfigureICU Linux
for Android. some use ./configure
.
Yes, some of them seem to be important, but does it honor CFLAGS and CXXFLAGS coming from profile?
seems like they just override, for some platforms, at least: https://chromium.googlesource.com/chromium/deps/icu/+/refs/heads/main/source/runConfigureICU#364
So RelWithDebInfo and MinSizeRel are not honored as well if you look at runConfigureICU.
From what I see in runConfigureICU, it's just a naive wrapper of what conan does anyway in AutotoolsBuildEnvironment, but without honoring flags from profile.
So RelWithDebInfo and MinSizeRel are not honored as well if you look at runConfigureICU.
this is typical for many build systems. RelWithDebInfo
/MinSizeRel
only exist in CMake. for others (like MSBuild) we usually just fallback everything besides Debug
to the regular Release
. auto-tools predate CMake as well, and know nothing about these configurations. there are --enable-debug
flag sometimes, but even not in all configure scripts I've seen.
I'll submit a PR. It's not obvious:
--host
triplet as if we were compiling for Macos (thanks tools.get_gnu_triplet()
) .
Package and Environment Details (include every applicable attribute)
Conan profile (output of
conan profile show default
orconan profile show <profile>
if custom profile is in use)profile-build
profile-host
Steps to reproduce (Include if Applicable)
Logs (Include/Attach if Applicable)
Click to expand log
``` [HOOK - conan-center.py] pre_export(): [DEPRECATED GLOBAL CPPSTD (KB-H001)] OK [HOOK - conan-center.py] pre_export(): [REFERENCE LOWERCASE (KB-H002)] OK [HOOK - conan-center.py] pre_export(): [RECIPE METADATA (KB-H003)] OK [HOOK - conan-center.py] pre_export(): [HEADER_ONLY, NO COPY SOURCE (KB-H005)] OK [HOOK - conan-center.py] pre_export(): [FPIC OPTION (KB-H006)] OK [HOOK - conan-center.py] pre_export(): [VERSION RANGES (KB-H008)] OK [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] Total recipe size: 47.5419921875 KB [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] OK [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: patches/*.patch [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] OK [HOOK - conan-center.py] pre_export(): [TEST PACKAGE FOLDER (KB-H024)] OK [HOOK - conan-center.py] pre_export(): [META LINES (KB-H025)] OK [HOOK - conan-center.py] pre_export(): [CONAN CENTER INDEX URL (KB-H027)] OK [HOOK - conan-center.py] pre_export(): [CMAKE MINIMUM VERSION (KB-H028)] OK [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - RUN ENVIRONMENT (KB-H029)] OK [HOOK - conan-center.py] pre_export(): [SYSTEM REQUIREMENTS (KB-H032)] OK [HOOK - conan-center.py] pre_export(): [CONANDATA.YML FORMAT (KB-H030)] OK [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO IMPORTS() (KB-H034)] OK [HOOK - conan-center.py] pre_export(): [NO AUTHOR (KB-H037)] OK [HOOK - conan-center.py] pre_export(): [NO TARGET NAME (KB-H040)] OK [HOOK - conan-center.py] pre_export(): [NO FINAL ENDLINE (KB-H041)] OK [HOOK - conan-center.py] pre_export(): [NO REQUIRES.ADD() (KB-H044)] OK [HOOK - conan-center.py] pre_export(): [DELETE OPTIONS (KB-H045)] OK [HOOK - conan-center.py] pre_export(): [NO ASCII CHARACTERS (KB-H047)] OK [HOOK - conan-center.py] pre_export(): [CMAKE VERBOSE MAKEFILE (KB-H046)] OK [HOOK - conan-center.py] pre_export(): [CMAKE VERSION REQUIRED (KB-H048)] OK [HOOK - conan-center.py] pre_export(): [CMAKE WINDOWS EXPORT ALL SYMBOLS (KB-H049)] OK [HOOK - conan-center.py] pre_export(): [DEFAULT OPTIONS AS DICTIONARY (KB-H051)] OK [HOOK - conan-center.py] pre_export(): [CONFIG.YML HAS NEW VERSION (KB-H052)] OK [HOOK - conan-center.py] pre_export(): [PRIVATE IMPORTS (KB-H053)] OK [HOOK - conan-center.py] pre_export(): [SINGLE REQUIRES (KB-H055)] OK [HOOK - conan-center.py] pre_export(): [ILLEGAL CHARACTERS (KB-H058)] OK [HOOK - conan-center.py] pre_export(): [CLASS NAME (KB-H059)] OK [HOOK - conan-center.py] pre_export(): [NO CRLF (KB-H060)] OK Exporting package recipe icu/69.1 exports: File 'conandata.yml' found. Exporting it... icu/69.1 exports: Copied 1 '.yml' file: conandata.yml icu/69.1 exports_sources: Copied 3 '.patch' files: 0001-69.1-fix-mingw.patch, 0001-67.1-fix-mingw.patch, 6aba9344a18f4f32e8070ee53b79495630901c26.patch [HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] Saving conandata.yml: {'sources': {'69.1': {'url': 'https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-src.tgz', 'sha256': '4cba7b7acd1d3c42c44bb0c14be6637098c7faf2b330ce876bc5f3b915d09745'}}, 'patches': {'69.1': [{'patch_file': 'patches/0001-69.1-fix-mingw.patch', 'base_path': 'source_subfolder'}]}} [HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] New conandata.yml contents: patches: '69.1': - base_path: source_subfolder patch_file: patches/0001-69.1-fix-mingw.patch sources: '69.1': sha256: 4cba7b7acd1d3c42c44bb0c14be6637098c7faf2b330ce876bc5f3b915d09745 url: https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-src.tgz [HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] OK [HOOK - conan-center.py] post_export(): [DEFAULT SHARED OPTION VALUE (KB-H050)] OK [HOOK - conan-center.py] post_export(): [LICENSE PUBLIC DOMAIN (KB-H056)] OK icu/69.1: The stored package has not changed icu/69.1: Using the exported files summary hash as the recipe revision: 25ebb905737a0f074c2d4481055c9195 icu/69.1: Exported revision: 25ebb905737a0f074c2d4481055c9195 Configuration (profile_host): [settings] arch=armv8 build_type=Release compiler=apple-clang compiler.libcxx=libc++ compiler.version=12.0 os=iOS os.version=12.0 [options] [build_requires] [env] Configuration (profile_build): [settings] arch=x86_64 build_type=Release compiler=apple-clang compiler.libcxx=libc++ compiler.version=12.0 os=Macos [options] [build_requires] [env] icu/69.1: WARN: Package binary is corrupted, removing: e713d29ad52ea3a461c9d857b3294af4712c008b icu/69.1 (test package): Installing package Requirements icu/69.1 from 'conancenter' - Cache Packages icu/69.1:e713d29ad52ea3a461c9d857b3294af4712c008b - Build Build requirements icu/69.1 from 'conancenter' - Cache Build requirements packages icu/69.1:00395e88f4bd78b40c93f1fc576357f38a8a6f2c - Cache Cross-build from 'Macos:x86_64' to 'iOS:armv8' Installing (downloading, building) binaries... icu/69.1: Already installed! icu/69.1: Appending ICU_DATA environment variable: /Users/spaceim/.conan/data/icu/69.1/_/_/package/00395e88f4bd78b40c93f1fc576357f38a8a6f2c/res/icudt69l.dat icu/69.1: Appending PATH environment variable: /Users/spaceim/.conan/data/icu/69.1/_/_/package/00395e88f4bd78b40c93f1fc576357f38a8a6f2c/bin [HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK [HOOK - conan-center.py] post_package_info(): [LIBRARY DOES NOT EXIST (KB-H054)] OK icu/69.1: Applying build-requirement: icu/69.1 icu/69.1: WARN: Build folder is dirty, removing it: /Users/spaceim/.conan/data/icu/69.1/_/_/build/e713d29ad52ea3a461c9d857b3294af4712c008b icu/69.1: Copying sources to build folder icu/69.1: Building your package in /Users/spaceim/.conan/data/icu/69.1/_/_/build/e713d29ad52ea3a461c9d857b3294af4712c008b icu/69.1: Generator txt created conanbuildinfo.txt icu/69.1: Aggregating env generators [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK. 'fPIC' option found and apparently well managed [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK icu/69.1: Calling build() icu/69.1: icu/69.1: ERROR: Package 'e713d29ad52ea3a461c9d857b3294af4712c008b' build failed icu/69.1: WARN: Build folder /Users/spaceim/.conan/data/icu/69.1/_/_/build/e713d29ad52ea3a461c9d857b3294af4712c008b ERROR: icu/69.1: Error in build() method, line 103 self.run(self._build_config_cmd, win_bash=tools.os_info.is_windows) while calling '_build_config_cmd', line 200 return "../source/runConfigureICU %s" % " ".join(args) TypeError: sequence item 0: expected str instance, NoneType found ```It comes from this logic in icu recipe: https://github.com/conan-io/conan-center-index/blob/564adba3032fa7dba45b22c7171f026d2c5bf758/recipes/icu/all/conanfile.py#L134-L200
icu recipe is broken for any host OS different than the ones listed here.
Why does recipe rely on
runConfigureICU
, instead of calling configure directly? Or callrunConfigureICU
for configurations handled in this script, otherwise call configure directly.Honestly runConfigureICU seems to be useless for most OS:
runConfigureICU of icu 69.1
```sh #!/bin/sh # Copyright (C) 2016 and later: Unicode, Inc. and others. # License & terms of use: http://www.unicode.org/copyright.html # Copyright (c) 1999-2015, International Business Machines Corporation and # others. All Rights Reserved. # runConfigureICU: This script will run the "configure" script for the appropriate platform # Only supported platforms are recognized me=`basename $0` OPTS= usage() { ec=0$1 if test $ec -eq 0 then uletter=U else uletter=u fi echo "${uletter}sage: $me [ -h, --help ] [ --enable-debug | --disable-release ] platform [ configurearg ... ]" if test $ec -eq 0 then cat </cc @SSE4 (you have ported this recipe from bincrafters, and this logic was already there, maybe you remember rational behind it).