Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )

2018-02-18 Thread Guillermo
2018-01-16 13:09 GMT-03:00 Charlie Brady:
>
> Now seeing these many times:
>
> /usr/include/curses.h:843:31: error:   initializing argument 1 of 'char*
> tigetstr(char*)' [-fpermissive]
>
> service-status.cpp:148:21: error: invalid conversion from 'const char*' to
> 'char*' [-fpermissive]
>s = tigetstr(setaf);
> [...]
>  This is on CentOS7 build platform.

This should be fixed in nosh 1.37. So, unless there were other
compiler errors (warnings are nonfatal), nosh binaries should now
build on CentOS too.

G.


Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )

2018-01-17 Thread Charlie Brady

On Tue, 16 Jan 2018, Jonathan de Boyne Pollard wrote:

> This is a problem that I thought was confined to OpenBSD, and its
> not-|const|-correct ncurses library.  Certainly this has never been a problem
> on Debian nor on FreeBSD, and M. Caravia did not report any lack of
> |const|-correctness on Arch Linux.  What does line 843 of your 
> |/usr/include/curses.h| actually say?  Because that's not the location 
> of that function declaration in that header in either Dickey ncurses or Acton
> pdcurses as far as I can see.  So what curses are you actually using?

CentOS 7 is not an obscure distribution.

bash-4.2$ sed -n 843p /usr/include/curses.h
extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);  /* 
implemented */
bash-4.2$ rpm -qf /usr/include/curses.h
ncurses-devel-5.9-14.20130511.el7_4.x86_64
bash-4.2$ 


Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )

2018-01-16 Thread Jonathan de Boyne Pollard

Guillermo:


Jonathan de Boyne Pollard:

What does line 843 of your |/usr/include/curses.h| actually say? 
Because that's not the location of that function declaration in that 
header in either Dickey ncurses or Acton pdcurses as far as I can 
see. So what curses are you actually using?


Dickey ncurses' |configure| script has options |--enable-const| and 
|--disable-const|. [...]


I am aware.  It doesn't shift that declaration onto line 843 of that 
header. It was quite a few lines further down a few years ago 
, 
and is even further down nowadays.  So either this is a significantly 
older Dickey ncurses, older even than what is in Debian 8 
, 
or it is something else.




Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )

2018-01-16 Thread Guillermo
2018-01-16 17:51 GMT-03:00 Jonathan de Boyne Pollard:
>
> Charlie Brady:
>
>> /usr/include/curses.h:843:31: error:   initializing argument 1 of 'char*
>> tigetstr(char*)' [-fpermissive]
>>
>> service-status.cpp:148:21: error: invalid conversion from 'const char*' to
>> 'char*' [-fpermissive]
>> s = tigetstr(setaf);
>
> This is a problem that I thought was confined to OpenBSD, and its
> not-|const|-correct ncurses library.  Certainly this has never been a
> problem on Debian nor on FreeBSD, and M. Caravia did not report any lack of
> |const|-correctness on Arch Linux.

Neither has been a problem on Gentoo. However...

>  What does line 843 of your
> |/usr/include/curses.h| actually say?  Because that's not the location of
> that function declaration in that header in either Dickey ncurses or Acton
> pdcurses as far as I can see.  So what curses are you actually using?

Dickey ncurses' 'configure' script has options --enable-const and
--disable-const. When ncurses is built with --disable-const,
tigetstr()'s parameter has type char *, when built with
--enable-const, it has type const char *. When neither is specified,
default is --disable-const for ncurses 5, and --enable-const for
ncurses 6.

On my computer:

$ grep -E '(define NCURSES_CONST|tigetstr)' /usr/include/curses.h
#define NCURSES_CONST const
extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);  /*
implemented */

I can't check what is the case for CentOS, asuming it ships Dickey
ncurses, but I could bet...

G.


Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )

2018-01-16 Thread Charlie Brady

OK, with pax installed, but gets a lot further.

Now seeing these many times:

/usr/include/curses.h:843:31: error:   initializing argument 1 of 'char* 
tigetstr(char*)' [-fpermissive]

service-status.cpp:148:21: error: invalid conversion from 'const char*' to 
'char*' [-fpermissive]
   s = tigetstr(setaf);

and this:

service-status.cpp:276:111: warning: enumeral and non-enumeral type in 
conditional expression [enabled by default]
   const char state(b >= ENCORE_STATUS_BLOCK_SIZE ? 
status[ENCORE_STATUS_OFFSET] : p ? encore_status_running : 
encore_status_stopped);

 This is on CentOS7 build platform.



nosh build problems (Re: Compatibilities between runit and s6 (re: )

2018-01-15 Thread Charlie Brady

On Mon, 15 Jan 2018, Charlie Brady wrote:

> > 1) package/compile: you'll need "redo" to build
> 
> Sorry, doesn't work for me:
> 
> bash-4.2$ package/compile 
> redo: ERROR: all: Cannot find .do file to use.
> bash-4.2$ sh -ex package/compile
> + '[' '!' -d package ']'
> + '[' '!' -d source ']'
> + ./package/prepare
> + ./package/make
> redo: ERROR: all: Cannot find .do file to use.
> bash-4.2$ 

Here's some more detail on the build failure:

bash-4.2$ sh -ex package/make
+ test '!' -d package
+ test '!' -d source
+ test '!' -d build
+ expr '' : --jobs
+ expr '' : --jobs
+ case "`uname`" in
++ uname
++ fgrep -c processor /proc/cpuinfo
+ cpus=2
+ exec redo --directory build --jobs 2 -- all
redo: ERROR: all: Cannot find .do file to use.
bash-4.2$ ls build/
bash-4.2$