Re: Compiling from git - first error (fixed)



On 2016.07.23 12:14, Peter Bloomfield wrote:
On 07/21/2016 07:08:55 PM Thu, Jack wrote:
I did a fresh clone of git, and checked out gtk3 branch.

Did "./bootstrap.sh --prefix=/home/jack/balsa/install --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --with-gpgme --with-html-widget=webkit --enable-smime --without-gnome --without-gtksourceview --with-spell-checker=gtkspell --without-gss --without-ldap --with-libsecret --without-rubrica --without-sqlite"

I'll save for later a discussion of where some of these came from, but I started with a configure line from a few years ago - and obviously some things have changed.

Anyway, the ./bootstrap.sh completed without problems. Make, on the other hand died with

make[3]: Entering directory '/home/jack/balsa/balsa-git/libbalsa'
( glib-genmarshal --prefix=libbalsa ./libbalsa-marshal.list --header > libbalsa-marshal.tmp \
&& mv libbalsa-marshal.tmp libbalsa-marshal.h ) \
|| ( rm -f libbalsa-marshal.tmp && exit 1 )
  CC       abook-completion.o
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
Makefile:742: recipe for target 'abook-completion.o' failed

I realize this is actually a warning not an error, but the -Werror raises the stakes. I don't think I want to remove the -Werror or change it to -w, but I can't find the specific name of the warning so I could use -Wno-error=xxx. Is there a way to suppress the error, or is this actually a problem that should be fixed?

Huh! When building from git, BALSA_DEFS includes "-D_FORTIFY_SOURCE=2 ", which is then added to the $CC invocation. Apparently some toolchains predefine _FORTIFY_SOURCE, so we need to change that line in configure.ac to:

 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \

Could you see if that fixes it?

Yes, that worked. I've had a successful compile. I'm not ready to test yet - I'll either set it up in a virtual machine or have to make a full backup of all my mail. While I don't think the new version is likely to trash my mail, I'd rather not take that chance. :-)

Just FYI, in case it matters, my current gcc is 4.9.3.

I'll report back once I've tested for a while.

Jack


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]