I need to build Chromium on a machine that runs Fedora 20 today, and I had some trouble due to this error:

[12269/24399] LINK gles2_conform_support
FAILED: c++ -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -pthread -Wl,-z,noexecstack -fPIC -B/home/blong/workspace/chromium/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -L. -Wl,--export-dynamic -Wl,-uIsHeapProfilerRunning,-uProfilerStart -Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi -Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl -Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv -m64 -Wl,--icf=none -fuse-ld=gold -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -o gles2_conform_support -Wl,--start-group obj/gpu/gles2_conform_support/native/gles2_conform_support.main.o obj/gpu/gles2_conform_support/native/gles2_conform_support.egl_native_aura.o obj/gpu/gles2_conform_support/native/gles2_conform_support.egl_native.o obj/gpu/gles2_conform_support/native/gles2_conform_support.egl_native_x11.o obj/gpu/gles2_conform_support/gles2_conform_support.gles2_conform_support.o obj/gpu/gles2_conform_support/libegl_native.a obj/base/third_party/dynamic_annotations/libdynamic_annotations.a obj/gpu/libgles2_c_lib_nocheck.a obj/base/allocator/liballocator.a obj/base/libbase.a obj/base/libbase_static.a obj/base/allocator/liballocator_extension_thunks.a obj/third_party/modp_b64/libmodp_b64.a obj/base/libsymbolize.a obj/base/libxdg_mime.a obj/third_party/libevent/libevent.a obj/gpu/libcommand_buffer_service.a obj/gpu/libcommand_buffer_common.a obj/gpu/command_buffer/libgles2_utils.a obj/gpu/libdisk_cache_proto.a obj/third_party/protobuf/libprotobuf_lite.a obj/crypto/libcrcrypto.a obj/net/third_party/nss/libcrssl.a obj/third_party/re2/libre2.a obj/third_party/smhasher/libcityhash.a obj/ui/gfx/libgfx.a obj/base/libbase_i18n.a obj/third_party/icu/libicui18n.a obj/third_party/icu/libicuuc.a obj/third_party/icu/libicudata.a obj/skia/libskia_library.a obj/skia/libskia_opts.a obj/skia/libskia_opts_ssse3.a obj/third_party/zlib/libchrome_zlib.a obj/third_party/sfntly/libsfntly.a obj/skia/libskia_chrome.a obj/skia/libskia_chrome_opts.a obj/third_party/libpng/libpng.a obj/ui/gfx/libgfx_geometry.a obj/third_party/libjpeg_turbo/libjpeg_turbo.a obj/ui/gfx/x/libgfx_x11.a obj/ui/gl/libgl_wrapper.a obj/ui/events/platform/libevents_platform.a obj/third_party/angle/src/libtranslator.a obj/third_party/angle/src/libpreprocessor.a obj/gpu/libgles2_implementation_client_side_arrays_no_check.a obj/gpu/libgles2_cmd_helper.a obj/gpu/libcommand_buffer_client.a obj/gpu/libgpu_config.a obj/build/linux/libpci.a obj/third_party/libXNVCtrl/libXNVCtrl.a obj/gpu/libgpu_ipc.a obj/ipc/libipc.a obj/ui/base/libui_base.a obj/net/libnet.a obj/sdch/libsdch.a obj/url/liburl_lib.a obj/build/linux/libgio.a obj/ui/events/libevents_base.a obj/ui/events/libdom4_keycode_converter.a obj/ui/events/libevents.a obj/ui/events/libgesture_detection.a obj/ui/events/platform/x11/libx11_events_platform.a  -Wl,--end-group -lrt -ldl -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -lfontconfig -lfreetype -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 -lharfbuzz -lX11 -lXi -lXcomposite -lXext -lgconf-2 -lgio-2.0 -lresolv -lXcursor -lXfixes -lXrender -lexpat
/usr/bin/ld.gold: warning: hidden symbol 'eglQueryContext' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglGetCurrentContext' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglMakeCurrent' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglGetProcAddress' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglQueryString' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglGetCurrentSurface' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglSwapBuffers' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglCreatePbufferSurface' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglDestroySurface' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: warning: hidden symbol 'eglChooseConfig' in obj/gpu/gles2_conform_support/libegl_native.a(obj/gpu/gles2_conform_support/egl/egl_native.egl.o) is referenced by DSO /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libcairo.so
/usr/bin/ld.gold: error: treating warnings as errors
collect2: error: ld returned 1 exit status

I assume either Fedora or Chromium are doing something weird while building their libraries, but as a developer, I just want the build to work.

The documentation says that I can ignore errors like this by defining werror, as in:

# one-off
build/gyp_chromium -Dwerror=
# via variable
export GYP_DEFINES="werror="
build/gyp_chromium

Unfortunately, my problem was with the linker, so the above didn't work. I noticed that the linker command says -Wl,--fatal-warnings, so I did:

git grep -- -Wl,--fatal-warnings

This found several .gyp files, and looking in build/command.gypi, I find this:

['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', {
  'target_defaults': {
    'ldflags': [
      '-Wl,--fatal-warnings',
    ],
  },
}],

On a whim, I guessed that disable_fatal_linker_warnings works like werror, so I tried this:

build/gyp_chromium -Ddisable_fatal_linker_warnings=

Once I confirmed that that worked, I added it to my .bashrc so I won't need to deal with this in the future:

echo 'export GYP_DEFINES="disable_fatal_linker_warnings="' >> ~/.bashrc

I figured I'd document this, since searching for the error message didn't find anything previously. I also opened a bug report, but it's unclear whose bug this is.