Re: [blfs-support] Odd issue with killall in logrotate.conf (sysv)

2018-10-14 Thread Ken Moffat via blfs-support
On Sun, Oct 14, 2018 at 04:32:18PM -0500, Bruce Dubbs via blfs-support wrote:
> On 10/14/2018 03:55 PM, Ken Moffat via blfs-support wrote:
> > My own /etc/logrotate.conf is slightly different from what is in the
> > book.  In particular, I have been following the manpage and using a
> > postrotate command to kill the syslog.
> > 
> > /var/log/sys.log {
> >  compress
> >  rotate 4
> >  weekly
> >  postrotate
> >  echo "rotating syslog"
> >  /bin/killall -HUP syslogd
> >  endscript
> > }
> 
> The difference between that and the book is very minor.  you added compress
> and echo and removed the size option.
> 

I see it now, in the logrotate.d/ directory.

> > Up to and including LFS/BLFS-8.3 this worked fine (syslog gets
> > killed, so it stops writing to the old file).  But on my two recent
> > svn systems I've noticed errors being reported.  On a quick look, I
> > diudn't understand what it appeared to be telling me, so since the
> > boxes were working okay I left it until I had time to look.
> > 
> > Now that I have looked, I realised that it was 'killall' that was
> > barfing and giving me its "help" output, followed by an error
> > message from logrotate.
> > 
> > Manually trying variants of killall, killall -s failed to find
> > anything that worked, so in the end I used
> > /etc/rc.d/init.d/sysklogd restart
> 
> On the command line of my 9.3 system I did:
> 
> $ sudo killall -HUP syslogd
> 
> And then in /var/log/sys.log I have:
> 
> Oct 14 16:22:28 frodo83 syslogd 1.5.1: restart.
> 
> So that appears to work for me.
> 
> > That works, I now get a fresh log (my current desktop is one of the
> > affected systems, it rotated a bit over 3 hours ago but was still
> > writing to sys.log.1 until I restarted sysklogd.
> > 
> > Is this a problem with the latest psmisc ?
> 
> I do not think so.  Works for me.
> 
> > I worry that my band-aid is doing rather too much (it takes several
> > seconds to run, maybe I'm losing kernel logging).  I'm also puzzled
> > why the book does not have something like this in its example:
> 
> It does.
> 

OK, I accept that part.
> do
> > other people's systems not continue to write to the moved
> > /var/log/sys.log.1 leaving sys.log empty until there is a reboot ?
> 
> I've not checked that.  I have not installed fcron, but I will and get back
> to you if I see a problem.
> 
>   -- Bruce

For the record, here is what I got from the last logrotate before I
made the change.  I hd initially assumed something in logrotate
itself had changed (skimmed the message, looked particularly at the
end).

From: root@origin (fcron)
To: ken@milliways.mydomain
Subject: fcron  /usr/sbin/logrotate /etc/logrotate.conf

rotating syslog
Usage: killall [OPTION]... [--] NAME...
   killall -l, --list
   killall -V, --version

  -e,--exact  require exact match for very long names
  -I,--ignore-casecase insensitive process name match
  -g,--process-group  kill process group instead of process
  -y,--younger-than   kill processes younger than TIME
  -o,--older-than kill processes older than TIME
  -i,--interactiveask for confirmation before killing
  -l,--list   list all known signal names
  -q,--quiet  don't print complaints
  -r,--regexp interpret NAME as an extended regular expression
  -s,--signal SIGNAL  send this signal instead of SIGTERM
  -u,--user USER  kill only process(es) running as USER
  -v,--verbosereport if the signal was successfully sent
  -V,--versiondisplay version information
  -w,--wait   wait for processes to die
  -n,--ns PID match processes that belong to the same namespaces
  as PID

error: error running non-shared postrotate script for /var/log/sys.log of 
'/var/log/sys.log '
rotating minor log(s)
rotating power management logs
rotating power management logs
Job '/usr/sbin/logrotate /etc/logrotate.conf' terminated (exit status: 1) 
(mailing output)


-- 
Is it about a bicycle ?
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Odd issue with killall in logrotate.conf (sysv)

2018-10-14 Thread Bruce Dubbs via blfs-support

On 10/14/2018 03:55 PM, Ken Moffat via blfs-support wrote:

My own /etc/logrotate.conf is slightly different from what is in the
book.  In particular, I have been following the manpage and using a
postrotate command to kill the syslog.

/var/log/sys.log {
 compress
 rotate 4
 weekly
 postrotate
 echo "rotating syslog"
 /bin/killall -HUP syslogd
 endscript
}


The difference between that and the book is very minor.  you added 
compress and echo and removed the size option.



Up to and including LFS/BLFS-8.3 this worked fine (syslog gets
killed, so it stops writing to the old file).  But on my two recent
svn systems I've noticed errors being reported.  On a quick look, I
diudn't understand what it appeared to be telling me, so since the
boxes were working okay I left it until I had time to look.

Now that I have looked, I realised that it was 'killall' that was
barfing and giving me its "help" output, followed by an error
message from logrotate.

Manually trying variants of killall, killall -s failed to find
anything that worked, so in the end I used
/etc/rc.d/init.d/sysklogd restart


On the command line of my 9.3 system I did:

$ sudo killall -HUP syslogd

And then in /var/log/sys.log I have:

Oct 14 16:22:28 frodo83 syslogd 1.5.1: restart.

So that appears to work for me.


That works, I now get a fresh log (my current desktop is one of the
affected systems, it rotated a bit over 3 hours ago but was still
writing to sys.log.1 until I restarted sysklogd.

Is this a problem with the latest psmisc ?


I do not think so.  Works for me.


I worry that my band-aid is doing rather too much (it takes several
seconds to run, maybe I'm losing kernel logging).  I'm also puzzled
why the book does not have something like this in its example: 


It does.

do

other people's systems not continue to write to the moved
/var/log/sys.log.1 leaving sys.log empty until there is a reboot ?


I've not checked that.  I have not installed fcron, but I will and get 
back to you if I see a problem.


  -- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Poppler-0.67.0 gtk-test.dir/all Error 2 - BLFS 8.3

2018-10-14 Thread rhubarbpieguy via blfs-support

On 10/11/18 9:57 PM, Michael Shell via blfs-support wrote:

On Thu, 11 Oct 2018 17:58:44 -0500
rhubarbpieguy via blfs-support  
wrote:



I see two batches of Error 2 errors.  I hope this is what you want:

We want to see not just the error message, but the actual g++ command
line that caused the error.

When you build via:

make VERBOSE=1

you should be able to see all the gcc/g++ commands as they are being
executed, long lines like:

/usr/bin/c++  -DUSE_OPENJPEG2 -Dpoppler_EXPORTS -I

Do you see all that? The one that tries to compile gtk-test.cc
just before the error message is the one we are interested in.


   Cheers,

   Mike


That's clearer; I hope this is what you want.  I earlier referred to two 
batches of Error 2 errors, but I included the make install output by 
accident.



[ 89%] Building CXX object test/CMakeFiles/gtk-test.dir/gtk-test.cc.o
cd /sources/poppler-0.67.0/build/test && /usr/bin/c++ -DUSE_OPENJPEG2 
-I/sources/poppler-0.67.0 -I/sources/poppler-0.67.0/fofi 
-I/sources/poppler-0.67.0/goo -I/sources/poppler-0.67.0/poppler 
-I/sources/poppler-0.67.0/build -I/sources/poppler-0.67.0/build/poppler 
-I/sources/poppler-0.67.0/glib -I/sources/poppler-0.67.0/build/glib 
-I/usr/include/openjpeg-2.3 -isystem /usr/include/freetype2 -isystem 
/usr/include/gtk-3.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem 
/usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -isystem 
/usr/lib/dbus-1.0/include -isystem /usr/include/gio-unix-2.0 -isystem 
/usr/include/cairo -isystem /usr/include/libdrm -isystem 
/usr/include/pango-1.0 -isystem /usr/include/fribidi -isystem 
/usr/include/atk-1.0 -isystem /usr/include/pixman-1 -isystem 
/usr/include/uuid -isystem /usr/include/harfbuzz -isystem 
/usr/include/libpng16 -isystem /usr/include/gdk-pixbuf-2.0 -isystem 
/usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem 
//usr/include  -Wall -Wextra -Wpedantic -Wno-unused-parameter 
-Wcast-align -Wformat-security -Wframe-larger-than=65536 -Wlogical-op 
-Wmissing-format-attribute -Wnon-virtual-dtor -Woverloaded-virtual 
-Wmissing-declarations -Wundef -Wzero-as-null-pointer-constant 
-Wsuggest-override -fno-exceptions -fno-check-new -fno-common 
-D_DEFAULT_SOURCE -O2 -DNDEBUG -I/usr/include/nss -I/usr/include/nspr 
-pthread -std=c++11 -o CMakeFiles/gtk-test.dir/gtk-test.cc.o -c 
/sources/poppler-0.67.0/test/gtk-test.cc

In file included from /usr/include/c++/8.2.0/ext/string_conversions.h:41,
 from /usr/include/c++/8.2.0/bits/basic_string.h:6391,
 from /usr/include/c++/8.2.0/string:52,
 from /sources/poppler-0.67.0/goo/GooString.h:42,
 from /sources/poppler-0.67.0/poppler/Object.h:45,
 from /sources/poppler-0.67.0/poppler/GfxState.h:43,
 from /sources/poppler-0.67.0/splash/SplashBitmap.h:39,
 from /sources/poppler-0.67.0/test/gtk-test.cc:9:
/usr/include/c++/8.2.0/cstdlib:75:15: fatal error: stdlib.h: No such 
file or directory

 #include_next 
   ^~
compilation terminated.
make[2]: *** [test/CMakeFiles/gtk-test.dir/build.make:63: 
test/CMakeFiles/gtk-test.dir/gtk-test.cc.o] Error 1

make[2]: Leaving directory '/sources/poppler-0.67.0/build'
make[1]: *** [CMakeFiles/Makefile2:803: 
test/CMakeFiles/gtk-test.dir/all] Error 2

make[1]: Leaving directory '/sources/poppler-0.67.0/build'
make: *** [Makefile:141: all] Error 2


The first occurrence I see of Dpoppler prior to the error is as follows:

[ 79%] Building CXX object 
glib/CMakeFiles/poppler-glib.dir/__/poppler/CairoRescaleBox.cc.o
cd /sources/poppler-0.67.0/build/glib && /usr/bin/c++ 
-DG_LOG_DOMAIN=\"Poppler\" -DUSE_OPENJPEG2 -Dpoppler_glib_EXPORTS 
-I/sources/poppler-0.67.0 -I/sources/poppler-0.67.0/fofi 
-I/sources/poppler-0.67.0/goo -I/sources/poppler-0.67.0/poppler 
-I/sources/poppler-0.67.0/build -I/sources/poppler-0.67.0/build/poppler 
-I/sources/poppler-0.67.0/glib -I/sources/poppler-0.67.0/build/glib 
-I/usr/include/freetype2 -I/usr/include/openjpeg-2.3 -isystem 
/usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem 
/usr/include/cairo -Wall -Wextra -Wpedantic -Wno-unused-parameter 
-Wcast-align -Wformat-security -Wframe-larger-than=65536 -Wlogical-op 
-Wmissing-format-attribute -Wnon-virtual-dtor -Woverloaded-virtual 
-Wmissing-declarations -Wundef -Wzero-as-null-pointer-constant 
-Wsuggest-override -fno-exceptions -fno-check-new -fno-common 
-D_DEFAULT_SOURCE -O2 -DNDEBUG  -fPIC   -I/usr/include/nss 
-I/usr/include/nspr -pthread  -DG_DISABLE_DEPRECATED 
-DG_DISABLE_SINGLE_INCLUDES -pthread -std=c++11 -o 
CMakeFiles/poppler-glib.dir/__/poppler/CairoRescaleBox.cc.o -c 
/sources/poppler-0.67.0/poppler/CairoRescaleBox.cc


--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Poppler-0.67.0 gtk-test.dir/all Error 2 - BLFS 8.3

2018-10-14 Thread Bruce Dubbs via blfs-support

On 10/14/2018 02:28 PM, rhubarbpieguy via blfs-support wrote:


In file included from /usr/include/c++/8.2.0/ext/string_conversions.h:41,
  from /usr/include/c++/8.2.0/bits/basic_string.h:6391,
  from /usr/include/c++/8.2.0/string:52,
  from /sources/poppler-0.67.0/goo/GooString.h:42,
  from /sources/poppler-0.67.0/poppler/Object.h:45,
  from /sources/poppler-0.67.0/poppler/GfxState.h:43,
  from /sources/poppler-0.67.0/splash/SplashBitmap.h:39,
  from /sources/poppler-0.67.0/test/gtk-test.cc:9:
/usr/include/c++/8.2.0/cstdlib:75:15: fatal error: stdlib.h: No such 
file or directory

  #include_next 
    ^~
compilation terminated.


I have seen this before, but in LFS.  This type of error seems to be an 
issue with the glibc or gcc build from LFS Chapter 6.  I have never been 
able to pin down exactly what build error causes this, but my solution 
for students is to go back and restart Chapter 6.


I know you do not want to hear this, but you have a problem with your 
tool chain.  At a minimum, you should have:


/usr/include/bits/stdlib.h
/usr/include/c++/8.2.0/tr1/stdlib.h
/usr/include/c++/8.2.0/stdlib.h
/usr/include/stdlib.h

  -- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Odd issue with killall in logrotate.conf (sysv)

2018-10-14 Thread Ken Moffat via blfs-support
On Sun, Oct 14, 2018 at 09:55:38PM +0100, Ken Moffat via blfs-support wrote:
> 
> Is this a problem with the latest psmisc ?
> 
Possibly, https://gitlab.com/psmisc/psmisc/issues/13

If so, it has been fixed upstream.

-- 
Is it about a bicycle ?
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Poppler-0.67.0 gtk-test.dir/all Error 2 - BLFS 8.3

2018-10-14 Thread Michael Shell via blfs-support
On Sun, 14 Oct 2018 21:23:06 -0500
rhubarbpieguy via blfs-support  wrote:

> OK, it's not that big a deal to redo LFS 8.3.  I've nuked all my log 
> files but don't remember a problem with the output of "Adjusting the 
> Toolchain."  Regardless, I'll go again and save that output.  I'll 
> repost either way to this topic with the outcome.


Wait on that. At this point, I do not think it is a problem with your
system. You have already indicated that your system has all the include
files Bruce asked about. 

I believe I see a mistake in the poppler source code. Try my latest poppler
patch tests first and then we'll go from that.


Bruce, Ken: have you tried compiling poppler 0.63 or later on a system with:

  1. GTK3 v3.8 or later
 
  2. gcc 8.2

Did you build poppler *before* GTK3 is installed, or are you using a gcc prior
to 8.2?


  Cheers,

  Mike






-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Poppler-0.67.0 gtk-test.dir/all Error 2 - BLFS 8.3

2018-10-14 Thread Michael Shell via blfs-support
On Sun, 14 Oct 2018 14:28:01 -0500
rhubarbpieguy via blfs-support  wrote:

> [ 89%] Building CXX object test/CMakeFiles/gtk-test.dir/gtk-test.cc.o
> ..
> /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem 
> //usr/include  -Wall -Wextra -Wpedantic -Wno-unused-parameter 
> ..


Good! Note the strange/suspicious include construct: 

-isystem //usr/include


Now, for the next test, try the following two attached patches on poppler
0.67 (should work on any version 0.63 or later) without using any other
patches (starting with a fresh poppler 0.67 unpack):

patch -p1 -i ../poppler_revert_gtk3_include_dirs.patch
patch -p1 -i ../poppler_gtk-test_force_build_fail.patch

mkdir build
cdbuild
cmake  -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr 
-DTESTDATADIR=$PWD/testfiles -DENABLE_XPDF_HEADERS=ON ..
 
make VERBOSE=1


The build will fail, but in a different way (as is intended so you can
easily locate the same c++ command line). Show us the c++ command line
that failed (but it would have worked had it not been for 
poppler_gtk-test_force_build_fail.patch) so we can compare it to the
previous failure.


Then, test the new attached poppler_fix_cmake_gtk3_include_dir.patch on
poppler 0.67 (should work on any version 0.63 or later) *without* using
any other patches (starting with a fresh poppler 0.67 unpack):

patch -p1 -i ../poppler_fix_cmake_gtk3_include_dir.patch

mkdir build
cdbuild
cmake  -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr 
-DTESTDATADIR=$PWD/testfiles -DENABLE_XPDF_HEADERS=ON ..
 
make VERBOSE=1


And let us know if it compiles OK and, if not, show us the c++ command
line that failed.


   Mike




poppler_fix_cmake_gtk3_include_dir.patch
Description: Binary data


poppler_gtk-test_force_build_fail.patch
Description: Binary data


poppler_revert_gtk3_include_dirs.patch
Description: Binary data
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Poppler-0.67.0 gtk-test.dir/all Error 2 - BLFS 8.3

2018-10-14 Thread Bruce Dubbs via blfs-support

On 10/14/2018 09:23 PM, rhubarbpieguy via blfs-support wrote:


On 10/14/18 3:05 PM, Bruce Dubbs via blfs-support wrote:

On 10/14/2018 02:28 PM, rhubarbpieguy via blfs-support wrote:

In file included from 
/usr/include/c++/8.2.0/ext/string_conversions.h:41,

  from /usr/include/c++/8.2.0/bits/basic_string.h:6391,
  from /usr/include/c++/8.2.0/string:52,
  from /sources/poppler-0.67.0/goo/GooString.h:42,
  from /sources/poppler-0.67.0/poppler/Object.h:45,
  from /sources/poppler-0.67.0/poppler/GfxState.h:43,
  from /sources/poppler-0.67.0/splash/SplashBitmap.h:39,
  from /sources/poppler-0.67.0/test/gtk-test.cc:9:
/usr/include/c++/8.2.0/cstdlib:75:15: fatal error: stdlib.h: No such 
file or directory

  #include_next 
    ^~
compilation terminated.


I have seen this before, but in LFS.  This type of error seems to be 
an issue with the glibc or gcc build from LFS Chapter 6.  I have never 
been able to pin down exactly what build error causes this, but my 
solution for students is to go back and restart Chapter 6.


I know you do not want to hear this, but you have a problem with your 
tool chain.  At a minimum, you should have:


/usr/include/bits/stdlib.h
/usr/include/c++/8.2.0/tr1/stdlib.h
/usr/include/c++/8.2.0/stdlib.h
/usr/include/stdlib.h


OK, it's not that big a deal to redo LFS 8.3.  I've nuked all my log 
files but don't remember a problem with the output of "Adjusting the 
Toolchain."  Regardless, I'll go again and save that output.  I'll 
repost either way to this topic with the outcome.


Also, take a look at 
http://anduin.linuxfromscratch.org/~bdubbs/sanity.html.  If you are 
using the -dev book (or systemd), there are probably differences, but 
they should be very few if checking after gcc in Chapter 6.


  -- Bruce



--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Poppler-0.67.0 gtk-test.dir/all Error 2 - BLFS 8.3

2018-10-14 Thread Bruce Dubbs via blfs-support

On 10/15/2018 12:13 AM, Michael Shell via blfs-support wrote:

On Sun, 14 Oct 2018 21:23:06 -0500
rhubarbpieguy via blfs-support  wrote:


OK, it's not that big a deal to redo LFS 8.3.  I've nuked all my log
files but don't remember a problem with the output of "Adjusting the
Toolchain."  Regardless, I'll go again and save that output.  I'll
repost either way to this topic with the outcome.



Wait on that. At this point, I do not think it is a problem with your
system. You have already indicated that your system has all the include
files Bruce asked about.

I believe I see a mistake in the poppler source code. Try my latest poppler
patch tests first and then we'll go from that.


Bruce, Ken: have you tried compiling poppler 0.63 or later on a system with:

   1. GTK3 v3.8 or later
  
   2. gcc 8.2


Yes.

Sun Aug 19 16:59:53 CDT 2018 /usr/src/gtk3/gtk+-3.22.30.tar.xz
gcc (GCC) 8.2.0 (LFS 8,3)


Did you build poppler *before* GTK3 is installed, or are you using a gcc prior
to 8.2? 


Tue Aug 21 12:21:47 CDT 2018 /usr/src/poppler/poppler-0.67.0.tar.xz
Sat Sep  8 22:20:00 CDT 2018 /usr/src/poppler/poppler-0.68.0.tar.xz
Sun Oct  7 22:54:36 CDT 2018 /usr/src/poppler/poppler-0.69.0.tar.xz

I have had no problems when building poppler using the instructions in BLFS.

  -- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-support] Poppler-0.67.0 gtk-test.dir/all Error 2 - BLFS 8.3

2018-10-14 Thread Michael Shell via blfs-support
On Mon, 15 Oct 2018 00:31:15 -0500
Bruce Dubbs via blfs-support  wrote:

> Yes.


  Bruce,

OK, could run the following build test on poppler 0.67 applying the
attached poppler_gtk-test_force_build_fail.patch (and no other patches):


patch -p1 -i ../poppler_gtk-test_force_build_fail.patch

mkdir build
cdbuild
cmake  -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr 
-DTESTDATADIR=$PWD/testfiles -DENABLE_XPDF_HEADERS=ON ..
 
make VERBOSE=1


The build should fail at gtk-test.cc. Show us the c++ command line 
for gtk-test.cc. Then we can compare how your c++ is being invoked to
build gtk-test.cc to that of rhubarbpieguy.

If the build does *not* fail, can you explain why there is no build
attempt for test/gtk-test.cc on your system (e.g., GTK3 not detected,
etc.)?


  Cheers,

  Mike


poppler_gtk-test_force_build_fail.patch
Description: Binary data
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page