jhbuild on FreeBSD

This is being used as a scratch space for people working on getting jhbuild running on FreeBSD.

These instructions assume an install of FreeBSD 10.3.

Working so far

This is what currently works (± caveats below):

...almost everything now.

jhbuild

Expect build problems with: gdm.

Problems in meta-gnome-apps-tested: nemiver.

Jhbuild tinderbox

We have a couple of tinderboxes starting to get set up:

Packages to install

Install the following packages via pkg.

pkg install alsa-lib argyllcms automake avahi-app bash bash-completion bison cairomm cmake cracklib cups cyrus-sasl db5 dbus dbus-glib desktop-file-utils docbook-xsl docbook-utils e2fsprogs-libuuid enchant exempi gettext git gmake gmime26 gnutls graphviz hyphen icon-naming-utils icu intltool iso-codes itstool ja-anthy jpeg-turbo json-c ko-libhangul krb5 lcms2 libEGL libGL libGLU libXcomposite libXft libXtst libarchive libcanberra libcanberra-gtk3 libdmapsharing libdvdread libexif libglesv2 libgphoto2 libical libmusicbrainz5 liboauth libproxy libpwquality libraw libsndfile libtasn1 libtool libunistring libv4l libvpx libxkbfile libxklavier libxslt llvm37 mpfr neon nettle nss opus p5-Text-CSV pcre2 pixman pkgconf png polkit poppler-glib python py27-cairo py27-gobject3 py27-libxml2 py27-rdflib py34-cairo py34-gobject3 py34-speech-dispatcher ragel raptor2 ruby samba36-libsmbclient shared-mime-info speex spidermonkey185 spidermonkey170 spidermonkey24 sqlite3 startup-notification taglib tiff vala wavpack webkit-gtk3 webp wget xauth xkeyboard-config xorg xorg-macros xtrans yajl zh-libpinyin

Drop gcc and g++ symlinks if you have the gcc package installed.

rm /usr/local/bin/gcc
rm /usr/local/bin/g++

jhbuildrc

os.environ['MAKE']='gmake LIBTOOL=/usr/local/bin/libtool'

dvcs_mirror_dir = '~/.cache/git'

# .pc files from FreeBSD base system is missing
skip = ['openssl']

# ports vs. base-system library difficulties
module_autogenargs['gnome-control-center'] = 'KRB5_CONFIG=/usr/local/bin/krb5-config'

# -Werror
module_autogenargs['easytag'] = '--disable-Werror'
module_autogenargs['gnome-photos'] = '--disable-Werror'
module_autogenargs['gupnp-av'] = '--disable-Werror'
module_autogenargs['libgdata'] = '--disable-always-build-tests'
module_autogenargs['rhythmbox'] = '--disable-more-warnings'
module_autogenargs['yelp'] = '--disable-Werror'

# Unintentional upstream Linux/GNUisms
module_autogenargs['cheese'] = '--disable-lcov'
module_autogenargs['gjs'] = '--disable-coverage'
module_autogenargs['gst-plugins-bad'] = '--disable-qt'
module_autogenargs['pulseaudio'] = '--disable-xen'

# configure script contains bashisms
module_extra_env['aisleriot'] = {'CONFIG_SHELL': '/usr/local/bin/bash'}
module_extra_env['dleyna-connector-dbus'] = {'CONFIG_SHELL': '/usr/local/bin/bash'}
module_extra_env['dleyna-renderer'] = {'CONFIG_SHELL': '/usr/local/bin/bash'}

# format string
module_extra_env['anjuta'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['brasero'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['cheese'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['clutter'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['epiphany'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['evince'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['ghex'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['gitg'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['gnumeric'] = {'CFLAGS': '-Wno-error=format-nonliteral'} 
module_extra_env['goffice'] = {'CFLAGS': '-Wno-error=format-nonliteral'} 
module_extra_env['mutter'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['nautilus-sendto'] = {'CFLAGS': '-Wno-error=format-nonliteral'} 
module_extra_env['totem'] = {'CFLAGS': '-Wno-error=format-nonliteral'}
module_extra_env['vinagre'] = {'CFLAGS': '-Wno-error=format-nonliteral'}

Outstanding FreeBSD issues

These are the current high-priority pain points on the FreeBSD side:

  • FreeBSD's libtool set RPATH or RUNPATH on wrong things
    • libraries built by jhbuild may find wrong dependencies at runtime
    • undefined reference problem may occur
  • FreeBSD does not install some .pc files in the base system
  • we need to have a working systemd-logind implementation
    • the last version of gdm supporting consolekit is 3.17.2
  • we need to solve the udev issue as well -- but GLib may soon grow an abstraction for this
    • long term, this will be solved by adding an abstraction to GLib (desrt)
  • we need a better solution for hwdb lookup -- colord builds, but isn't functioning correctly
    • udev upstream thinks that colord's usage of hwdb is incorrect
    • colord upstream says it has to do with some weird requirement of the X server
    • maybe fixed with new udev API... (see above)
  • there is no way to do reverse-file lookup for uninstalled packages via 'pkg'. This is required for jhbuild sysdeps --install.
  • someone needs to port NetworkManager to FreeBSD

  • someone needs to port bluez to FreeBSD
  • FreeBSD's libgeom has some symbols in the g_ namespace -- including g_close(), which directly conflicts with GLib

    • 2014-02-05: desrt sent email about this to pjd@, waiting for reply
  • /usr/bin/krb5-config comes in PATH before /usr/local/bin/krb5-config, but the one from /usr/local is required for gnome-control-center.
  • we need python3 support enabled in the speech-dispatcher package
  • FreeBSD's signal.h doesn't define ucontext_t and mcontext_t

Outstanding GNOME/freedesktop issues

There are some things that are going to go wrong during the build. The links below have patches or suggested workarounds.

Low priority "nice to fix" issues

  • format strings
    • anjuta, brasero, cheese, clutter, epiphany, evince, ghex, gitg, gnumeric, goffice, gthumb, mutter, nautilus-sendto, totem, vinagre
  • incorrect jhbuild rules
    • meld: python setup.py, not autotools
  • build options should be dropped or changed
    • rhythmbox: -Werror, -std=gnu89
  • make clean or make distclean break the build
    • some source files are removed
      • gnome-dictionary: data/gnome-dictionary.appdata.xml.in should not be removed
      • gnome-sound-recorder: data/application.css should not be removed
    • some stamps are not removed
      • grilo: tools/vala/grilo-test.c not found
    • some files generated by config.status are removed by make clean
      • uhttpmock: libuhttpmock/libuhttpmock-0.0.pc should not be removed
    • generated include Makefiles are removed
      • telepathy-glib: Makefile:483: _gen/.deps/svc-connection.Plo: No such file or directory

    • possible race condition in Makefiles
      • cheese: find: ./.libs: No such file or directory
    • unknown
      • orca: gmake[3]: *** No rule to make target orca', needed by all-am'. Stop.

      • caribou: mv: rename libcaribou_la_vala.stamp-t to libcaribou_la_vala.stamp: No such file or directory
  • GCC extensions
    • most GCC extensions are not required, remove it will increase portability.
    • #define (args...): named variadic macros

    • (other_argument, ##__VA_ARGS__): token pasting of ',' and __VA_ARGS__

    • case (uintptr_t)SOME_CONSTANT: expression is not an integer constant expression

    • arithmetic on a void*
    • zero size arrays
  • testsuite issues

Solved issues

Invalid issues

Rejected upstream

Projects/Jhbuild/FreeBSD (last edited 2016-07-23 16:31:46 by TingweiLan)