Re: status of C++ support with GNULIB_NAMESPACE

2016-11-22 Thread Mike Miller
On Mon, Nov 21, 2016 at 23:35:12 +, Pedro Alves wrote:
> BTW, do we know which programs use GNULIB_NAMESPACE?
> I believe the initial support was done for GNU Octave, but I see
> that quite recently Octave switched away from it, maybe because of
> the problems with newer GCCs (I believe fixed now).

Correct, we found the situation with GCC 6 at odds with how we expected
gnulib to work, and did not think it worth our time to try to fix it. We
now build an internal library of wrapper functions around gnulib using
the C compiler.

AFAICT, no other projects are using GNULIB_NAMESPACE in the wild:

https://codesearch.debian.net/search?q=%23+*define+*GNULIB_NAMESPACE

-- 
mike



Re: The non-recursive-gnulib-prefix-hack module

2016-10-22 Thread Mike Miller
On Sat, Oct 22, 2016 at 19:25:46 +0200, Bruno Haible wrote:
> This is better now. But still better would be to not hardcode 'lib' at all,
> and instead use whatever value was passed to gnulib-tool via --source-base.
> Below is a proposed patch. (The variable $gl_source_base is already used in a
> similar way in the modules 'localcharset' and 'relocatable-prog'.)
> Untested on my side; can you please test it the next time you happen to
> build coreutils?

Hi, I had attempted to get non-recursive-gnulib-prefix-hack working with
Octave (where the gnulib subdirectory is not named 'lib'). I sent a
patch and a query for help to bug-gnulib last year and attracted no
interest, I assume because there are very few users.

Original (work-in-progress) patch attached, and see
http://lists.gnu.org/archive/html/bug-gnulib/2015-08/msg0.html,
still valid because Octave has still not managed to incorporate gnulib
cleanly into its non-recursive build.

I'd be grateful for any thoughts or help on making this module work more
generically.

-- 
mike
>From a017e33d890562e2bd456752345625c0bb8cc5f3 Mon Sep 17 00:00:00 2001
From: Mike Miller <mtmil...@ieee.org>
Date: Sat, 1 Aug 2015 12:25:48 -0400
Subject: [PATCH] non-recursive-gnulib-prefix-hack: fix when source-base !=
 "lib"

---
 build-aux/prefix-gnulib-mk | 3 ++-
 gnulib-tool| 4 
 m4/non-recursive-gnulib-prefix-hack.m4 | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk
index 8af2916..3bb2a59 100755
--- a/build-aux/prefix-gnulib-mk
+++ b/build-aux/prefix-gnulib-mk
@@ -120,7 +120,8 @@ sub prefix_assignment ($$)
 
   # Variables which name depend on the location: libbison_a_SOURCES =>
   # lib_libbison_a_SOURCES.
-  $lhs_and_assign_op =~ s/($lib_name)/lib_$1/g;
+  my $dir = substr ($prefix, 0, -1);
+  $lhs_and_assign_op =~ s/($lib_name)/${dir}_$1/g;
 
   return $lhs_and_assign_op . $rhs;
 }
diff --git a/gnulib-tool b/gnulib-tool
index ec82f35..71e7d9f 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -3918,6 +3918,10 @@ func_emit_autoconf_snippet ()
 cat
   fi
 } \
+  | { if test "$sourcebase" != "lib"; then
+sed -e 's,\[lib\],'"[$sourcebase],g"
+  fi
+} \
   | { if $disable_gettext; then
 sed -e 's/AM_GNU_GETTEXT(\[external\])/dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac./'
   else
diff --git a/m4/non-recursive-gnulib-prefix-hack.m4 b/m4/non-recursive-gnulib-prefix-hack.m4
index bf9ae7c..e827a52 100644
--- a/m4/non-recursive-gnulib-prefix-hack.m4
+++ b/m4/non-recursive-gnulib-prefix-hack.m4
@@ -10,7 +10,7 @@ dnl in the directory specified by LIB_DIR.
 AC_DEFUN([gl_NON_RECURSIVE_GNULIB_PREFIX_HACK],
 [
   # Tell AC_LIBSOURCES where to find source files like alloca.c.
-  AC_CONFIG_LIBOBJ_DIR([lib])
+  AC_CONFIG_LIBOBJ_DIR([$1])
 
   # This hack originated in bison.  It is required when using non-recursive
   # automake rules to build from gnulib-provided lib/ sources.  Hence, LIB_DIR
-- 
2.4.6



Re: signbit issues

2016-02-07 Thread Mike Miller
On Fri, Feb 05, 2016 at 16:38:08 -0700, Orion Poplawski wrote:
> I'm afraid I'm not very experience with automake/autoconf so perhaps I've
> messed something else up.
> 
> $ cat configure.ac
> AC_INIT(test, 1.0, or...@nwra.com)
> AC_CONFIG_SRCDIR(src/foobar.cpp)
> AM_INIT_AUTOMAKE
> AC_PROG_CC
> gl_EARLY
> AC_PROG_CXX
> AC_PROG_RANLIB
> AC_CONFIG_FILES(lib/Makefile)
> AC_OUTPUT(Makefile src/Makefile)
> gl_iNIT

Small but important typo, that should be "gl_INIT".

I made a few more adjustments, the following works for me:

  AC_INIT(test, 1.0, or...@nwra.com)
  AC_CONFIG_SRCDIR(src/foobar.cpp)
  AM_INIT_AUTOMAKE(foreign)
  AC_PROG_CC
  AC_PROG_CXX
  AC_PROG_RANLIB
  gl_EARLY
  gl_INIT
  AC_CONFIG_HEADERS(config.h)
  AC_CONFIG_FILES(Makefile lib/Makefile src/Makefile)
  AC_OUTPUT

-- 
mike



fixes for building gnulib non-recursively

2015-08-01 Thread Mike Miller
Hi, we are in the midst of converting the GNU Octave autotools build
system to a non-recursive one. The only remaining subdir is gnulib and
we'd like to build it non-recursively also. I see there is some
non-recursive support in gnulib, but it will need some small changes to
support Octave. Specifically, the directory name lib is hardcoded in a
few places, while Octave uses source_base=libgnu.

I'm attaching my work so far. I'm confident in 2 out of the 3 changes.
Any ideas on a better way to inject the value of $source_base into
autoconf snippets?

Thanks,

-- 
mike
From a017e33d890562e2bd456752345625c0bb8cc5f3 Mon Sep 17 00:00:00 2001
From: Mike Miller mtmil...@ieee.org
Date: Sat, 1 Aug 2015 12:25:48 -0400
Subject: [PATCH] non-recursive-gnulib-prefix-hack: fix when source-base !=
 lib

---
 build-aux/prefix-gnulib-mk | 3 ++-
 gnulib-tool| 4 
 m4/non-recursive-gnulib-prefix-hack.m4 | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk
index 8af2916..3bb2a59 100755
--- a/build-aux/prefix-gnulib-mk
+++ b/build-aux/prefix-gnulib-mk
@@ -120,7 +120,8 @@ sub prefix_assignment ($$)
 
   # Variables which name depend on the location: libbison_a_SOURCES =
   # lib_libbison_a_SOURCES.
-  $lhs_and_assign_op =~ s/($lib_name)/lib_$1/g;
+  my $dir = substr ($prefix, 0, -1);
+  $lhs_and_assign_op =~ s/($lib_name)/${dir}_$1/g;
 
   return $lhs_and_assign_op . $rhs;
 }
diff --git a/gnulib-tool b/gnulib-tool
index ec82f35..71e7d9f 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -3918,6 +3918,10 @@ func_emit_autoconf_snippet ()
 cat
   fi
 } \
+  | { if test $sourcebase != lib; then
+sed -e 's,\[lib\],'[$sourcebase],g
+  fi
+} \
   | { if $disable_gettext; then
 sed -e 's/AM_GNU_GETTEXT(\[external\])/dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac./'
   else
diff --git a/m4/non-recursive-gnulib-prefix-hack.m4 b/m4/non-recursive-gnulib-prefix-hack.m4
index bf9ae7c..e827a52 100644
--- a/m4/non-recursive-gnulib-prefix-hack.m4
+++ b/m4/non-recursive-gnulib-prefix-hack.m4
@@ -10,7 +10,7 @@ dnl in the directory specified by LIB_DIR.
 AC_DEFUN([gl_NON_RECURSIVE_GNULIB_PREFIX_HACK],
 [
   # Tell AC_LIBSOURCES where to find source files like alloca.c.
-  AC_CONFIG_LIBOBJ_DIR([lib])
+  AC_CONFIG_LIBOBJ_DIR([$1])
 
   # This hack originated in bison.  It is required when using non-recursive
   # automake rules to build from gnulib-provided lib/ sources.  Hence, LIB_DIR
-- 
2.4.6



[PATCH] tempname: allow compilation with C++

2015-02-17 Thread Mike Miller
* lib/tempname.h: Specify extern C linkage with C++.
(try_tempname): Rename `try' to `tryfunc'.
* lib/tempname.c (__try_tempname, __gen_tempname): Rename `try' to
`tryfunc' for consistency.
---
 ChangeLog  |  8 
 lib/tempname.c | 14 +++---
 lib/tempname.h | 14 +++---
 3 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5083e95..aa17a64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-02-17  Mike Miller  mtmil...@ieee.org
+
+   tempname: allow compilation with C++
+   * lib/tempname.h: Specify extern C linkage with C++.
+   (try_tempname): Rename `try' to `tryfunc'.
+   * lib/tempname.c (__try_tempname, __gen_tempname): Rename `try' to
+   `tryfunc' for consistency.
+
 2015-02-16  Paul Eggert  egg...@cs.ucla.edu
 
getdtablesize, dup2, fcntl: port to Android
diff --git a/lib/tempname.c b/lib/tempname.c
index 49c7df1..8e6d26c 100644
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -179,7 +179,7 @@ static const char letters[] =
 
 int
 __try_tempname (char *tmpl, int suffixlen, void *args,
-int (*try) (char *, void *))
+int (*tryfunc) (char *, void *))
 {
   int len;
   char *XX;
@@ -244,7 +244,7 @@ __try_tempname (char *tmpl, int suffixlen, void *args,
   v /= 62;
   XX[5] = letters[v % 62];
 
-  fd = try (tmpl, args);
+  fd = tryfunc (tmpl, args);
   if (fd = 0)
 {
   __set_errno (save_errno);
@@ -300,25 +300,25 @@ try_nocreate (char *tmpl, void *flags)
 int
 __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
 {
-  int (*try) (char *, void *);
+  int (*tryfunc) (char *, void *);
 
   switch (kind)
 {
 case __GT_FILE:
-  try = try_file;
+  tryfunc = try_file;
   break;
 
 case __GT_DIR:
-  try = try_dir;
+  tryfunc = try_dir;
   break;
 
 case __GT_NOCREATE:
-  try = try_nocreate;
+  tryfunc = try_nocreate;
   break;
 
 default:
   assert (! invalid KIND in __gen_tempname);
   abort ();
 }
-  return __try_tempname (tmpl, suffixlen, flags, try);
+  return __try_tempname (tmpl, suffixlen, flags, tryfunc);
 }
diff --git a/lib/tempname.h b/lib/tempname.h
index 0df4381..e609360 100644
--- a/lib/tempname.h
+++ b/lib/tempname.h
@@ -32,6 +32,10 @@
 #  define GT_NOCREATE 2
 # endif
 
+#ifdef __cplusplus
+extern C {
+#endif
+
 /* Generate a temporary file name based on TMPL.  TMPL must match the
rules for mk[s]temp (i.e. end in XX, possibly with a suffix).
The name constructed does not exist at the time of the call to
@@ -47,11 +51,15 @@
We use a clever algorithm to get hard-to-predict names. */
 extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind);
 
-/* Similar to gen_tempname, but TRY is called for each temporary
-   name to try.  If TRY returns a non-negative number, TRY_GEN_TEMPNAME
+/* Similar to gen_tempname, but TRYFUNC is called for each temporary
+   name to try.  If TRYFUNC returns a non-negative number, TRY_GEN_TEMPNAME
returns with this value.  Otherwise, if errno is set to EEXIST, another
name is tried, or else TRY_GEN_TEMPNAME returns -1. */
 extern int try_tempname (char *tmpl, int suffixlen, void *args,
- int (*try) (char *, void *));
+ int (*tryfunc) (char *, void *));
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* GL_TEMPNAME_H */
-- 
2.1.4



fpieee module adds inappropriate compiler flags to CPPFLAGS

2014-08-05 Thread Mike Miller
Hi, we recently encountered a build failure of Octave on alpha [1,2]
due to an added indirect dependency on the fpieee gnulib module, which
appends compiler options to CPPFLAGS that don't necessarily belong
there.

This module apparently adds either -mieee or -ieee to CPPFLAGS
when building on certain systems. These are decidedly not preprocessor
flags, but are likely added this way as a shortcut to ensure that they
are used when compiling any language. However, the working assumption
that what works for $(CC) will work for anything that takes CPPFLAGS
is not necessarily true. For example, even invoking $(CPP) $(CPPFLAGS)
using gcc would fail with an error in this environment.

In the case of Octave, it fails because CPPFLAGS are passed on to
other tools (such as Qt moc) that will work with standard preprocessor
options like -D and -I, but not -mieee. Our workaround is to simply
filter these options out of CPPFLAGS, because Octave has already had
its own logic to append the appropriate compiler options to CFLAGS and
CXXFLAGS for several years.

I'm not sure what an appropriate fix for this would be in the general
case, but ideally it would avoid adding these options to project-wide
CPPFLAGS where they really don't belong. If it were possible to add
the -mieee or -ieee option to language-specific FLAGS variables used
by a given project, that would be a better solution. Less ideally, it
could stuff the option into an IEEE_CFLAGS variable, which a project
would then have to know about and explicitly use or add to its own
CFLAGS/CXXFLAGS/etc, potentially breaking existing uses.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746924
[2] http://savannah.gnu.org/bugs/?42839

Thoughts? Thanks,

-- 
mike



Re: [bug #35580] bootstrap is not portable to OpenBSD

2013-08-12 Thread Mike Miller
On Fri, Aug 09, 2013 at 16:34:24 +0100, Pádraig Brady wrote:
 Excellent. I intend to push the attached change to bootstrap so,
 that includes sha1 in the list now it's compatible, so therefore
 not requiring one to set SHA1SUM on BSD at all.

I tested the change you pushed to gnulib. It still requires passing
SHA1SUM, since a program from the default list must still understand the
--version option to be accepted. But other than that, it works now.

 Also I've implemented the optimization not to look for sha1sum
 at all, when not updating po files.

This works now.

Thanks,

-- 
mike



Re: OpenBSD: gettimeofday and sys/time.h errors

2013-08-12 Thread Mike Miller
On Sat, Aug 10, 2013 at 22:05:39 -0700, Paul Eggert wrote:
 No, I think Gnulib is being too picky here.  I installed the
 following patch, which I hope fixes the problems you mentioned.

Yes, all the gettimeofday and sys/time.h tests pass now, thanks!

-- 
mike



[PATCH] bootstrap: port to OpenBSD sed

2013-08-12 Thread Mike Miller
As mentioned in a previous thread [1], the native sed utility on OpenBSD
does not interpret `-' as a file argument to mean stdin. This is
inconvenient but POSIX-compliant behavior. The attached patch fixes
this, let me know if this looks okay (and push for me if so).

[1] https://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00012.html

Thanks,

-- 
mike
From c3f41ec0acbb9487002c14d310b1c63d3346a10b Mon Sep 17 00:00:00 2001
From: Mike Miller mtmil...@ieee.org
Date: Mon, 12 Aug 2013 22:39:49 -0400
Subject: [PATCH] bootstrap: port to OpenBSD sed

* build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which
does not interpret `-' as a file argument to mean stdin.
---
 ChangeLog   | 6 ++
 build-aux/bootstrap | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3c8eb4d..57b078d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-12  Mike Miller  mtmil...@ieee.org
+
+	bootstrap: port to OpenBSD sed
+	* build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which
+	does not interpret `-' as a file argument to mean stdin.
+
 2013-08-11  Paul Eggert  egg...@cs.ucla.edu
 
 	fpending: port to recent Cygwin change to stdio_ext.h
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index df763de..d2a4665 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2013-08-09.15; # UTC
+scriptversion=2013-08-13.02; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -320,7 +320,7 @@ insert_if_absent() {
 die Error: Duplicate entries in $file:  $duplicate_entries
   fi
   linesold=$(gitignore_entries $file | wc -l)
-  linesnew=$(echo $str | gitignore_entries - $file | sort -u | wc -l)
+  linesnew=$( { echo $str; cat $file; } | gitignore_entries | sort -u | wc -l)
   if [ $linesold != $linesnew ] ; then
 { echo $str | cat - $file  $file.bak  mv $file.bak $file; } \
   || die insert_if_absent $file $str: failed
-- 
1.8.3.2



Re: OpenBSD: gettimeofday and sys/time.h errors

2013-08-11 Thread Mike Miller
On Fri, Aug 09, 2013 at 23:18:07 -0700, Paul Eggert wrote:
 Hmm, OK, how about the following patch instead?

Ok, some good progress. This fixes the gettimeofday has not been
declared error and the invalid conversion errors with timeval, both
with and without gnulib sys/select.h. I think that's enough to get me
past the errors I originally encountered in Octave.

However, I'm still getting the following errors:

test-sys_select.c:44: error: size of array 'verify_tv_sec_type' is negative
test-sys_time.c:27: error: size of array 'verify_tv_sec_type' is negative

And this is due to the following deviation from POSIX in the system
headers:

/usr/include/amd64/_types.h:128:
typedef int __time_t;

/usr/include/sys/time.h:48:
struct timeval {
longtv_sec; /* seconds */
longtv_usec;/* and microseconds */
};

So is this as close as we can get with gnulib until OpenBSD addresses
this?

Thanks,

-- 
mike



Re: [bug #35580] bootstrap is not portable to OpenBSD

2013-08-09 Thread Mike Miller
On Fri, Aug 09, 2013 at 04:52:40AM +0100, Pádraig Brady wrote:
 On 08/09/2013 03:23 AM, Mike Miller wrote:
 Thanks for the suggestion. I did try SHA1SUM=sha1, but that still
 won't work with bootstrap since find_tool() requires that $tool
 understand the --version option. That was mentioned earlier in the
 bug
 report linked above.

 Oh that's a bit of a buglet then, as --version isn't required
 unless a version is specified in the requirements.

 Does SHA1SUM=sha1 work after applying...

 commit 2c519cd635d46d314cd991b1a011464f7345c5fa
 [...]

Yes, that works perfectly. Of course, the code that uses sha1sum isn't
being exercised on my project. I ran it against bison instead and it
looks like it works now with sha1.

Another fix might be to move find_tool SHA1SUM into the narrow case
where it's actually used. It is not required unless a project has a po
directory.

Testing against bison has shown one more error in bootstrap on OpenBSD.
The insert_if_absent function fails with the native sed, a file argument
of - is not recognized. The following change works for me and now
bootstrap runs completely without coreutils and without aliasing sed to
gsed.

Thanks,

diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 87d1512..9cd9404 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -322,7 +322,7 @@ insert_if_absent() {
 die Error: Duplicate entries in $file:  $duplicate_entries
   fi
   linesold=$(gitignore_entries $file | wc -l)
-  linesnew=$(echo $str | gitignore_entries - $file | sort -u | wc -l)
+  linesnew=$( { echo $str; cat $file; } | gitignore_entries | sort -u | wc 
-l)
   if [ $linesold != $linesnew ] ; then
 { echo $str | cat - $file  $file.bak  mv $file.bak $file; } \
   || die insert_if_absent $file $str: failed

-- 
mike



Re: [bug #35580] bootstrap is not portable to OpenBSD

2013-08-09 Thread Mike Miller
On Fri, Aug 9, 2013 at 10:36:42 +0700, Gary V. Vaughan wrote:
 For this and many other gnulib bootstrap issues that tripped up my projects,
 I rewrote the script from the ground up.  You can find my version on the lua
 branch of GNU Zile, all of my github projects and HEAD revisions of GNU 
 libtool
 and GNU m4, plus a bunch of other projects have adopted it over the last few
 years.  My version is considerably larger, but somewhat faster, with much 
 better
 error reporting, and hugely more flexible and extensible with bootstrap.conf,
 as well as fixing many of the problems with the gnulib bootstrap script that 
 come
 up on these lists from time to time.

 [...]

 I'd be delighted to hear your feedback if you have any success in switching
 to my rewrite.

Hi Gary,

I tried libtool/bootstrap in a test project on OpenBSD, I had a couple
of problems.

* if a buildreq does not have a required version, bootstrap still
requires that the tool understands the --version option. It should
skip calling func_get_version if _G_reqver is -.

The rest were simply conversion problems, not saying your script
should be completely compatible, just things I ran into:

* bootstrap.conf is not completely compatible, e.g. I had to change
gnulib_tool_option_extras - gnulib_tool_options. The user must
include --no-changelog in bootstrap.conf if they want to keep that
default option.

* buildreq list needs to be rewritten with URLs, if it's only 2
columns instead of 3, errors ensue from trying to treat the wrong
field as the wrong type.

* --skip-git instead of --no-git

Thanks,

-- 
mike



OpenBSD: gettimeofday and sys/time.h errors

2013-08-09 Thread Mike Miller
Hi, continuing on the OpenBSD theme, I am seeing a couple of compilation
failures with sys/time.h, gettimeofday, and timeval very similar to one
reported recently for cygwin [1] (coincidentally I am also investigating on
behalf of Octave).

In a barebones project using gnulib-tool --with-tests --with-tests-c++
and including the gettimeofday and select modules:

$ cd tests
$ gmake -k test-sys_select test-sys_time test-sys_time-c++ 
  CC   test-sys_select.o
test-sys_select.c:44: error: size of array 'verify_tv_sec_type' is negative
gmake: *** [test-sys_select.o] Error 1
gmake: Target `test-sys_select' not remade because of errors.
  CC   test-sys_time.o
test-sys_time.c:27: error: size of array 'verify_tv_sec_type' is negative
gmake: *** [test-sys_time.o] Error 1
gmake: Target `test-sys_time' not remade because of errors.
  CXX  test-sys_time-c++.o
In file included from ../libgnu/sys/select.h:86,
 from /usr/include/sys/types.h:221,
 from ../libgnu/sys/types.h:27,
 from /usr/include/sys/time.h:38,
 from ../libgnu/sys/time.h:38,
 from test-sys_time-c++.cc:22:
../libgnu/sys/time.h:419: error: '::gettimeofday' has not been declared
In file included from /usr/include/sys/types.h:221,
 from ../libgnu/sys/types.h:27,
 from /usr/include/sys/time.h:38,
 from ../libgnu/sys/time.h:38,
 from test-sys_time-c++.cc:22:
../libgnu/sys/select.h:597: error: invalid conversion from 'int (*)(int, 
fd_set*, fd_set*, fd_set*, timeval*)' to 'int (*)(int, fd_set*, fd_set*, 
fd_set*, gnulib::timeval*)'
test-sys_time-c++.cc:28: error: invalid conversion from 'int 
(*)(gnulib::timeval*, void*)' to 'int (*)(timeval*, void*)'
gmake: *** [test-sys_time-c++.o] Error 1
gmake: Target `test-sys_time-c++' not remade because of errors.

There is a circular inclusion loop between sys/select.h and sys/time.h
in the system headers.

[1] https://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg0.html

-- 
mike



Re: OpenBSD: gettimeofday and sys/time.h errors

2013-08-09 Thread Mike Miller
On Fri, Aug 09, 2013 at 01:46:27PM -0700, Paul Eggert wrote:
 Thanks, does the following patch fix things for you?
 If so, I'll install it into gnulib.

No, same exact set of errors. Your patch only touches sys/select.h. In
fact, I get pretty much the same errors if I don't include the select
gnulib module, and pull in only gettimeofday.

Here are the errors from the sys_time tests with only the gettimeofday
module used:

$ gmake -k test-sys_time test-sys_time-c++
  CC   test-sys_time.o
test-sys_time.c:27: error: size of array 'verify_tv_sec_type' is negative
gmake: *** [test-sys_time.o] Error 1
gmake: Target `test-sys_time' not remade because of errors.
  CXX  test-sys_time-c++.o
In file included from /usr/include/sys/select.h:37,
 from /usr/include/sys/types.h:221,
 from /usr/include/sys/time.h:38,
 from ../libgnu/sys/time.h:38,
 from test-sys_time-c++.cc:22:
../libgnu/sys/time.h:419: error: '::gettimeofday' has not been declared
test-sys_time-c++.cc:28: error: invalid conversion from 'int 
(*)(gnulib::timeval*, void*)' to 'int (*)(timeval*, void*)'
gmake: *** [test-sys_time-c++.o] Error 1
gmake: Target `test-sys_time-c++' not remade because of errors.

-- 
mike



Re: [bug #35580] bootstrap is not portable to OpenBSD

2013-08-08 Thread Mike Miller
(Pruning the cc list of leftovers from the Savannah bug tracker)

Hi Pádraig,

On Thu, Aug 8, 2013 at 11:08:23 +0100, Pádraig Brady wrote:
 On 08/08/2013 03:59 AM, Mike Miller wrote:
 [...]
 You can certainly follow up with gnulib upstream if you want them to consider
 using OpenBSD's sha1 instead of gsha1sum, but the bootstrap script currently
 uses the --status option that is GNU-specific.

 This adjustment should avoid the need for coreutils
 (there might be a catch 22 with that requirement).
 You'll also need to export SHA1SUM=sha1 before running bootstrap.
 [...]

Thanks for the suggestion. I did try SHA1SUM=sha1, but that still
won't work with bootstrap since find_tool() requires that $tool
understand the --version option. That was mentioned earlier in the bug
report linked above.

-- 
mike



[bug #35580] bootstrap is not portable to OpenBSD

2013-08-07 Thread Mike Miller
Update of bug #35580 (project octave):

Category:None = Configuration and Build
System
  Item Group:None = Build Failure  
  Status:   Confirmed = Need Info  
 Summary: autogen.sh is not portable to OpenBSD = bootstrap
is not portable to OpenBSD

___

Follow-up Comment #7:

Update: the development version of Octave uses a script called bootstrap now
instead of autogen.sh.

I believe this can be considered fixed. I have a successful bootstrap of a
current Octave hg clone on OpenBSD 5.3, the following GNU packages are
required to be installed for bootstrap to succeed: autoconf (2.69p0), automake
(1.13.1), coreutils, libtool, m4.

I don't know for certain that GNU m4 is required, but I think I read in the
autoconf manual at one time that it is, so I installed it and set M4=gm4 in my
environment. Coreutils is required for gsha1sum only.

You can certainly follow up with gnulib upstream if you want them to consider
using OpenBSD's sha1 instead of gsha1sum, but the bootstrap script currently
uses the --status option that is GNU-specific.

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?35580

___
  Message sent via/by Savannah
  http://savannah.gnu.org/