Giter VIP home page Giter VIP logo

icu4c-iosx's People

Contributors

apotocki avatar marcocanc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

icu4c-iosx's Issues

ITMS-90338: Non-public API usage

When I integrated the ICU library and submitted the IPA package, it was rejected by apple

ITMS-90338: Non-public API usage - The app references non-public symbols in xxxx: _ubrk_current, _ubrk_first, _ubrk_getRuleStatus, _ubrk_isBoundary, _ubrk_next, _unorm_normalize. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information athttp://developer.apple.com/support/technical/

Best regards,

The App Store Team

Undefined Symbol for architecture arm64

Hello,

I have added this line to my pod 'icu4c-iosx' and after that i did pod instal, seems like everything went fine, but when i try to compile my project i am getting this errros:

Undefined symbols for architecture arm64: "icu_68::UnicodeString::UnicodeString(char16_t const*)", referenced from: Font2::prepareToProcessArabicText(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&) in Font2.o "vtable for icu_68::UObject", referenced from:

Seems like the library is not being linked, do i need to do something else in order to use the library?

Dynamic library?

Is it possible to build icu as a dylib instead of a static framework? The reason I'm asking is because as a static framework it forces all other podspecs that depend on this spec to also be a static framework.

Linker problems (arm64)

Hi! I'm getting a linker problems like
"Undefined symbols:
Linker command failed with exit code 1 (use -v to see invocation)"

If to look deeper in logs, it's said that:
ld: warning: ignoring file '/Users/myuser/Projects/myapp/ios/icu4c-iosx/product/lib/libicutu.a25': found architecture 'x86_64', required architecture 'arm64'

And such warnings are for a a lot of *.ao files. Do you know how to fix it? It sounds like ICU was built for everything, but not for arm64.

Build x86_64 version for simulator as part of build in M1 mac

Hi,

When including this library as a dependency of another pod spec, the linting phase of the other spec fails at link time because it can't find the symbols for x86_64. An extract of the error is:

Undefined symbols for architecture x86_64:
      "icu_71::ByteSink::GetAppendBuffer(int, int, char*, int, int*)", referenced from:
          vtable for icu_71::StringByteSink<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > in nmbr_icu(NMBRFormatter.o)
      "typeinfo for icu_71::ByteSink", referenced from:
          typeinfo for icu_71::StringByteSink<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > in nmbr_icu(NMBRFormatter.o)
      "icu_71::ByteSink::Flush()", referenced from:
          vtable for icu_71::StringByteSink<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > in nmbr_icu(NMBRFormatter.o)
      "icu_71::UMemory::operator delete(void*)", referenced from:
          icu_71::StringByteSink<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::~StringByteSink() in nmbr_icu(NMBRFormatter.o)
      "icu_71::Locale::Locale()", referenced from:
          icu_71::number::impl::MacroProps::MacroProps() in nmbr_icu(NMBRFormatter.o)

I tried to add support by duplicating the build step for the simulator with an x86_64 -arch flag, but it didn't work:

################### BUILD FOR SIM
ICU_IOS_SIM_BUILD_FOLDER=$ICU_VER_NAME-ios.sim-build
if [ ! -f $ICU_IOS_SIM_BUILD_FOLDER.success ]; then
echo preparing build folder $ICU_IOS_SIM_BUILD_FOLDER ...
if [ -d $ICU_IOS_SIM_BUILD_FOLDER ]; then
    rm -rf $ICU_IOS_SIM_BUILD_FOLDER
fi
cp -r $ICU4C_FOLDER $ICU_IOS_SIM_BUILD_FOLDER
echo "building icu (iOS: iPhoneSimulator)..."
pushd $ICU_IOS_SIM_BUILD_FOLDER/source

COMMON_CFLAGS="-arch x86_64 -fembed-bitcode-marker -isysroot $SIMSYSROOT/SDKs/iPhoneSimulator.sdk -mios-simulator-version-min=13.4 -I$SIMSYSROOT/SDKs/iPhoneSimulator.sdk/usr/include/"
./configure --disable-tools --disable-extras --disable-tests --disable-samples --disable-dyload --enable-static --disable-shared prefix=$INSTALL_DIR --host=$BUILD_ARC-apple-darwin --with-cross-build=$BUILD_DIR/$ICU_BUILD_FOLDER/source CFLAGS="$COMMON_CFLAGS" CXXFLAGS="$COMMON_CFLAGS -c -stdlib=libc++ -Wall --std=c++17" LDFLAGS="-stdlib=libc++ -L$SIMSYSROOT/SDKs/iPhoneSimulator.sdk/usr/lib/ -isysroot $SIMSYSROOT/SDKs/iPhoneSimulator.sdk -Wl,-dead_strip -lstdc++"

make -j$THREAD_COUNT
make install
popd
touch $ICU_IOS_SIM_BUILD_FOLDER.success 
fi

Would be great if the build script built all architectures available, so this pod spec can be used as a dependency in other specs.

MAC-OSX deployment target - feature request

Hello,
When linking to the framework, I receive messages that the deployment target is newer than that currently being linked. Is it possible to configure the build to target the build for a specific macOS deployment target, - I will also need different target for the Intel build and the arm build. I am currently in my project using 10.13 for intel, and 12.3 for arm (as arm wasn't available before 12.3).

Example from the Boost linking process

ld: warning: object file (/Users/ole/Prosjekter/icu/icu4c-iosx/product/lib/libicudata.a[x86_64][2](icudt74l_dat.o)) was built for newer 'macOS' version (14.0) than being linked (10.13)
ld: warning: object file (/Users/ole/Prosjekter/icu/icu4c-iosx/product/lib/libicui18n.a[x86_64][6](bocsu.ao)) was built for newer 'macOS' version (14.0) than being linked (10.13)
ld: warning: object file (/Users/ole/Prosjekter/icu/icu4c-iosx/product/lib/libicui18n.a[x86_64][14](coleitr.ao)) was built for newer 'macOS' version (14.0) than being linked (10.13)

Bitcode support?

Hi,

I have used this library in a project and when archiving my (iOS) app, I get an error saying that:

ld: bitcode bundle could not be generated because '.../BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/icu4c-iosx/libicui18n.a(measunit.ao)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

Is there a way to enable bitcode when building this library? I can of course disable bitcode from my app, but I'd rather not to that if possible.

Linking fails after `pod install`

Hey!

Thanks for the awesome effort getting ICU on CocoaPods :) -- I tried installing this on a project and when building, and I get the following warnings:

warning: [CP] Unable to find matching .xcframework slice in '/Users/kerrmarin/Developer/02-KERR/Test/Pods/../../icu4c-iosx/product/frameworks/icudata.xcframework icudata library ios-x86_64-simulator ios-arm64' for the current build architectures (arm64).
warning: [CP] Unable to find matching .xcframework slice in '/Users/kerrmarin/Developer/02-KERR/Test/Pods/../../icu4c-iosx/product/frameworks/icui18n.xcframework icui18n library ios-arm64 ios-x86_64-simulator' for the current build architectures (arm64).
warning: [CP] Unable to find matching .xcframework slice in '/Users/kerrmarin/Developer/02-KERR/Test/Pods/../../icu4c-iosx/product/frameworks/icuio.xcframework icuio library ios-x86_64-simulator ios-arm64' for the current build architectures (arm64).
warning: [CP] Unable to find matching .xcframework slice in '/Users/kerrmarin/Developer/02-KERR/Test/Pods/../../icu4c-iosx/product/frameworks/icuuc.xcframework icuuc library ios-x86_64-simulator ios-arm64' for the current build architectures (arm64).

They're not a big problem, however, I also get the following warnings and then error:

ld: warning: directory not found for option '-L/Users/kerrmarin/Library/Developer/Xcode/DerivedData/Test-dfmtaayewsbkhgaztpiotjisicck/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/icudata'
ld: warning: directory not found for option '-L/Users/kerrmarin/Library/Developer/Xcode/DerivedData/Test-dfmtaayewsbkhgaztpiotjisicck/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/icui18n'
ld: warning: directory not found for option '-L/Users/kerrmarin/Library/Developer/Xcode/DerivedData/Test-dfmtaayewsbkhgaztpiotjisicck/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/icuio'
ld: warning: directory not found for option '-L/Users/kerrmarin/Library/Developer/Xcode/DerivedData/Test-dfmtaayewsbkhgaztpiotjisicck/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/icuuc'
ld: library not found for -licudata
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I can get over it by linking the frameworks manually in the build phase, but I thought it would be better if it was possible to do this by updating the pod spec, or including something else on the podfile.


Unrelated, but I also added:

post_install do |installer_representation|
  project = installer_representation.pods_project
  project.targets.each do |target|
    if target.name == "icu4c-iosx"
      target.build_configurations.each do |config|
        target.build_settings(config.name)['VALID_ARCHS'] = "arm64 X86_64"
      end
    end
  end
end

to my podfile, so I didn't have to do the steps in the troubleshooting after each pod install. I think this can be avoided by adding:

s.pod_target_xcconfig = { 'VALID_ARCHS' => 'arm64 X86_64' }

to the podspec though. I see that a similar line is currently commented out, so I suspect there's a reason not to include it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.