New issue
Advanced search Search tips

Issue 703343 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Chrome android build fails with freetype errors

Project Member Reported by asvitk...@chromium.org, Mar 20 2017

Issue description

Error output:

../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -MMD -MF obj/third_party/freetype/freetype/psnames.o.d -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON -DFT_CONFIG_MODULES_H=\<freetype-custom-config/ftmodule.h\> -DFT_CONFIG_OPTIONS_H=\<freetype-custom-config/ftoption.h\> -DV8_DEPRECATION_WARNINGS -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DDISABLE_NACL -DSAFE_BROWSING_DB_REMOTE -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -DANDROID -DHAVE_SYS_UIO_H -DANDROID_NDK_VERSION=r12b -DCOMPONENT_BUILD -D__GNU_SOURCE=1 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -I../.. -Igen -I../../third_party/freetype/include -I../../third_party/freetype/src/include -I../../third_party/libpng -I../../third_party/zlib -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -ffunction-sections -fno-short-enums -finline-limit=64 -march=armv7-a -mfloat-abi=softfp -mtune=generic-armv7-a -fno-tree-sra -fno-caller-saves -mfpu=neon -mthumb -mthumb-interwork -Os -fno-omit-frame-pointer -gdwarf-3 -g2 --sysroot=../../third_party/android_tools/ndk/platforms/android-16/arch-arm -fvisibility=hidden -Wno-psabi -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter  -c ../../third_party/freetype/src/src/psnames/psnames.c -o obj/third_party/freetype/freetype/psnames.o
In file included from ../../third_party/freetype/include/freetype.h:34:0,
                 from ../../third_party/freetype/src/src/psnames/pspic.c:20,
                 from ../../third_party/freetype/src/src/psnames/psnames.c:22:
../../third_party/freetype/src/src/psnames/psmodule.c: In function 'ps_unicodes_init':
../../third_party/freetype/src/src/psnames/psnamerr.h:34:24: error: 'PSnames_Err_No_Unicode_Glyph_Name' undeclared (first use in this function)
 #define FT_ERR_PREFIX  PSnames_Err_
                        ^
../../third_party/freetype/include/fttypes.h:577:30: note: in definition of macro 'FT_ERR_XCAT'
 #define FT_ERR_XCAT( x, y )  x ## y
                              ^
../../third_party/freetype/include/internal/ftdebug.h:213:24: note: in expansion of macro 'FT_ERR_CAT'
 #define FT_THROW( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )
                        ^
../../third_party/freetype/include/internal/ftdebug.h:213:36: note: in expansion of macro 'FT_ERR_PREFIX'
 #define FT_THROW( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )
                                    ^
../../third_party/freetype/src/src/psnames/psmodule.c:376:19: note: in expansion of macro 'FT_THROW'
           error = FT_THROW( No_Unicode_Glyph_Name );
                   ^
../../third_party/freetype/src/src/psnames/psnamerr.h:34:24: note: each undeclared identifier is reported only once for each function it appears in
 #define FT_ERR_PREFIX  PSnames_Err_
                        ^
../../third_party/freetype/include/fttypes.h:577:30: note: in definition of macro 'FT_ERR_XCAT'
 #define FT_ERR_XCAT( x, y )  x ## y
                              ^
../../third_party/freetype/include/internal/ftdebug.h:213:24: note: in expansion of macro 'FT_ERR_CAT'
 #define FT_THROW( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )
                        ^
../../third_party/freetype/include/internal/ftdebug.h:213:36: note: in expansion of macro 'FT_ERR_PREFIX'
 #define FT_THROW( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )
                                    ^
../../third_party/freetype/src/src/psnames/psmodule.c:376:19: note: in expansion of macro 'FT_THROW'
           error = FT_THROW( No_Unicode_Glyph_Name );
                   ^
[641/8266] ACTION //net/data/ssl/wosign:wosign_domains(//build/toolchain/android:android_arm)

Happens with android builds with the following gn set ups:

use_signing_keys = true
enable_incremental_javac = true
target_os = "android"
disable_incremental_isolated_processes = true

and these ones:

target_os = "android"
target_cpu = "arm"
is_debug = false
is_official_build = true
is_chrome_branded = true
use_signing_keys = true
android_channel = "canary"


Both synced today:
   src/ at 0256b97f24a3a7bc58cef9f291db1e3de2528f2a
   src/clank/ at e7cb2310ff47ca21475d6ffe54799a4a43110bdf

I also made sure to run the install deps scripts:
install-build-deps-android.sh
install-build-deps.sh

And they didn't help.

Running on: Ubuntu 14.04 LTS (upgraded from: Ubuntu 12.04.1 LTS)
(according to lsb_release -a)
 

Comment 1 by drott@chromium.org, Mar 21 2017

Does running the following command in your chromium/src directory reveal more than one directory?

$ find -iname "freetype-custom-config" -type d 
./third_party/freetype/include/freetype-custom-config

Comment 2 by drott@chromium.org, Mar 21 2017

The following command succeeds on my machine:

[1/2] ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -MMD -MF obj/third_party/freetype/freetype/psnames.o.d -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON -DFT_CONFIG_MODULES_H=\<freetype-custom-config/ftmodule.h\> -DFT_CONFIG_OPTIONS_H=\<freetype-custom-config/ftoption.h\> -DV8_DEPRECATION_WARNINGS -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DDISABLE_NACL -DSAFE_BROWSING_DB_REMOTE -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -DANDROID -DHAVE_SYS_UIO_H -DANDROID_NDK_VERSION=r12b -DCOMPONENT_BUILD -D__GNU_SOURCE=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Igen -I../../third_party/freetype/include -I../../third_party/freetype/src/include -I../../third_party/libpng -I../../third_party/zlib -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -ffunction-sections -fno-short-enums -finline-limit=64 -march=armv7-a -mfloat-abi=softfp -mtune=generic-armv7-a -fno-tree-sra -fno-caller-saves -mfpu=neon -mthumb -mthumb-interwork -Os -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -gdwarf-3 -g2 --sysroot=../../third_party/android_tools/ndk/platforms/android-16/arch-arm -fvisibility=hidden -Wno-psabi -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter  -c ../../third_party/freetype/src/src/psnames/psnames.c -o obj/third_party/freetype/freetype/psnames.o

with

target_os = "android"
target_cpu = "arm"
is_debug = false
#is_official_build = true
#is_chrome_branded = true
#use_signing_keys = true
android_channel = "canary"
is_component_build = true

(I added is_component_build=true because your build failure line had -DCOMPONENT_BUILD)


Comment 3 by drott@chromium.org, Mar 21 2017

Status: Fixed (was: Assigned)
After working with asvitkine@ on resolving this, it seems that happened in this case is: Old checkouts (before commit 7ffe490b7c43e2f9393caf283d809c1983bbeb3e from June 2015) have had a third_party/freetype/.git folder from an old DEPS file which checked out freetype to this directory. 

Assuming your Chromium checkout is in ./chromium:

If git rev-parse --show-toplevel in chromium/src/third_party/freetype shows something other than chromium/src, you're affected by this problem.

I would recommend the following cleanup steps:
1) cd chromium/src/third_party/freetype/
2) rm -rf .git
3) git clean -dfx .
4) git checkout .
5) cd ../..
6) gclient sync

I can try to help if someone is still experiencing issues, just get in touch.

Comment 4 by drott@chromium.org, Mar 21 2017

Cc: bunge...@chromium.org
Thanks for this - got me out of a frustrating spot.


Sign in to add a comment