[MacPorts] #56396: Bulding shared library libcurl for iOS with bitcode support from sources failed
MacPorts
noreply at macports.org
Tue May 1 15:04:03 UTC 2018
#56396: Bulding shared library libcurl for iOS with bitcode support from sources
failed
---------------------------------------------+--------------------
Reporter: AlexanderplUs | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.4.3
Keywords: macos libtool.m4 bitcode shared | Port:
---------------------------------------------+--------------------
I try to compile curl (the latest version curl-7_59_0) as shared library
for iOS with bitcode support ({{{-fembed-bitcode}}} flags) using MacPorts
and get next linker error:
{{{
ld: -flat_namespace and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
cannot be used together
}}}
This error is caused by {{{libtool.m4}}} script which add
{{{-flat_namespace}}} and {{{-undefined suppress}}} flags to the linker
command line:
{{{
case $host_os in
rhapsody* | darwin1.[[012]])
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined
${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[[012]][[,.]]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined
${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
}}}
If I manually remove this flags library compiles succesfully.
How can I turn off adding of this flags for iOS libraries compilation as
they both are incompatible with LLVM bitcode?
uname -a:
{{{
Darwin Mac-mini.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5
22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
}}}
My config for curl:
{{{
CLAGS="-arch armv7 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
-miphoneos-version-min=8.0 -fembed-bitcode -Wc,-fembed-bitcode
-DTARGET_OS_IPHONE=1" LDFLAGS="-arch armv7 -mcpu=cortex-a8 -mfpu=neon
-mfloat-abi=softfp -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
-miphoneos-version-min=8.0 -fembed-bitcode -Wc,-fembed-bitcode
-DTARGET_OS_IPHONE=1" curl/configure --enable-shared --disable-static
--host=armv7-apple-darwin --prefix=output/armv7-apple-darwin --enable-pic
--without-zlib --enable-ipv6 --disable-dict --disable-gopher --disable-
file --disable-ldap --disable-ldaps --disable-manual --disable-pop3
--disable-smtp --disable-imap --disable-proxy --disable-rtsp --disable-smb
--disable-telnet --disable-verbose --disable-tftp --without-libidn
--without-librtmp --with-
sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
}}}
--
Ticket URL: <https://trac.macports.org/ticket/56396>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list