[PATCH v2] fix out of tree build

Tomi Ollila tomi.ollila at iki.fi
Sun Nov 20 03:35:02 PST 2016


On Sun, Nov 20 2016, David Bremner <david at tethera.net> wrote:

> Tomi Ollila <tomi.ollila at iki.fi> writes:
>
>> With working tests.
>> ---
>>
>> This is v2 of id:1479066903-28310-1-git-send-email-tomi.ollila at iki.fi
>>
>> with this ${srcdir} being absolute path will also work (relevant in tests!)
>>
>> ... and commit message is fixed: I accuse qt for "shadow build" ;)
>>
>> Out of tree builds breaks every now and then; perhaps it is broken less
>> often in the future as I plan to start doing my "production" builds
>> out of tree...
>
> Hi Tomi;
>
> Did you test this with ruby-dev installed? for me out-of-tree-build
> fails with your patch with

Hi David;

Thanks for testing this.

I (must confess I) did not test with ruby-dev installed...

... now I installed 'ruby-dev' *and* 'ruby' to my test debian:8.6
container -- and got exactly the same problem.

I tried to "trivial" change and added (*)

   cp -a "$srcdir"/bindings/ruby bindings

to ./configure


(*) the '-a' option is supported by at least linux, freebsd & macos
cp command, but not by solaris 10 cp. tough for solaris users ;(

next it fails

  make -C bindings/ruby
  make[1]: Entering directory
  '/home/too/tmp/nm-docker-tst/twd-notmuch-too-8.6/bindings/ruby'
  compiling messages.c
  In file included from messages.c:21:0:
  defs.h:24:21: fatal error: notmuch.h: No such file or directory
   #include <notmuch.h>

I looked a bit of the generated bindings/ruby/Makefile and did not
find out a "SMOP" solution (P meaning 'patching' this time). Also
it *looks to me that* building ruby bindings out-of-tree has never
worked...

Anyway, this makes my bold statement: 'With working tests.' false.

On IRC you asked whether out of tree build is documented. at least
command:
         grep -nIri out.*of.*tree notmuch notmuch-wiki

doesn't print any relevant matches.


The patch is useful but in this light I drop my suggestion to add
it to next 0.23.x release. I'll work on the commit message so
it could be added to master later...

... I am (slowly) creating a tool that runs (notmuch) tests
(in parallel!) in containers: debian:7.11, debian:8.6,
ubuntu:14.04.5, ubuntu:16.04, fedora:24 and debian:unstable.
Out-of-tree builds makes setupping build directories
(from same source directory) easier.


Tomi


> cd bindings/ruby && \
> 	EXTRA_LDFLAGS="-Wl,--no-undefined" \
> 	LIBNOTMUCH="../../lib/libnotmuch.so" \
> 	ruby extconf.rb --vendor
> /bin/sh: 1: cd: can't cd to bindings/ruby
> bindings/Makefile.local:8: recipe for target 'ruby-bindings' failed


More information about the notmuch mailing list