New issue
Advanced search Search tips

Issue 879900 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

pdfium_mem_buffer_file_write.h: missing include of stdint.h

Reported by haraldvd...@gmail.com, Sep 2

Issue description

Chrome Version       : 70.0.3534.4
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari:
    Firefox:
       Edge:

What steps will reproduce the problem?
(1) Build Chromium with GCC 8.2.0.
(2)
(3)

What is the expected result?
Successful build.

What happens instead?
Failed build.

Please provide any additional information below. Attach a screenshot if
possible.

pdfium_mem_buffer_file_write.h uses uint8_t but does not include any header guaranteed to provide it. With GCC 8.2.0 and libstdc++, it does not get declared. Aside from one unrelated problem which I will report separately, the build with the attached patch succeeded.

I checked <https://chromium.googlesource.com/chromium/src/+/master/pdf/pdfium/pdfium_mem_buffer_file_write.h> to see if this was already known and fixed.

From my build log:
[...]
FAILED: obj/pdf/pdf/pdfium_mem_buffer_file_write.o 
g++-8.2.0 -MMD -MF obj/pdf/pdf/pdfium_mem_buffer_file_write.o.d -DPDFIUM_PRINT_TEXT_WITH_GDI -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_
CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLI
B_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DWEBP_EXTERN=extern -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_NO_PROTOTYPES -DV8_DEPRECATION_WARNINGS -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD
=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DS
K_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -DFT_CO
NFIG_CONFIG_H=\"freetype-custom-config/ftconfig.h\" -DFT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\" -DFT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\" -DPDFIUM_REQUIRED_MODULES -DCHROMIUM_RESTRICT_VISIBILITY -I../../
third_party/pdfium -I../.. -Igen -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -I../../third_party/vulkan/include -I../../v8/include -Igen/v8/include -I../../third_party/icu/so
urce/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../skia/config -I../../skia/ext -I../../third_party/skia/in
clude/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/
images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/util
s -I../../third_party/vulkan/include -I../../third_party/skia/third_party/vulkanmemoryallocator -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/skia/modules/skottie/include -I../../third_party/vulka
n/include -I../../third_party/freetype/include -I../../third_party/freetype/src/include -I../../third_party/harfbuzz-ng/src/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D_
_TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -m64 -march=x86-64 -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-missing-field-ini
tializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -I/usr/lib64/libffi-3.2.1/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss
 -I/usr/include/nspr -std=gnu++14 -Wno-narrowing -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -mtune=generic -O2 -c ../../pdf/pdfium/pdfium_mem_buffer_file_write.cc -o obj/pdf/pdf/pdfium_mem_buffer_file_write.o
In file included from ../../pdf/pdfium/pdfium_mem_buffer_file_write.cc:5:
../../pdf/pdfium/pdfium_mem_buffer_file_write.h:22:21: error: 'uint8_t' was not declared in this scope
   const std::vector<uint8_t>& buffer() const { return buffer_; }
                     ^~~~~~~
[...]
 
chromium-pdfium-include.patch
231 bytes Download
Labels: Needs-Triage-M70
Cc: vamshi.kommuri@chromium.org
Components: Build
Labels: Triaged-ET TE-NeedsTriageHelp
Thanks for filing the issue!

As the issue seems to be related to building of chromium, which is out of scope for us to triage further hence adding appropriate component and label "TE-NeedsTriageHelp", requesting the respective team to have a look into this and help in further triaging it.
Components: Internals>Plugins>PDF
Owner: hnakashima@chromium.org
Status: Assigned (was: Unconfirmed)
Labels: -TE-NeedsTriageHelp -Needs-Triage-M70
Status: Started (was: Assigned)
Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 5

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

commit e3ad3deb6a6e79284f3748fa7410311d87df91c5
Author: Henrique Nakashima <hnakashima@chromium.org>
Date: Tue Sep 04 16:49:51 2018

IWYU: stdint.h in pdfium_mem_buffer_file_write.h for uint8_t

Bug:  879900 
Change-Id: I9c15d1c280a23c53d31f2d72c9d0d1db79eab886
Reviewed-on: https://chromium-review.googlesource.com/1204410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588547}
[modify] https://crrev.com/e3ad3deb6a6e79284f3748fa7410311d87df91c5/pdf/pdfium/pdfium_mem_buffer_file_write.h

Sign in to add a comment