From: Martin P. <ma...@pe...> - 2008-08-26 01:58:59
|
I have installed frebsd 7 into VM and tried compiling pdfedit. All went fine except part with kpdf-kde-3.3.2 This is excerpt from "gmake" run in top-level directory touch /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2/Makefile.qt cd /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2 && gmake -f Makefile.gui staticlib gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' gmake[2]: *** No rule to make target `staticlib'. Stop. gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' What is strange is that command "touch" is nowhere to be found in any makefile rules or makefiles or elsewhere. Any idea why is this happening? This creates empty makefile, which effectively halts compilation. When the makefile is manually removed and gmake run again, the empty file is created again. The complete output of gmake qoutputdevices run from src directory [bilbo@f732 /usr/home/bilbo/pdfedit/src]$ gmake qoutputdevices cd /usr/home/bilbo/pdfedit/src/xpdf && gmake libxpdf gmake[1]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf' cd goo && gmake gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf/goo' gmake[2]: Nothing to be done for `all'. gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf/goo' cd fofi && gmake gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf/fofi' gmake[2]: Nothing to be done for `all'. gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf/fofi' cd splash && gmake gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf/splash' gmake[2]: Nothing to be done for `all'. gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf/splash' cd xpdf && gmake libxpdf gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf/xpdf' gmake[2]: Nothing to be done for `libxpdf'. gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf/xpdf' gmake[1]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf' touch /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2/Makefile.qt cd /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2 && gmake -f Makefile.gui staticlib gmake[1]: Entering directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' gmake[1]: *** No rule to make target `staticlib'. Stop. gmake[1]: Leaving directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' gmake: *** [qoutputdevices] Error 2 Martin Petricek -- GPG/PGP Public key: http://www.petricek.net/petricm.pgp Fingerprint 6AA8 FFCE C061 1CB2 55F0 A1F3 3AA9 EB4F BD50 C1B8 /------------------------------------------------------------\ | WWW: http://www.petricek.net/ | \------------------------------------------------------------/ |
From: Michal H. <ms...@gm...> - 2008-08-26 04:08:48
|
On Tue, Aug 26, 2008 at 03:58:55AM +0200, Martin Petricek wrote: > I have installed frebsd 7 into VM and tried compiling pdfedit. All went > fine except part with kpdf-kde-3.3.2 Did you use pdfedit-core-dev patchset, or is it just bare CVS tree? Parallel make is disabled, isn't it? > > This is excerpt from "gmake" run in top-level directory > > touch /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2/Makefile.qt > cd /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2 && gmake -f Makefile.gui > staticlib > gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' > gmake[2]: *** No rule to make target `staticlib'. Stop. > gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' > > What is strange is that command "touch" is nowhere to be found in any > makefile rules or makefiles or elsewhere. Any idea why is this happening? Which parameters for configure have you used? touch is certainly not there - maybe some confusion with QMAKE variable? qoutputdevices: xpdf $(QOUTPUTDEVROOT)/Makefile.qt cd $(QOUTPUTDEVROOT) && $(MAKE) -f Makefile.gui staticlib $(QOUTPUTDEVROOT)/Makefile.qt: $(QOUTPUTDEVROOT)/Makefile.gui $(QOUTPUTDEVROOT)/qoutputdevices.pro cd $(QOUTPUTDEVROOT) && $(QMAKE) -o Makefile.qt Can you try to echo QMAKE right before the above line? > This creates empty makefile, which effectively halts compilation. When the > makefile is manually removed and gmake run again, the empty file is created > again. > > The complete output of gmake qoutputdevices run from src directory > [bilbo@f732 /usr/home/bilbo/pdfedit/src]$ gmake qoutputdevices > cd /usr/home/bilbo/pdfedit/src/xpdf && gmake libxpdf > gmake[1]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf' > cd goo && gmake > gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf/goo' > gmake[2]: Nothing to be done for `all'. > gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf/goo' > cd fofi && gmake > gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf/fofi' > gmake[2]: Nothing to be done for `all'. > gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf/fofi' > cd splash && gmake > gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf/splash' > gmake[2]: Nothing to be done for `all'. > gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf/splash' > cd xpdf && gmake libxpdf > gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/xpdf/xpdf' > gmake[2]: Nothing to be done for `libxpdf'. > gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf/xpdf' > gmake[1]: Leaving directory `/usr/home/bilbo/pdfedit/src/xpdf' > touch /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2/Makefile.qt > cd /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2 && gmake -f Makefile.gui > staticlib > gmake[1]: Entering directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' > gmake[1]: *** No rule to make target `staticlib'. Stop. > gmake[1]: Leaving directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' > gmake: *** [qoutputdevices] Error 2 This reminds me the question why do we use qmake for these qoutput devices and what are they used for? Is Qt required the for code from here? -- Michal Hocko |
From: Martin P. <ma...@pe...> - 2008-08-26 22:01:49
|
> On Tue, Aug 26, 2008 at 03:58:55AM +0200, Martin Petricek wrote: >> I have installed frebsd 7 into VM and tried compiling pdfedit. All went >> fine except part with kpdf-kde-3.3.2 > > Did you use pdfedit-core-dev patchset, or is it just bare CVS tree? Bare CVS .... I just tried to check if I have everything necessary for compilation instaled in the VM. > Parallel make is disabled, isn't it? Yes, there is no /proc on freebsd, therefore no parallelism (plus the virtual machine have only one virtual processor anyways). >> This is excerpt from "gmake" run in top-level directory >> >> touch /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2/Makefile.qt >> cd /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2&& gmake -f Makefile.gui >> staticlib >> gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' >> gmake[2]: *** No rule to make target `staticlib'. Stop. >> gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' >> >> What is strange is that command "touch" is nowhere to be found in any >> makefile rules or makefiles or elsewhere. Any idea why is this happening? > > Which parameters for configure have you used? touch is certainly not > there - maybe some confusion with QMAKE variable? No parameters. Just "./configure" > qoutputdevices: xpdf $(QOUTPUTDEVROOT)/Makefile.qt > cd $(QOUTPUTDEVROOT)&& $(MAKE) -f Makefile.gui staticlib > > $(QOUTPUTDEVROOT)/Makefile.qt: $(QOUTPUTDEVROOT)/Makefile.gui $(QOUTPUTDEVROOT)/qoutputdevices.pro > cd $(QOUTPUTDEVROOT)&& $(QMAKE) -o Makefile.qt > > Can you try to echo QMAKE right before the above line? Changed to: $(QOUTPUTDEVROOT)/Makefile.qt: $(QOUTPUTDEVROOT)/Makefile.gui $(QOUTPUTDEVROOT)/qoutputdevices.pro echo QMAKE is $(QMAKE) cd $(QOUTPUTDEVROOT)&& $(QMAKE) -o Makefile.qt But seems to have absolutely no effect. Nothing is printed. Perhaps some default rule overrides this? What is very weird, once I use "gmake -d" (-d should print debugging stuff to console), things start working normally and Makefile.qt is also generated normally. GNU make bug perhaps? When I used gmake --help, I discovered parameter "-t" that does "touch targets instead of remaking them". Seems it is somehow used, but I wonder how does it get there? I have not noticed -t parameter anywhere in makefiles or any relevant files ... but seems that for part of the compilation is is used ... Weird. >> This creates empty makefile, which effectively halts compilation. When the >> makefile is manually removed and gmake run again, the empty file is created >> again. >> > > This reminds me the question why do we use qmake for these qoutput devices > and what are they used for? Is Qt required the for code from here? Because it is Qt code. Therefore we use QMake. The code was originally created by Miro - it is used to render PDF on the screen (and Qt is needed for this). But maybe it could be moved to gui subdirectory and added to the files there (as logically it is part of GUI). Should I do that? Martin Petricek -- GPG/PGP Public key: http://www.petricek.net/petricm.pgp Fingerprint 6AA8 FFCE C061 1CB2 55F0 A1F3 3AA9 EB4F BD50 C1B8 /------------------------------------------------------------\ | WWW: http://www.petricek.net/ | \------------------------------------------------------------/ |
From: Michal H. <ms...@gm...> - 2008-08-26 22:17:11
|
On Wed, Aug 27, 2008 at 12:01:46AM +0200, Martin Petricek wrote: > > On Tue, Aug 26, 2008 at 03:58:55AM +0200, Martin Petricek wrote: > >> I have installed frebsd 7 into VM and tried compiling pdfedit. All went > >> fine except part with kpdf-kde-3.3.2 > > > > Did you use pdfedit-core-dev patchset, or is it just bare CVS tree? > > Bare CVS .... I just tried to check if I have everything necessary for > compilation instaled in the VM. > > > Parallel make is disabled, isn't it? > > Yes, there is no /proc on freebsd, therefore no parallelism (plus the > virtual machine have only one virtual processor anyways). yes, but you could have set it by --with-parallel-make=NUMBER. > > >> This is excerpt from "gmake" run in top-level directory > >> > >> touch /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2/Makefile.qt > >> cd /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2&& gmake -f Makefile.gui > >> staticlib > >> gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' > >> gmake[2]: *** No rule to make target `staticlib'. Stop. > >> gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' > >> > >> What is strange is that command "touch" is nowhere to be found in any > >> makefile rules or makefiles or elsewhere. Any idea why is this happening? > > > > Which parameters for configure have you used? touch is certainly not > > there - maybe some confusion with QMAKE variable? > > No parameters. Just "./configure" > > > qoutputdevices: xpdf $(QOUTPUTDEVROOT)/Makefile.qt > > cd $(QOUTPUTDEVROOT)&& $(MAKE) -f Makefile.gui staticlib > > > > $(QOUTPUTDEVROOT)/Makefile.qt: $(QOUTPUTDEVROOT)/Makefile.gui $(QOUTPUTDEVROOT)/qoutputdevices.pro > > cd $(QOUTPUTDEVROOT)&& $(QMAKE) -o Makefile.qt > > > > Can you try to echo QMAKE right before the above line? > > Changed to: > $(QOUTPUTDEVROOT)/Makefile.qt: $(QOUTPUTDEVROOT)/Makefile.gui > $(QOUTPUTDEVROOT)/qoutputdevices.pro > echo QMAKE is $(QMAKE) > cd $(QOUTPUTDEVROOT)&& $(QMAKE) -o Makefile.qt > > But seems to have absolutely no effect. Nothing is printed. Perhaps some > default rule overrides this? > What is very weird, once I use "gmake -d" (-d should print debugging stuff > to console), things start working normally and Makefile.qt is also > generated normally. GNU make bug perhaps? > > When I used gmake --help, I discovered parameter "-t" that does "touch > targets instead of remaking them". Seems it is somehow used, but I wonder > how does it get there? I have not noticed -t parameter anywhere in > makefiles or any relevant files ... but seems that for part of the > compilation is is used ... What is the value fo MAKEFLAGS? > Weird. > > >> This creates empty makefile, which effectively halts compilation. When the > >> makefile is manually removed and gmake run again, the empty file is created > >> again. > >> > > > > This reminds me the question why do we use qmake for these qoutput devices > > and what are they used for? Is Qt required the for code from here? > > Because it is Qt code. Therefore we use QMake. The code was originally > created by Miro - it is used to render PDF on the screen (and Qt is needed > for this). > > But maybe it could be moved to gui subdirectory and added to the files > there (as logically it is part of GUI). Should I do that? I think it woule be better, but don't do it in the CVS now to prevent some conflicts. Maybe we could postpone it until QT4 port. What do you think about that? > > Martin Petricek -- Michal Hocko |
From: Michal H. <ms...@gm...> - 2008-08-27 19:46:18
|
On Wed, Aug 27, 2008 at 12:01:46AM +0200, Martin Petricek wrote: > > On Tue, Aug 26, 2008 at 03:58:55AM +0200, Martin Petricek wrote: > >> I have installed frebsd 7 into VM and tried compiling pdfedit. All went > >> fine except part with kpdf-kde-3.3.2 > > > > Did you use pdfedit-core-dev patchset, or is it just bare CVS tree? > > Bare CVS .... I just tried to check if I have everything necessary for > compilation instaled in the VM. > > > Parallel make is disabled, isn't it? > > Yes, there is no /proc on freebsd, therefore no parallelism (plus the > virtual machine have only one virtual processor anyways). > > >> This is excerpt from "gmake" run in top-level directory > >> > >> touch /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2/Makefile.qt > >> cd /usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2&& gmake -f Makefile.gui > >> staticlib > >> gmake[2]: Entering directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' > >> gmake[2]: *** No rule to make target `staticlib'. Stop. > >> gmake[2]: Leaving directory `/usr/home/bilbo/pdfedit/src/kpdf-kde-3.3.2' > >> > >> What is strange is that command "touch" is nowhere to be found in any > >> makefile rules or makefiles or elsewhere. Any idea why is this happening? > > > > Which parameters for configure have you used? touch is certainly not > > there - maybe some confusion with QMAKE variable? > > No parameters. Just "./configure" > > > qoutputdevices: xpdf $(QOUTPUTDEVROOT)/Makefile.qt > > cd $(QOUTPUTDEVROOT)&& $(MAKE) -f Makefile.gui staticlib > > > > $(QOUTPUTDEVROOT)/Makefile.qt: $(QOUTPUTDEVROOT)/Makefile.gui $(QOUTPUTDEVROOT)/qoutputdevices.pro > > cd $(QOUTPUTDEVROOT)&& $(QMAKE) -o Makefile.qt > > > > Can you try to echo QMAKE right before the above line? > > Changed to: > $(QOUTPUTDEVROOT)/Makefile.qt: $(QOUTPUTDEVROOT)/Makefile.gui > $(QOUTPUTDEVROOT)/qoutputdevices.pro > echo QMAKE is $(QMAKE) > cd $(QOUTPUTDEVROOT)&& $(QMAKE) -o Makefile.qt > > But seems to have absolutely no effect. Nothing is printed. Perhaps some > default rule overrides this? > What is very weird, once I use "gmake -d" (-d should print debugging stuff > to console), things start working normally and Makefile.qt is also > generated normally. GNU make bug perhaps? > > When I used gmake --help, I discovered parameter "-t" that does "touch > targets instead of remaking them". Seems it is somehow used, but I wonder > how does it get there? I have not noticed -t parameter anywhere in > makefiles or any relevant files ... but seems that for part of the > compilation is is used ... > Weird. [For reference] This is caused by the parallel_make patch which doesn't set properly parallel_make variable exported by configure for Makefile.flags.in when autodetection fails or there is only one CPU available. Fix is already in the CVS. [...] -- Michal Hocko |
From: Michal H. <ms...@gm...> - 2008-08-27 21:46:59
|
On Wed, Aug 27, 2008 at 11:43:08PM +0200, Martin Petricek wrote: >> What about: >> CPU_NUM=`which sysctl&& sysctl -n hw.ncpu` > > That would print name of the binary if it is found, therefore we have to > add -s parameter to suppress it: > > CPU_NUM=`which -s sysctl&& sysctl -n hw.ncpu` > > should then do the trick and be silent all times OK. I think that either this way or /bin/sh -c is ok. My ACK, you can commit either one to the CVS -- Michal Hocko |
From: Martin P. <ma...@pe...> - 2008-08-27 23:47:15
|
Michal Hocko wrote: > On Wed, Aug 27, 2008 at 11:43:08PM +0200, Martin Petricek wrote: >>> What about: >>> CPU_NUM=`which sysctl&& sysctl -n hw.ncpu` >> That would print name of the binary if it is found, therefore we have to >> add -s parameter to suppress it: >> >> CPU_NUM=`which -s sysctl&& sysctl -n hw.ncpu` >> >> should then do the trick and be silent all times > > OK. > I think that either this way or /bin/sh -c is ok. > My ACK, you can commit either one to the CVS I discovered that "-s" parameter is supported in "which" on FreeBSD, but not in Debian. Therefore I decided to use '/bin/sh' approach. Martin Petricek -- GPG/PGP Public key: http://www.petricek.net/petricm.pgp Fingerprint 6AA8 FFCE C061 1CB2 55F0 A1F3 3AA9 EB4F BD50 C1B8 /------------------------------------------------------------\ | WWW: http://www.petricek.net/ | \------------------------------------------------------------/ |
From: Martin P. <ma...@pe...> - 2008-08-27 20:40:18
Attachments:
sysctl.patch
|
Attached patch for review - query number of processors/cores on BSD systems (where no /proc/cpuinfo is available), using sysctl command and use the value for parallel make. Tested on FreeBSD 7 Martin Petricek |
From: Michal H. <ms...@gm...> - 2008-08-27 20:54:40
|
On Wed, Aug 27, 2008 at 10:40:16PM +0200, Martin Petricek wrote: > Attached patch for review - query number of processors/cores on BSD > systems (where no /proc/cpuinfo is available), using sysctl command and > use the value for parallel make. > > Tested on FreeBSD 7 > > Martin Petricek > Index: configure.in > =================================================================== > RCS file: /cvsroot/pdfedit/pdfedit/configure.in,v > retrieving revision 1.26 > diff -u -r1.26 configure.in > --- configure.in 27 Aug 2008 17:37:47 -0000 1.26 > +++ configure.in 27 Aug 2008 20:37:33 -0000 > @@ -254,6 +254,7 @@ > if test -f /proc/cpuinfo > then > { > + dnl /proc/cpuinfo is available in Linux and cygwin systems > CPU_NUM=`grep "^processor" /proc/cpuinfo | wc -l` > if test $CPU_NUM -gt 1 > then > @@ -264,8 +265,27 @@ > fi > } > else > + { > AC_MSG_RESULT(not available) > - dnl TODO checks for other platforms > + AC_MSG_CHECKING(for sysctl ) > + dnl sysctl is available on BSD systems > + CPU_NUM=`sysctl -n hw.ncpu` Can we check whether sysctl binary exists? I am getting ./configure: line 6774: sysctl: command not found when /proc/cpuinfo is disabled on my machine (I have simply changed cpuinfo to cpuinfo1 to simulate different system). > + if test -n "$CPU_NUM" > + then > + { > + if test $CPU_NUM -gt 1 > + then > + AC_MSG_RESULT($CPU_NUM CPUs/Cores available - using $CPU_NUM parallel jobs) > + parallel_make="-j$CPU_NUM" > + else > + AC_MSG_RESULT(Only one CPU available - no parallelism) > + fi > + } > + else > + AC_MSG_RESULT(not available) > + dnl TODO checks for other platforms > + fi > + } > fi > } > else -- Michal Hocko |
From: Martin P. <ma...@pe...> - 2008-08-27 21:31:23
|
> Can we check whether sysctl binary exists? > I am getting ./configure: line 6774: sysctl: command not found when > /proc/cpuinfo is disabled on my machine (I have simply changed cpuinfo > to cpuinfo1 to simulate different system). Well, for that we would need to search $PATH for sysctl. We have macro CHK_EXECUTABLE for that (used to select correct qmake), disadvantage of the macro is that it will automatically add quite unneded parameters like -with-sysctl=... and it is like using cannon to kill the fly. Maybe replacing `sysctl -n hw.ncpu` with `/bin/sh -c 'sysctl -n hw.ncpu' 2>/dev/null` would do the trick better (i.e. sending any errors to /dev/null) Martin Petricek -- GPG/PGP Public key: http://www.petricek.net/petricm.pgp Fingerprint 6AA8 FFCE C061 1CB2 55F0 A1F3 3AA9 EB4F BD50 C1B8 /------------------------------------------------------------\ | WWW: http://www.petricek.net/ | \------------------------------------------------------------/ |
From: Michal H. <ms...@gm...> - 2008-08-27 21:36:03
|
On Wed, Aug 27, 2008 at 02:54:48PM -0600, Michal Hocko wrote: > On Wed, Aug 27, 2008 at 10:40:16PM +0200, Martin Petricek wrote: > > Attached patch for review - query number of processors/cores on BSD > > systems (where no /proc/cpuinfo is available), using sysctl command and > > use the value for parallel make. > > > > Tested on FreeBSD 7 > > > > Martin Petricek > > > Index: configure.in > > =================================================================== > > RCS file: /cvsroot/pdfedit/pdfedit/configure.in,v > > retrieving revision 1.26 > > diff -u -r1.26 configure.in > > --- configure.in 27 Aug 2008 17:37:47 -0000 1.26 > > +++ configure.in 27 Aug 2008 20:37:33 -0000 > > @@ -254,6 +254,7 @@ > > if test -f /proc/cpuinfo > > then > > { > > + dnl /proc/cpuinfo is available in Linux and cygwin systems > > CPU_NUM=`grep "^processor" /proc/cpuinfo | wc -l` > > if test $CPU_NUM -gt 1 > > then > > @@ -264,8 +265,27 @@ > > fi > > } > > else > > + { > > AC_MSG_RESULT(not available) > > - dnl TODO checks for other platforms > > + AC_MSG_CHECKING(for sysctl ) > > + dnl sysctl is available on BSD systems > > + CPU_NUM=`sysctl -n hw.ncpu` > > Can we check whether sysctl binary exists? What about: CPU_NUM=`which sysctl && sysctl -n hw.ncpu` > I am getting ./configure: line 6774: sysctl: command not found when > /proc/cpuinfo is disabled on my machine (I have simply changed cpuinfo > to cpuinfo1 to simulate different system). [...] -- Michal Hocko |