react-native-community / jsc-android-buildscripts

Script for building JavaScriptCore for Android (for React Native but not only)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] build icu failed on mac (master branch)

lucky-chen opened this issue · comments

commented

Bug

ld: archive has no table of contents file 'uconvmsg/libuconvmsg.a' for architecture x86_64

detail

 uconvmsg/uconvmsg_dat.S
pkgdata: ar r -c uconvmsg/libuconvmsg.a uconvmsg/uconvmsg_dat.o
/opt/local/bin/ranlib: object: uconvmsg/libuconvmsg.a(uconvmsg_dat.o) malformed object (unknown load command 1)
ar: internal ranlib command failed
-- return status = 256
Error generating library file. Failed command: ar r -c uconvmsg/libuconvmsg.a uconvmsg/uconvmsg_dat.o
Error generating assembly code for data.
config.status: creating extra/uconv/uconv.1
clang++ --std=c++11 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -Qunused-arguments -Wno-parentheses-equality   -o ../../bin/uconv uconv.o uwmsg.o -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata -lpthread -lm   uconvmsg/libuconvmsg.a

ld: archive has no table of contents file 'uconvmsg/libuconvmsg.a' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment info

ndk: r17c
branch:master (fork today)
jsc:jsc-android@241213.2.0
macos:10.14 (18A391)

Library version: x.x.x

Steps To Reproduce

on mac, follow doc

  1. clone master
  2. set env
  3. npm download
  4. npm run start
commented

need help, blocked by this issue

commented

@Kudo Thanks Reply,still not work. and i see log

Running ./configure  --prefix=xxx/jsc-android-buildscripts/build/target/icu/host/prebuilts CFLAGS=-Os CXXFLAGS=--std=c++11 --disable-tests --disable-samples --disable-layout --disable-layoutex for Linux using the clang or else GNU C++ compiler

may be compile-toochain's problem? should be ndk-tool-chain?

Yes, it should be environment problem for sure.
The thing is that I always build by mac 10.14, so to confirm it.

Could your further check if /opt/local/bin/ranlib existed in your environment?

commented

@Kudo exist . both file and $PATH (~/.zshrc)

How about temporarily remove it from $PATH?
Supposedly it should use cross compiler in NDK to build, not the system toolchain.

commented

@Kudo still not work. where the code position which check the env to use ndk or system toolchain (for build icu), so i can check my env by code

commented

solved by brew uninstall binutils,but new problem found

In file included from ../../Source/WTF/wtf/text/WTFString.h:31:
../../Source/WTF/wtf/text/StringImpl.h:26:10: fatal error: 'unicode/ustring.h' file not found
#include <unicode/ustring.h>

icu may be find error

commented

solved by brew uninstall binutils,but new problem found

In file included from ../../Source/WTF/wtf/text/WTFString.h:31:
../../Source/WTF/wtf/text/StringImpl.h:26:10: fatal error: 'unicode/ustring.h' file not found
#include <unicode/ustring.h>

icu may be find error

update, build success , maybe src dowload error, i download https://s3-us-west-2.amazonaws.com/archives.webkit.org/WebKit-SVN-source.tar.bz2 and co