[2845] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: Ticket #158 ./configure --without-zephyr && make fails with

daemon@ATHENA.MIT.EDU (David A Benjamin)
Mon Jan 3 14:56:58 2011

Date: Mon, 3 Jan 2011 14:56:54 -0500 (EST)
From: David A Benjamin <davidben@MIT.EDU>
To: Nelson Elhage <nelhage@nelhage.com>
cc: bergey@alum.mit.edu, barnowl-dev@mit.edu
In-Reply-To: <20110103193418.GB12044@mit.edu>

It looks like the only call is the one outside zephyr.c is 
owl_function_zwrite. I think owl_function_zwrite is never called without 
zephyr enabled. And if it were, the codepath should still never run 
because send_zephyr always returns 0 without zephyr built-in.

We should possible refactor that code to move the error_message call 
elsewhere. Or I guess we may as well just wrap all of owl_function_zwrite 
with an ifdef.

David

On Mon, 3 Jan 2011, Nelson Elhage wrote:

> Hm. It sounds like the bug is one of:
>
> - We require com_err at all if we're not using Zephyr.
> - We use com_err even if config.h says we don't have it.
>
> Where does the error_message reference come from when building --without-zephyr?
> Can we kill it or move it inside a Zephyr ifdef? That would be my inclination,
> but if not, I'll take this patch.
>
> Also, if we really can't build without com_err, ./configure should probably bail
> out in that case, instead of letting us get to the compilation/linker error.
>
> - Nelson
>
> On Wed, Dec 29, 2010 at 08:21:10PM -0500, Daniel Bergey wrote:
>> Specifically, the test for com_err only happens if with_zephyr is set.
>> config.h ends up indicating that com_err isn't available.
>>
>> After moving those two lines out of the conditional, barnowl compiles and runs on my
>> machine (Ubuntu Maverick).  Patch below.
>>
>> bergey
>>
>> ---
>>  configure.ac |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 6a8e89f..47a6cd3 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -24,6 +24,8 @@ AS_IF([test "x$with_stack_protector" != xno],
>>
>>  AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
>>  AC_CHECK_LIB(panelw, update_panels,, AC_MSG_ERROR(No libpanelw found.))
>> +AC_CHECK_LIB([com_err], [com_err])
>> +AC_CHECK_HEADERS([com_err.h])
>>  AC_SEARCH_LIBS([gethostbyname], [nsl])
>>  AC_SEARCH_LIBS([socket], [socket])
>>  AC_SEARCH_LIBS([res_search], [resolv])
>> @@ -61,8 +63,6 @@ AS_IF([test "x$with_zephyr" != xno],
>>      AC_CHECK_LIB([zephyr], [ZInitLocationInfo],
>>        AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [1],
>>                  [Have ZInitLocationInfo]),)
>> -    AC_CHECK_LIB([com_err], [com_err])
>> -    AC_CHECK_HEADERS([com_err.h])
>>     ],
>>     [if test "x$with_zephyr" != xcheck; then
>>        AC_MSG_FAILURE(
>> --
>> 1.7.1
>>
>

home help back first fref pref prev next nref lref last post