Issue 226 in webp: Building libwebp for iOS with latest Xcode is impossible

347 views
Skip to first unread message

we...@googlecode.com

unread,
Sep 23, 2014, 5:41:50 AM9/23/14
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 226 by juha.nie...@gmail.com: Building libwebp for iOS with
latest Xcode is impossible
https://code.google.com/p/webp/issues/detail?id=226

I'm trying to build libwebp for iOS (using the provided iosbuild.sh
script), and with the latest Mac OS X / Xcode this seems to be practically
impossible.

Version info: libwebp 0.4.1, Mac OS X 10.9.5, Xcode 6.0.1 (clang version:
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn).)

Firstly, when running the iosbuild.sh script, it gives an error
about 'autoreconf' not being found (Apple has dropped support). This can be
fixed by installing the autoconf package eg. with macports.

Next it gives an error about 'aclocal' not being found. Fixed by installing
automake.

Next it gives an error about some strange 'AC_PROG_LIBTOOL' macro being
undefined. Fixed by installing libtool.

Now it's able to create the necessary configure script files. However, when
running configure, it complains:

configure: error: C compiler cannot create executables

The exact error found in config.log is:

configure:3428: checking whether the C compiler works
configure:3450: gcc -arch i386 -pipe -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/
-O3 -DNDEBUG -miphoneos-version-min=5.0 -arch i386 -pipe -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/
-miphoneos-version-min=5.0 conftest.c >&5
Undefined symbols for architecture i386:
"start", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

(Note that with the latest Xcode, 'gcc' is just an alias for 'clang', but
making configure run clang directly doesn't change anything.)

This is where I got stuck, as I don't know how to fix that problem.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

we...@googlecode.com

unread,
Sep 23, 2014, 8:52:12 PM9/23/14
to webp-d...@webmproject.org

Comment #1 on issue 226 by jz...@google.com: Building libwebp for iOS with
This is looking for the iOS simulator. If it isn't installed and you don't
need that configuration you can remove it from the target list [1]:

declare -r PLATFORMS="iPhoneSimulator iPhoneOS-V7 iPhoneOS-V7s
iPhoneOS-V7-arm64"

[1]
https://gerrit.chromium.org/gerrit/gitweb?p=webm/libwebp.git;a=blob;f=iosbuild.sh;h=32f2a6dcc4a5e51b7b9be9e926c81d4f3b9c95af;hb=refs/heads/master#l25

we...@googlecode.com

unread,
Sep 24, 2014, 6:55:03 AM9/24/14
to webp-d...@webmproject.org

Comment #2 on issue 226 by juha.nie...@gmail.com: Building libwebp for iOS
The iOS simulator is installed as normal, and I obviously need that
configuration since I want to be able to use the simulator for development.
(I do not know, however, if Xcode 6 has set up the simulator in some new
way that confuses the configure script...)
Message has been deleted

we...@googlecode.com

unread,
Sep 24, 2014, 10:45:39 PM9/24/14
to webp-d...@webmproject.org
Updates:
Status: Accepted

Comment #3 on issue 226 by jz...@google.com: Building libwebp for iOS with
I didn't see anything in the release notes, but it seems the
iphoneos-version-min (5.0) is too low for this release. Going to 6 is fine
and I think that covers most viable iphone's still.
I uploaded a patch [1], give it a try if you get a chance.

[1] https://gerrit.chromium.org/gerrit/#/c/71660/

we...@googlecode.com

unread,
Sep 25, 2014, 2:54:20 AM9/25/14
to webp-d...@webmproject.org

Comment #4 on issue 226 by juha.nie...@gmail.com: Building libwebp for iOS
Changing -miphoneos-version-min to 6.0 seems to fix the configuration
problem, as it now compiles without problems.

we...@googlecode.com

unread,
Sep 25, 2014, 6:53:41 PM9/25/14
to webp-d...@webmproject.org
Updates:
Status: Fixed

Comment #5 on issue 226 by jz...@google.com: Building libwebp for iOS with
I merged this:
9f7d9e6 iosbuild: make iOS 6 the minimum requirement

Thanks for the report and verifying! As I said in the change I couldn't
find a way to avoid this flag in simulator builds, using xcrun for instance.

we...@googlecode.com

unread,
Sep 25, 2014, 7:11:17 PM9/25/14
to webp-d...@webmproject.org

Comment #6 on issue 226 by juha.nie...@gmail.com: Building libwebp for iOS
Note, however, that there's still the problem of the missing tools with the
newest Xcode (ie. autoconf, automake and libtool). It may be a good idea if
the script checked that those tools are installed and informed properly the
user if they are not (or offered some kind of alternative).

Btw, it's strange that a minimum of 6.0 seems to be required, given that
even the newest Xcode compiles fine for iOS 5.0 otherwise...

we...@googlecode.com

unread,
Sep 25, 2014, 11:31:21 PM9/25/14
to webp-d...@webmproject.org

Comment #7 on issue 226 by jz...@google.com: Building libwebp for iOS with
latest Xcode is impossible
https://code.google.com/p/webp/issues/detail?id=226

> Note, however, that there's still the problem of the missing tools with
> the newest Xcode (ie. autoconf, automake and libtool). It may be a good
> idea if the script checked that those tools are installed and informed
> properly the user if they are not (or offered some kind of alternative).

Good point. It's documented for general configure use, but the script
itself could be more helpful. I plan on adding a framework build to the
next release which should help too.

> Btw, it's strange that a minimum of 6.0 seems to be required, given that
> even the newest Xcode compiles fine for iOS 5.0 otherwise...

That might be worth some investigation. Before posting the patch I removed
the simulator and all was well, so only it may be affected in this release.

we...@googlecode.com

unread,
Dec 9, 2014, 11:19:34 AM12/9/14
to webp-d...@webmproject.org

Comment #8 on issue 226 by juha.nie...@gmail.com: Building libwebp for iOS
Sorry for the long delay, but have been busy with other projects.

Version 0.4.2 compiles and works fine for the latest Xcode, except that the
64-bit simulator version is not compiled into the framework. This causes a
linker error when trying to compile a 64-bit version for the simulator.

I fixed this by editing iosbuild.sh and adding a name
like "iPhoneSimulator-64" to the PLATFORMS variable, and then adding these
lines in the "for PLATFORM ..." loop:

elif [[ "${PLATFORM}" == "iPhoneSimulator-64" ]]; then
PLATFORM="iPhoneSimulator";
ARCH="x86_64"

we...@googlecode.com

unread,
Dec 9, 2014, 10:18:44 PM12/9/14
to webp-d...@webmproject.org

Comment #9 on issue 226 by jz...@google.com: Building libwebp for iOS with
Thanks. This was added to the master branch recently and will be available
in the next release:

commit a96ccf8fdece8ea32d20406bd0c028545ec8534f
Author: James Zern <jz...@google.com>
Date: Fri Nov 14 16:38:42 2014 -0800

iosbuild: add x64_64 simulator support

based on the patch here:
https://github.com/pixelkind/webp-ios-build

Change-Id: Iaa346b751e5f18e8cf13a8e5c4064b0c2a3f5f6c

we...@googlecode.com

unread,
Dec 15, 2014, 1:23:42 AM12/15/14
to webp-d...@webmproject.org

Comment #10 on issue 226 by neelufar...@gmail.com: Building libwebp for iOS
Hi,

I am trying to create vpx frame work by running the iosbuild.sh but I am
getting error when I am trying to run iosbuild.sh with extra arguments.
Below is the command what I have used and error what I am getting. Help to
fix this error, thanks in advance.


dsp-videos-Mac-mini-5:~ dsp_video$ cd
/Users/dsp_video/Desktop/vp8_64bit_git/vpx_frame_wrok/new
dsp-videos-Mac-mini-5:new dsp_video$ cd libvpx
dsp-videos-Mac-mini-5:libvpx dsp_video$ cd framework
dsp-videos-Mac-mini-5:framework dsp_video$ ../build/make/iosbuild.sh
--extra-configure-args="--enable-error-concealment"
Usage: iosbuild.sh [arguments]
--help: Display this message and exit.
--extra-configure-args <args>: Extra args to pass when configuring
libvpx.
--jobs: Number of make jobs.
--preserve-build-output: Do not delete the build directory.
--show-build-output: Show output from each library build.
--targets <targets>: Override default target list. Defaults:
arm64-darwin-gcc
armv7-darwin-gcc
armv7s-darwin-gcc
x86-iphonesimulator-gcc
x86_64-iphonesimulator-gcc
--verbose: Output information about the environment and each stage of
the
build.
iosbuild.sh failed because: build exited with error (1)

we...@googlecode.com

unread,
Dec 15, 2014, 8:32:46 PM12/15/14
to webp-d...@webmproject.org

Comment #11 on issue 226 by jz...@google.com: Building libwebp for iOS with
The above output is from libvpx's build script, this bug is for libwebp.
You can post a bug to code.google.com/p/webm or post a mail to
webm-d...@webmproject.org.
Reply all
Reply to author
Forward
0 new messages