Re: [dev] [ST] scroll patch build failure [Really SOLVED]

2016-09-24 Thread Nick Warne
On Sat, 24 Sep 2016 17:49:00 +0100
Nick Warne  wrote:

> On Sat, 24 Sep 2016 18:43:18 +0200
> Jochen Sprickerhof  wrote:
> 
> > * Nick Warne  [2016-09-24 17:39]:  
> > > rm config.h, and it builds fine from scratch.  make clean doesn't
> > > remove config.h (should it?).
> > 
> > No, it should not. config.h is your own configuration and you should
> > know how to update it if config.def.h changes.  

Sorry, I see what you mean.  I will shut-up for a bit.

> Well, yes and no.  The patch applies a new #DEFINE that isn't in the
> original config.mk - so unless you _read_ all the patched config.mk,
> then I fail with existing config.h
> 
> Nick



-- 
"Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
-- Doctor Who "Androids of Tara"



Re: [dev] [ST] scroll patch build failure [Really SOLVED]

2016-09-24 Thread Nick Warne
On Sat, 24 Sep 2016 18:43:18 +0200
Jochen Sprickerhof  wrote:

> * Nick Warne  [2016-09-24 17:39]:
> > rm config.h, and it builds fine from scratch.  make clean doesn't
> > remove config.h (should it?).  
> 
> No, it should not. config.h is your own configuration and you should
> know how to update it if config.def.h changes.

Well, yes and no.  The patch applies a new #DEFINE that isn't in the
original config.mk - so unless you _read_ all the patched config.mk,
then I fail with existing config.h

Nick
-- 
"Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
-- Doctor Who "Androids of Tara"



Re: [dev] [ST] scroll patch build failure [Really SOLVED]

2016-09-24 Thread Jochen Sprickerhof
* Nick Warne  [2016-09-24 17:39]:
> rm config.h, and it builds fine from scratch.  make clean doesn't
> remove config.h (should it?).

No, it should not. config.h is your own configuration and you should
know how to update it if config.def.h changes.


signature.asc
Description: PGP signature


Re: [dev] [ST] scroll patch build failure [Really SOLVED]

2016-09-24 Thread Nick Warne
On Fri, 23 Sep 2016 17:09:36 +0100
Nick Warne  wrote:

> I am not getting much luck here (do _I_ suck?) :(
> 
> dwm and st work great so far and I am well impressed and happy; but
> any patches I apply either fail:
> 
> http://lists.suckless.org/dev/1609/30448.html
> 
> (I have since tried git versions, and it fails to build - but more
> later, that is on the back-burner for a mo)
> 
> ...or get build errors:
> 
> apply the patch to st for scrollback.  Latest git
> and latest diff. Patches fine.
> 
> > make  
> 
> st.c:337:12: error: ‘histsize’ undeclared here (not in a function)
>   Line hist[histsize]; /* history buffer */
> 
> I have read through the code several times for about an hour, but
> can't work out what is going on?

OK, working on the scrollback X crash problem, I found out what is going
on here for the record.

Get git st, build it, install it.  Now get the scrollback patch, apply,
and build.

Then the build error hapens, as you already have a config.h that is not
updated from config.mk.

rm config.h, and it builds fine from scratch.  make clean doesn't
remove config.h (should it?).

Nick
-- 
"Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
-- Doctor Who "Androids of Tara"



Re: [dev] [ST] scroll patch build failure

2016-09-23 Thread Nick Warne
On Fri, 23 Sep 2016 13:43:22 -0300
Draco Metallium(Rodrigo S. Cañibano)  wrote:

> My bad!

No way!

I just cloned st again, got the patch, applied, all builds now and
works OK.

Thanks,

Works a treat.

Nick

> I should have copy the line from the patch itself and not from my
> config.
> 
> On 23 September 2016 at 13:40, Nick Warne  wrote:
> > On Fri, 23 Sep 2016 17:36:21 +0100
> > Nick Warne  wrote:
> >  
> >> On Fri, 23 Sep 2016 13:32:14 -0300
> >> Draco Metallium(Rodrigo S. Cañibano)  wrote:
> >>  
> >> > > st.c:337:12: error: ‘histsize’ undeclared here (not in a
> >> > > function) Line hist[histsize]; /* history buffer */  
> >> >
> >> > In the scroll patch 'histsize' is added to config.def.h, and
> >> > therefore to config.h. Didn't that patch apply?
> >> >
> >> > Does your config.h have a line with "#define histsize 5000"?
> >> >  
> >>
> >> No, nor does:
> >>
> >> st-scrollback-20160727-308bfbf.diff
> >>
> >> I guess I don't suck ;)  
> >
> > Or maybe I do:
> >
> >  #define histsize 2000
> >
> > Ummm.  Let me start again.
> >
> > Nick
> > --
> > "Gosh that takes me back... or is it forward?  That's the trouble
> > with time travel, you never can tell."
> > -- Doctor Who "Androids of Tara"
> >  
> 



-- 
"Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
-- Doctor Who "Androids of Tara"



Re: [dev] [ST] scroll patch build failure

2016-09-23 Thread Rodrigo S. Cañibano
My bad!

I should have copy the line from the patch itself and not from my config.

On 23 September 2016 at 13:40, Nick Warne  wrote:
> On Fri, 23 Sep 2016 17:36:21 +0100
> Nick Warne  wrote:
>
>> On Fri, 23 Sep 2016 13:32:14 -0300
>> Draco Metallium(Rodrigo S. Cañibano)  wrote:
>>
>> > > st.c:337:12: error: ‘histsize’ undeclared here (not in a function)
>> > >   Line hist[histsize]; /* history buffer */
>> >
>> > In the scroll patch 'histsize' is added to config.def.h, and
>> > therefore to config.h. Didn't that patch apply?
>> >
>> > Does your config.h have a line with "#define histsize 5000"?
>> >
>>
>> No, nor does:
>>
>> st-scrollback-20160727-308bfbf.diff
>>
>> I guess I don't suck ;)
>
> Or maybe I do:
>
>  #define histsize 2000
>
> Ummm.  Let me start again.
>
> Nick
> --
> "Gosh that takes me back... or is it forward?  That's the trouble with
> time travel, you never can tell."
> -- Doctor Who "Androids of Tara"
>



Re: [dev] [ST] scroll patch build failure

2016-09-23 Thread Nick Warne
On Fri, 23 Sep 2016 13:32:14 -0300
Draco Metallium(Rodrigo S. Cañibano)  wrote:

> > st.c:337:12: error: ‘histsize’ undeclared here (not in a function)
> >   Line hist[histsize]; /* history buffer */  
> 
> In the scroll patch 'histsize' is added to config.def.h, and therefore
> to config.h. Didn't that patch apply?
> 
> Does your config.h have a line with "#define histsize 5000"?
> 

No, nor does:

st-scrollback-20160727-308bfbf.diff

I guess I don't suck ;)

Nick
-- 
"Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
-- Doctor Who "Androids of Tara"



Re: [dev] [ST] scroll patch build failure

2016-09-23 Thread Nick Warne
On Fri, 23 Sep 2016 17:36:21 +0100
Nick Warne  wrote:

> On Fri, 23 Sep 2016 13:32:14 -0300
> Draco Metallium(Rodrigo S. Cañibano)  wrote:
> 
> > > st.c:337:12: error: ‘histsize’ undeclared here (not in a function)
> > >   Line hist[histsize]; /* history buffer */
> > 
> > In the scroll patch 'histsize' is added to config.def.h, and
> > therefore to config.h. Didn't that patch apply?
> > 
> > Does your config.h have a line with "#define histsize 5000"?
> >   
> 
> No, nor does:
> 
> st-scrollback-20160727-308bfbf.diff
> 
> I guess I don't suck ;)

Or maybe I do:

 #define histsize 2000

Ummm.  Let me start again.

Nick
-- 
"Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
-- Doctor Who "Androids of Tara"



Re: [dev] [ST] scroll patch build failure

2016-09-23 Thread Rodrigo S. Cañibano
> st.c:337:12: error: ‘histsize’ undeclared here (not in a function)
>   Line hist[histsize]; /* history buffer */

In the scroll patch 'histsize' is added to config.def.h, and therefore
to config.h. Didn't that patch apply?

Does your config.h have a line with "#define histsize 5000"?



Re: [dev] [ST] scroll patch build failure [SOLVED]

2016-09-23 Thread Nick Warne
On Fri, 23 Sep 2016 17:09:36 +0100
Nick Warne  wrote:

> I am not getting much luck here (do _I_ suck?) :(
> 
> dwm and st work great so far and I am well impressed and happy; but
> any patches I apply either fail:
> 
> http://lists.suckless.org/dev/1609/30448.html
> 
> (I have since tried git versions, and it fails to build - but more
> later, that is on the back-burner for a mo)
> 
> ...or get build errors:
> 
> apply the patch to st for scrollback.  Latest git
> and latest diff. Patches fine.
> 
> > make
> 
> st.c:337:12: error: ‘histsize’ undeclared here (not in a function)
>   Line hist[histsize]; /* history buffer */
> 
> I have read through the code several times for about an hour, but
> can't work out what is going on?
> 
> Ideas?

Talking to myself and going mad, I sorted it.

GCC being pedantic:

#CFLAGS += -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os ${INCS}
${CPPFLAGS} CFLAGS += -g -std=c99 -Wall -Wvariadic-macros -Os ${INCS}
${CPPFLAGS}

All built and works great!

Thanks,

Nick
-- 
"Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
-- Doctor Who "Androids of Tara"