-DPOSIX

54 views
Skip to first unread message

Thiago Farina

unread,
Apr 16, 2015, 6:12:55 PM4/16/15
to Chromium-dev
Anyone knows why we do -DPOSIX? It breaks upstream re2 and makes hard for us to unfork it.

The error is:

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/child/webcrypto/test/content_unittests.test_helpers.o.d -DCHROMIUM_BUILD -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_CONFIGURATION_POLICY -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_REMOTING=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_HIDPI=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DENABLE_BACKGROUND=1 -DENABLE_PRE_SYNC_BACKUP -DCR_CLANG_REVISION=233105-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DGL_GLEXT_PROTOTYPES -DMOJO_USE_SYSTEM_IMPL -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DGTEST_HAS_RTTI=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUCONFIG_NO_NON_HTML5_CONVERSION=1 -DU_CHARSET_IS_UTF8=1 -DU_STATIC_IMPLEMENTATION -DSK_LEGACY_DRAWPICTURECALLBACK -DSK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS -DSK_SUPPORT_GPU=1 -DUSE_LIBJPEG_TURBO -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DUNIT_TEST -DLEVELDB_PLATFORM_CHROMIUM=1 -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DLINUX -DWEBRTC_LINUX -DPOSIX -DWEBRTC_POSIX -DMESA_EGL_NO_X11_HEADERS -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -I../.. -Igen -I../../third_party/khronos -I../../gpu -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../third_party/libwebp -I../../testing/gtest/include -I../../third_party/WebKit -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -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/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/libjpeg_turbo -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/ots/include -I../../third_party/qcms/src -I../../v8/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/protobuf -I../../third_party/mojo/src -Igen/third_party/mojo/src -I../../net/third_party/nss/ssl -I/usr/include/nss -I/usr/include/nspr -I../../testing/gmock/include -I../../third_party/re2 -Igen -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/webrtc/overrides -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../testing/gtest/include -I../../third_party -I../../third_party/mesa/src/include -I../../third_party/webrtc/overrides -I../../third_party -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I../../third_party/libvpx/source/libvpx -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4 -m64 -march=x86-64 -funwind-tables -fPIC -pipe -pthread -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -Wall -Wsign-compare -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-char-subscripts -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-reserved-user-defined-literal -Wno-inconsistent-missing-override -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -fno-ident -fdata-sections -ffunction-sections -O2 -g1 -gsplit-dwarf -Wno-header-guard -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../content/child/webcrypto/test/test_helpers.cc -o obj/content/child/webcrypto/test/content_unittests.test_helpers.o
In file included from ../../content/child/webcrypto/test/test_helpers.cc:27:
../../third_party/re2/re2/re2.h:254:5: error: expected identifier
    POSIX, // POSIX syntax, leftmost-longest match
    ^
<command line>:79:15: note: expanded from here
#define POSIX 1
              ^
1 error generated.

The log URL is 

Nico Weber

unread,
Apr 16, 2015, 6:20:00 PM4/16/15
to Thiago Farina, Chromium-dev
Looks like there isn't a great reason: https://code.google.com/p/chromium/codesearch#search/&q=%23if.*def.*%5CbPOSIX%5Cb&sq=package:chromium&type=cs

We can probably only define this while ICU is being compiled.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Thiago Farina

unread,
Apr 16, 2015, 6:29:36 PM4/16/15
to Nico Weber, Chromium-dev
On Thu, Apr 16, 2015 at 7:14 PM, Nico Weber <tha...@chromium.org> wrote:
Where are we defining it? Or put on other way, from where are we leaking it?


Is it from common.gypi that this is happening for the other unrelated targets?
 
-- 
Thiago Farina

Scott Hess

unread,
Apr 16, 2015, 6:32:22 PM4/16/15
to tfarina, Nico Weber, Chromium-dev
On Thu, Apr 16, 2015 at 3:28 PM, Thiago Farina <tfa...@chromium.org> wrote:
> On Thu, Apr 16, 2015 at 7:14 PM, Nico Weber <tha...@chromium.org> wrote:
>> Looks like there isn't a great reason:
>> https://code.google.com/p/chromium/codesearch#search/&q=%23if.*def.*%5CbPOSIX%5Cb&sq=package:chromium&type=cs
>>
> Where are we defining it? Or put on other way, from where are we leaking it?
>
> I mean, I see it being defined in
> https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libjingle/libjingle.gyp&ct=rc&cd=2&q=%5C'POSIX%5C',&sq=package:chromium&l=133&dr=C
> and
> https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libjingle/source/talk/build/common.gypi&q=%5C'POSIX%5C',&sq=package:chromium&l=136&type=cs

Since it's not in any headers, it probably shouldn't be in
libjingle.gyp's direct_dependent_settings section. I think.

-scott

Thiago Farina

unread,
Apr 16, 2015, 7:04:38 PM4/16/15
to Scott Hess, Nico Weber, Chromium-dev
I made CL https://webrtc-codereview.appspot.com/46049004 to try to fix this in WebRTC, then I will go and fix libjingle.gyp in Chromium.

--
Thiago Farina

Paweł Hajdan, Jr.

unread,
Apr 17, 2015, 10:15:10 AM4/17/15
to Thiago Farina, Scott Hess, Nico Weber, Chromium-dev
For some context, here's a bug I filed some time ago about this in re2: https://groups.google.com/d/msg/re2-dev/afn88d_oLr4/cbvxGpLD8d4J

The upstream's reply was "Somehow this hasn't come up before in any other uses. Given that, I'd prefer not to change the public RE2 API. If you need to patch RE2 when importing it into Chromium that seems fine. Arguably Chromium should be using a less broad #define too."

Paweł

--
Reply all
Reply to author
Forward
0 new messages