[Bug] build icu failed on mac (master branch)
lucky-chen opened this issue · comments
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
- clone master
- set env
- npm download
- npm run start
need help, blocked by this issue
@lucky-chen Will this help? https://stackoverflow.com/a/53569790
@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?
How about temporarily remove it from $PATH?
Supposedly it should use cross compiler in NDK to build, not the system toolchain.
@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
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
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