Re: Buiiding LO6.1.4.2 with pdfium emits “error: invalid conversion from ‘int’ to ‘boolean’ [-fpermissive]”

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17/01/2019 10:35, Дилян Палаузов wrote:
the problematic call is:

S=/src/libreoffice-6.1.4.2 && B=$S/build && I=$B/instdir && W=$B/workdir &&  mkdir -p
$W/GenCxxObject/UnpackedTarball/pdfium/core/fxcodec/codec/
$W/Dep/GenCxxObject/UnpackedTarball/pdfium/core/fxcodec/codec/ && cd /src/libreoffice-6.1.4.2 &&    g++
-DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DCPPU_ENV=gcc3 -DLINUX -DNDEBUG -DOSL_DEBUG_LEVEL=0 -DUNIX
-DUNX -DX86_64 -D_PTHREADS -D_REENTRANT -DPDFIUM_DLLIMPLEMENTATION -DUSE_SYSTEM_LCMS2 -DUSE_SYSTEM_LIBJPEG
-DUSE_SYSTEM_ZLIB -DMEMORY_TOOL_REPLACES_ALLOCATOR -DUNICODE  -DSYSTEM_ZLIB  -DDEFINE_PS_TABLES_DATA   -
fvisibility=hidden    -Wall -Wno-missing-braces -Wnon-virtual-dtor -Wendif-labels -Wextra -Wundef -Wunreachable-code
-Wunused-macros -finput-charset=UTF-8 -fmessage-length=0 -fno-common -pipe  -Wduplicated-cond -Wlogical-op -Wshift-
overflow=2 -Wunused-const-variable=1 -Wno-cast-function-type -fvisibility-inlines-hidden -fstack-protector-strong -fPIC
-Wshadow -Woverloaded-virtual -std=gnu++14   -DEXCEPTIONS_ON -fexceptions -fno-enforce-eh-specs -O3 -pipe   -w  -
DLIBO_INTERNAL_ONLY  -c $W/UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_jpeg.cpp -o
$W/GenCxxObject/UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_jpeg.o -MMD -MT
$W/GenCxxObject/UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_jpeg.o -MP -MF
$W/Dep/GenCxxObject/UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_jpeg.d_ -I$W/UnpackedTarball/pdfium
-I$W/UnpackedTarball/pdfium/third_party -I$S/include  -I/opt/jdk/include -I/opt/jdk/include/linux -I$B/config_host    -
isystem /usr/local/include -Wno-long-long   -isystem /usr/local/include/freetype2 -isystem /usr/local/include/libpng16
-isystem /usr/local/include -isystem /usr/local/include/harfbuzz -isystem /usr/local/include/glib-2.0 -isystem
/usr/local/lib64/glib-2.0/include -isystem /usr/local/include

When I pass -E to the compiler, it prints:

# 317 "/usr/local/include/jmorecfg.h" 3 4
typedef enum { FALSE = 0, TRUE = 1 } boolean;
# 28 "/usr/local/include/jpeglib.h" 2 3 4

So #include "jpeglib.h" implies #include "jmorecfg.h" and libreoffice-
6.1.4.2/build/workdir/UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_jpeg.cpp does #include "jpeglib.h".

This code:
typedef enum { a = 1, b = 2} c;

c x () {  return 2;}

also fails compiling with
error: invalid conversion from ‘int’ to ‘c’ [-fpermissive]
  c x () {  return 2;}
                   ^
jmorecfg.h comes from jpeg9-c.  jpeg-turbo-1.5.3 has another jmorecfg.h, where boolean is defined as int.

So do whatever it takes to make LO's external/pdfium/ copy work with your system's jpeg9-c (or abandon the idea of building LO against it). Either do it just locally, or, if it requires patching pdfium, we'd also appreciate it if you sent a patch for LO or, even better, sent a patch to the upstream of LO's external/pdfium/ copy. It is unlikely that anybody else would do the integration work for that specific jpeg9-c for you.
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux