site  contact  subhomenews

BlueGriffon compiled but is broken

November 26, 2021 — BarryK

Oh wow, finally got the WYSIWYG HTML editor BlueGriffon to compile, and run, here it is:

img1

However, it is completely broken, nothing works. Hardly anything anyway.

Here is the home page:

http://bluegriffon.org/

...the fact that it is not a https site is a hint that this might be a neglected project. Github page:

https://github.com/therealglazou/bluegriffon

It was a journey to compile, might as well post my notes here, for future reference. I am running EasyOS version 3.1.11, with glibc 2.33, gcc 9.3.0 and kernel 5.10.81. Firstly, the .mozconfig file:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/opt
mk_add_options MOZ_MAKE_FLAGS="-j2"
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-strip
#ac_add_options --enable-stdcxx-compat
ac_add_options --disable-tests
ac_add_options --disable-crashreporter
#ac_add_options --enable-jemalloc
ac_add_options --disable-webrtc
ac_add_options --disable-dbm
ac_add_options --disable-updater
ac_add_options --disable-sandbox
ac_add_options --enable-application=bluegriffon
#ac_add_options --enable-chrome-format=jar
ac_add_options --enable-chrome-format=omni
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --with-system-nss
ac_add_options --with-system-ffi
ac_add_options --enable-system-hunspell
ac_add_options --with-system-nspr
#ac_add_options --disable-webspeech
ac_add_options --disable-synth-speechd
ac_add_options --disable-stylo
#ac_add_options --disable-fmp4
ac_add_options --enable-ffmpeg
ac_add_options --disable-wmf
ac_add_options --disable-jack
#ac_add_options --disable-accessibility
ac_add_options --disable-dbus
ac_add_options --disable-gconf
ac_add_options --disable-necko-wifi
ac_add_options --enable-pulseaudio
ac_add_options --disable-safe-browsing
ac_add_options --enable-system-cairo
ac_add_options --enable-system-pixman
ac_add_options --with-default-mozilla-five-home=/usr/lib/bluegriffon
ac_add_options --with-pthreads
ac_add_options --with-system-bz2
ac_add_options --without-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-zlib
ac_add_options --disable-ldap
ac_add_options --disable-omx-plugin
#ac_add_options --disable-clang-plugin
ac_add_options --prefix=/usr
ac_add_options --host=x86_64-pc-linux-gnu
ac_add_options --disable-parental-controls
ac_add_options --enable-optimize='-O2'
#NOT SUPPORTED ANYMOREac_add_options --disable-skia
ac_add_options --disable-webrender

Here are my notes:

# git clone https://github.com/mozilla/gecko-dev bluegriffon-source
save the tarball for use, coz a huge 4GB+ download...
# dir2tgz bluegriffon-source
# cd bluegriffon-source
# git clone https://github.com/therealglazou/bluegriffon
# git reset --hard `cat bluegriffon/config/gecko_dev_revision.txt`
# patch -p 1 < bluegriffon/config/gecko_dev_content.patch
# patch -p 1 < bluegriffon/config/gecko_dev_idl.patch

install python2 pet.

got a compile failure, manually edited:
bluegriffon-source/tools/profiler/core/platform.h
ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1533969
...need to create a patch (their patch doesn't work). did this:

/*BKstatic inline pid_t gettid()
{
return (pid_t) syscall(SYS_gettid);
}*/
#define gettid() static_cast<pid_t>(syscall(SYS_gettid))

/*BKstatic inline pid_t gettid()
{
return (pid_t) syscall(SYS_thread_selfid);
}*/
#define gettid() static_cast<pid_t>(syscall(SYS_thread_selfid))

NOT DONE THIS, another possibility:
ref: https://www.mail-archive.com/blfs-dev@lists.linuxfromscratch.org/msg09065.html
has this:
sed -i -e "s/static inline pid_t gettid/inline pid_t gettid/"\
tools/profiler/core/platform.h

manually edited: NO
gfx/sfntly/cpp/src/sample/chromium/subsetter_impl.cc
NO: the errors are because icu>61, instead changed to --without-system-icu

# make -f client.mk build
...wants rust

in another terminal:
# curl -4 --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
NOchoose custom install, and type in "1.47.0" for Default toolchain.
NO: got a rust compile error. try this instead:
choose custom install, and type in "1.56.1" for Default toolchain.
nup, get this:
error[E0713]: borrow may still be in use when destructor runs
...this is a warning with rust 1.31.0, error on later versions.
ref: https://github.com/rust-lang/rust/issues/55259
DO THIS:
choose custom install, and type in "1.31.0" for Default toolchain.

installs to /root/.cargo

back in bluegriffon-source:

# export PATH="/root/.cargo/bin:${PATH}"
# export CC=gcc
# export CXX=g++
# export CFLAGS+=' -fno-delete-null-pointer-checks'
# export CXXFLAGS+=' -fno-delete-null-pointer-checks'
NO# export CFLAGS+=" -fno-lifetime-dse -fno-schedule-insns2"
NO# export CXXFLAGS+=" -fno-lifetime-dse -fno-schedule-insns2"

# grep -rl -- '-Werror=format' | xargs sed -i 's/error=format/no-&/'

# make -f client.mk build
...compiling...

bluegriffon-source/opt/dist/system_wrappers/sys/sysctl.h:3:15: fatal error: sys/sysctl.h: No such file or directory
3 | #include_next <sys/sysctl.h>
...this is missing from glibc >=2.32 easyos has 2.33
but there is a /usr/include/linux/sysctl.h
bad hack maybe, have edited line 3 in sysctl.h to "#include_next <linux/sysctl.h>"

off we go, yet again...
# make -f client.mk build

../../build/unix/gold/ld: error: cannot find -lcrmf
this is in the nss package. we are using the system nss
nss was compiled in OE, which did not install libcrmf.a
so I went to the OE build and found it, copied to /usr/lib

# make -f client.mk build
...success!

# make -f client.mk install
...installed to /usr/lib/bluegriffon-3.2
/usr/bin/bluegriffon symlink

# bluegriffon
window pops up:
XML Parsing Error: undefined entity
Location: chrome://bluegriffon/content/xul/bluegriffon.xul
Line Number 586, Column 11: <label value="&pageLocation.label;"/>
----------^

expand omni.ja...
# cd /usr/lib/bluegriffin-3.2
# mv omni.ja omni.zip
# unzip -X -K -o -b omni.zip -d ./

have edited:
/usr/lib/bluegriffon-3.2/chrome/bluegriffon/content/bluegriffon/xul/bluegriffon.xul
comment-out line 586: <!-- <label value="&pageLocation.label;"/> -->
...and have to comment-out more similar lines in that file.

now bluegriffon starts!
...the UI is so very broken!

Adding to the fun and games with different glibc versions, now we have more fun with rust versions. Sigh.

There was a comment in the Puppy Forum that older versions of BlueGriffon were "better". Looks like it has gone downhill after 3.1, released in 2019.

My interest in BlueGriffon is want a small and simple WYSIWYG HTML editor. I could try compiling an older version, but think might be better to tackle an old version of SeaMonkey.   

Tags: easy