Bug 201407

Summary: mail/thunderbird: Fails to build
Product: Ports & Packages Reporter: Carlos J Puga Medina <cjpm>
Component: Individual Port(s)Assignee: freebsd-gecko (Nobody) <gecko>
Status: Closed FIXED    
Severity: Affects Some People CC: callumgibson, cjpm, kwm
Priority: --- Flags: jbeich: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   

Description Carlos J Puga Medina 2015-07-07 16:42:23 UTC
thunderbird port fails to build on 10.1-STABLE/i386

% uname -a
FreeBSD bsd 10.1-STABLE FreeBSD 10.1-STABLE #0 r282689: Sun May 10 02:05:35 UTC 2015     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386

% make -C /usr/ports/mail/thunderbird showconfig
===> The following configuration options are available for thunderbird-31.7.0_1:
     CANBERRA=on: Sound theme alerts
     DBUS=on: D-Bus IPC system support
     DEBUG=off: Build with debugging support
     DTRACE=off: Build with DTrace probes
     ENIGMAIL=on: Enigmail extension
     GCONF=on: GConf configuration backend support
     GIO=on: Use GIO for file I/O
     GNOMEUI=off: libgnomeui support module
     GSTREAMER=on: Multimedia support via GStreamer
     LIBPROXY=off: Proxy support via libproxy
     LIGHTNING=on: Calendar extension
     LOGGING=on: Additional log messages
     OPTIMIZED_CFLAGS=off: Use extra compiler optimizations
     PGO=off: Use Profile-Guided Optimization
     PROFILE=off: Build with profiling support
     TEST=off: Build and/or run tests
====> Options available for the multi AUDIO: you have to choose at least one of them
     ALSA=on: ALSA audio architecture support
     PULSEAUDIO=off: PulseAudio sound server support
===> Use 'make config' to modify these settings

build log: 
<snip>
 INPUT("../../../gfx/skia/SkTLS_pthread.o")
    INPUT("../../../gfx/skia/SkThreadUtils_pthread.o")
    INPUT("../../../gfx/skia/opts_check_SSE2.o")
    INPUT("../../../gfx/skia/SkBitmapFilter_opts_SSE2.o")
    INPUT("../../../gfx/skia/SkBitmapProcState_opts_SSE2.o")
    INPUT("../../../gfx/skia/SkBitmapProcState_opts_SSSE3.o")
    INPUT("../../../gfx/skia/SkBlitRect_opts_SSE2.o")
    INPUT("../../../gfx/skia/SkBlitRow_opts_SSE2.o")
    INPUT("../../../gfx/skia/SkBlurImage_opts_SSE2.o")
    INPUT("../../../gfx/skia/SkMorphology_opts_SSE2.o")
    INPUT("../../../gfx/skia/SkUtils_opts_SSE2.o")
    INPUT("../../../gfx/skia/SkXfermode_opts_none.o")

../../../ipc/chromium/process_util_bsd.o: In function `base::LaunchApp(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::vector<std::__1::pair<int, int>, std::__1::allocator<std::__1::pair<int, int> > > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, base::ChildPrivileges, bool, int*, base::ProcessArchitecture)':
/wrkdirs/usr/ports/mail/thunderbird/work/comm-esr31/mozilla/ipc/chromium/src/base/process_util_bsd.cc:(.text._ZN4base9LaunchAppERKNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_INS0_4pairIiiEENS5_ISD_EEEERKNS0_3mapIS7_S7_NS0_4lessIS7_EENS5_INSC_IKS7_S7_EEEEEENS_15ChildPrivilegesEbPiNS_19ProcessArchitectureE+0x10f): warning: undefined reference to `environ'
/usr/bin/ld: libxul.so: hidden symbol `FT_Get_X11_Font_Format' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Carlos J Puga Medina 2015-07-07 19:32:25 UTC
Full build log:

http://fbsd.es/~cpm/freebsd/logs/thunderbird-31.7.0_1.log
Comment 2 Callum Gibson 2015-07-08 11:47:07 UTC
Confirming this affects all mozilla-related ports including libxul, firefox(-esr) and I believe thunderbird too.

Through some investigation it appears to be a bug in ld in base. If you use ld from binutils instead, the libxul.so will build.

I couldn't find a way to make either clang nor ports use a non-default ld so I just hacked a symlink to get a working browser, but hopefully this information will be useful for someone who has more of a clue.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2015-07-16 10:39:39 UTC
Likely fixed by ports r391619.