database error
[notmuch-archives.git] / 40 / efa577c77847a8d68910238a2a326012c0ffac
1 Return-Path: <tomi.ollila@iki.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 38DFC6DE1A04\r
6  for <notmuch@notmuchmail.org>; Wed, 20 May 2015 01:41:32 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.046\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.046 tagged_above=-999 required=5 tests=[AWL=0.394, \r
12  SPF_NEUTRAL=0.652] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id Fud69E2HgW7Y for <notmuch@notmuchmail.org>;\r
16  Wed, 20 May 2015 01:41:30 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 073B86DE19F6\r
19  for <notmuch@notmuchmail.org>; Wed, 20 May 2015 01:41:30 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21  by guru.guru-group.fi (Postfix) with ESMTP id 54D361000F2;\r
22  Wed, 20 May 2015 11:41:08 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: David Bremner <david@tethera.net>, David Bremner <david@tethera.net>,\r
25  Ronny Chevalier <chevalier.ronny@gmail.com>\r
26 Subject: Re: [PATCH] configure: Add sanity checking for environment variables\r
27 In-Reply-To: <m2oalftzjr.fsf@guru.guru-group.fi>\r
28 References: <m2617onuhh.fsf@guru.guru-group.fi>\r
29  <1432109551-16861-1-git-send-email-david@tethera.net>\r
30  <m2oalftzjr.fsf@guru.guru-group.fi>\r
31 User-Agent: Notmuch/0.19+115~g9a981cb (http://notmuchmail.org) Emacs/24.3.1\r
32  (x86_64-unknown-linux-gnu)\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
34  $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
35  !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
36 Date: Wed, 20 May 2015 11:41:08 +0300\r
37 Message-ID: <m2twv77iaj.fsf@guru.guru-group.fi>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain\r
40 Cc: notmuch@notmuchmail.org\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.18\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45  <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Wed, 20 May 2015 08:41:32 -0000\r
54 \r
55 On Wed, May 20 2015, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
56 \r
57 > On Wed, May 20 2015, David Bremner <david@tethera.net> wrote:\r
58 >\r
59 >> Passing in environment variables incompatible with the compiler may\r
60 >> cause other parts of the configure script to fail in hard to\r
61 >> understand ways, so we abort early.\r
62 >> ---\r
63 >>\r
64 >> meh, the previous version was borken by lazy evaluation of CXXFLAGS\r
65 >> using make syntax. Better suggestions for how to do this?\r
66 >>\r
67 >>  configure | 31 +++++++++++++++++++++++++++++--\r
68 >>  1 file changed, 29 insertions(+), 2 deletions(-)\r
69 >>\r
70 >> diff --git a/configure b/configure\r
71 >> index 4af7ba9..650b976 100755\r
72 >> --- a/configure\r
73 >> +++ b/configure\r
74 >> @@ -269,6 +269,35 @@ dependencies are available:\r
75 >>  EOF\r
76 >>  \r
77 >>  errors=0\r
78 >> +printf "int main(void){return 0;}\n" > minimal.c\r
79 >> +\r
80 >> +printf "Sanity checking C compilation environment... "\r
81 >> +if ${CC} ${CFLAGS} ${CPPFLAGS}  minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1\r
82 >\r
83 > still 2 spaces  ----------------^\r
84 >\r
85 >> +then\r
86 >> +    printf "OK.\n"\r
87 >> +else\r
88 >> +    printf "Fail.\n"\r
89 >> +    errors=$((errors + 1))\r
90 >> +fi\r
91 >> +\r
92 >> +printf "Sanity checking C++ compilation environment... "\r
93 >> +if ${CXX} ${CXXFLAGS_for_sh} ${CPPFLAGS} minimal.c ${LDFLAGS} -o minimal > /dev/null 2>&1\r
94 >\r
95 > ${CXXFLAGS:-$CFLAGS} ?\r
96 \r
97 of course not... I did not find any definition for CXXFLAGS_for_sh....\r
98 ... so\r
99 \r
100 case $CXXFLAGS \r
101         in *'(CFLAGS)'*) CXXFLAGS_for_sh=$CFLAGS \r
102         ;; *) CXXFLAGS_for_sh=CXXFLAGS\r
103 esac\r
104 \r
105 \r
106 >\r
107 >> +then\r
108 >> +    printf "OK.\n"\r
109 >> +else\r
110 >> +    printf "Fail.\n"\r
111 >> +    errors=$((errors + 1))\r
112 >> +fi\r
113 >> +\r
114 >> +if [ $errors -gt 0 ]; then\r
115 >> +    cat <<EOF\r
116 >> +*** Error: Initial sanity checking of environment failed.  Please try\r
117 >> +running configure in a clean environment, and if the problem persists,\r
118 >> +report a bug.\r
119 >> +EOF\r
120 >> +    rm -f minimal minimal.c\r
121 >> +    exit 1\r
122 >> +fi\r
123 >>  \r
124 >>  if pkg-config --version > /dev/null 2>&1; then\r
125 >>      have_pkg_config=1\r
126 >> @@ -690,8 +719,6 @@ else\r
127 >>  fi\r
128 >>  rm -f compat/check_asctime\r
129 >>  \r
130 >> -printf "int main(void){return 0;}\n" > minimal.c\r
131 >> -\r
132 >>  printf "Checking for rpath support... "\r
133 >>  if ${CC} -Wl,--enable-new-dtags -Wl,-rpath,/tmp/ -o minimal minimal.c >/dev/null 2>&1\r
134 >>  then\r
135 >> -- \r
136 >> 2.1.4\r
137 >>\r
138 >> _______________________________________________\r
139 >> notmuch mailing list\r
140 >> notmuch@notmuchmail.org\r
141 >> http://notmuchmail.org/mailman/listinfo/notmuch\r