New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 602682 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

GN: Fix compilation with libjpeg_turbo on iOS

Project Member Reported by sdefresne@chromium.org, Apr 12 2016

Issue description

Followup from https://codereview.chromium.org/1806503002/.

On 2016/04/06 at 17:09:30, kjellander wrote:
> May I ask why this was a GN-only change, since use_system_libjpeg is always 0 in https://code.google.com/p/chromium/codesearch#chromium/src/build/common.gypi ?
> 
> I'm wondering since I've been spending some time on trying to get WebRTC build for GN iOS again and I'm currently stuck on missing the jpeg library:
> $ ninja -C out/Default frame_analyzer
> ninja: Entering directory `out/Default'
> [1/1] LINK ./frame_analyzer
> FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -stdlib=libc++ -mios-simulator-version-min=9.0 -o "./frame_analyzer" -Wl,-filelist,"./frame_analyzer.rsp"  -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework CoreVideo -ljpeg
> ld: library not found for -ljpeg
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> ninja: build stopped: subcommand failed.
> 
> If I instead try to build libjpeg_turbo, I run into a build error like you said: 
> 
> $ gn gen --args="target_os=\"ios\" use_system_libjpeg=false" out/Default 
> $ ninja -C out/Default frame_analyzer
> ninja: Entering directory `out/Default'
> [11/105] ACTION //third_party/libjpeg_turbo:simd_asm_action(//build/toolchain/mac:ios_clang_arm)
> FAILED: python ../../third_party/yasm/run_yasm.py ./clang_x64/yasm -fmacho64 -m amd64 -I. -I../.. -Igen -D__x86_64__ -o obj/third_party/libjpeg_turbo/jcqnts2f-64.o ../../third_party/libjpeg_turbo/simd/jcqnts2f-64.asm
> yasm: FATAL: unable to open include file `jsimdcfg.inc'
> ...
> Shouldn't the proper fix be to add the (missing?) support for .inc files to GN so yasm can work (or is the problem somewhere else?).

 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cb3f4114b1b74302570e17e09b59b097d6ee406b

commit cb3f4114b1b74302570e17e09b59b097d6ee406b
Author: sdefresne <sdefresne@chromium.org>
Date: Wed Apr 13 09:05:34 2016

Revert "[iOS] Defaults to use system libjpeg on iOS."

Fix the configuration of libjpeg_turbo to build on iOS by using the
same settings as Mac. This is not used by Chrome on iOS AFAIK, but
appears to be used by WebRTC.

BUG= 602682 

Review URL: https://codereview.chromium.org/1886443002

Cr-Commit-Position: refs/heads/master@{#386941}

[modify] https://crrev.com/cb3f4114b1b74302570e17e09b59b097d6ee406b/build/secondary/third_party/libjpeg_turbo/BUILD.gn
[modify] https://crrev.com/cb3f4114b1b74302570e17e09b59b097d6ee406b/third_party/BUILD.gn

Status: Fixed (was: Started)

Sign in to add a comment