Bug 219 - datarootdir entry missing from Makefile.in in 4.1.3 tarball.
: datarootdir entry missing from Makefile.in in 4.1.3 tarball.
Status: NEW
Product: TORQUE
Documentation
: 4.0.*
: PC Linux
: P5 normal
Assigned To: Ken Nielson
:
:
:
  Show dependency treegraph
 
Reported: 2012-10-31 11:46 MDT by John Hanks
Modified: 2012-11-01 17:18 MDT (History)
2 users (show)

See Also:


Attachments
conifg.log when hwloc is not found. (74.88 KB, text/plain)
2012-11-01 17:18 MDT, John Hanks
Details
config.log after running autoreconf -f -i (166.47 KB, application/octet-stream)
2012-11-01 17:18 MDT, John Hanks
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description John Hanks 2012-10-31 11:46:41 MDT
Building torque-4.1.3 on CentOS 6.3 with --enable-drmaa results in these
warnings during ./configure:

configure: creating ./config.status
config.status: creating torque.spec
config.status: creating buildutils/pbs_mkdirs
config.status: creating buildutils/self-extract-head-sh
config.status: creating buildutils/modulefiles
config.status: WARNING:  'buildutils/modulefiles.in' seems to ignore the
--datarootdir setting
config.status: creating buildutils/modulefiles.vers
config.status: creating Makefile
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir
setting
config.status: creating contrib/blcr/Makefile
config.status: creating contrib/init.d/Makefile
config.status: creating doc/Makefile
config.status: creating doc/man1/Makefile
config.status: creating doc/man3/Makefile
config.status: creating doc/man7/Makefile
config.status: creating doc/man8/Makefile
config.status: creating src/Makefile
config.status: creating src/cmds/Makefile
config.status: WARNING:  'src/cmds/Makefile.in' seems to ignore the
--datarootdir setting
config.status: creating src/daemon_client/Makefile
config.status: WARNING:  'src/daemon_client/Makefile.in' seems to ignore the
--datarootdir setting
config.status: creating src/gui/Makefile
config.status: WARNING:  'src/gui/Makefile.in' seems to ignore the
--datarootdir setting
config.status: creating src/gui/Ccode/Makefile
config.status: WARNING:  'src/gui/Ccode/Makefile.in' seems to ignore the
--datarootdir setting
config.status: creating src/include/Makefile
...

This appears to be the result of the tarball having it's Makefile.in and
modulefile.in files produced with an autoconf earlier that 2.60, see
http://www.gnu.org/software/autoconf/manual/autoconf.html#Changed-Directory-Variables.
A workaround that worked for me is:

# Add datarootdir to all Makefile.in files:
find . -name Makefile.in -exec sed -i 's/datadir = @datadir@/datadir =
@datadir@\ndatarootdir = @datarootdir@/g' {} \;

A more "correct" fix might be to produce the tarball on a host with newer
autoconf tools. When I check out the 4.1.3 branch and run autogen.sh on a clean
copy it produces correct *.in files to build on CentOS 6.3.

griznog
Comment 1 Michael Jennings 2012-10-31 11:50:34 MDT
datarootdir is a little tricky to get right, so let me take a look at this. 
The Adaptive guys are pretty busy right now anyway.

Your suggested workaround is a little strange, though, since autogen.sh runs
automake which *should* be overwriting Makefile.in files.

But in any event, I'll take a look at holler back.
Comment 2 John Hanks 2012-10-31 11:51:56 MDT
Sorry, I should add that make install fails when the install attempts to put
the torque-drmaa docs in /doc due to --prefix and datadir being ignored. 

jbh

(In reply to comment #0)
> Building torque-4.1.3 on CentOS 6.3 with --enable-drmaa results in these
> warnings during ./configure:
> 
> configure: creating ./config.status
> config.status: creating torque.spec
> config.status: creating buildutils/pbs_mkdirs
> config.status: creating buildutils/self-extract-head-sh
> config.status: creating buildutils/modulefiles
> config.status: WARNING:  'buildutils/modulefiles.in' seems to ignore the
> --datarootdir setting
> config.status: creating buildutils/modulefiles.vers
> config.status: creating Makefile
> config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir
> setting
> config.status: creating contrib/blcr/Makefile
> config.status: creating contrib/init.d/Makefile
> config.status: creating doc/Makefile
> config.status: creating doc/man1/Makefile
> config.status: creating doc/man3/Makefile
> config.status: creating doc/man7/Makefile
> config.status: creating doc/man8/Makefile
> config.status: creating src/Makefile
> config.status: creating src/cmds/Makefile
> config.status: WARNING:  'src/cmds/Makefile.in' seems to ignore the
> --datarootdir setting
> config.status: creating src/daemon_client/Makefile
> config.status: WARNING:  'src/daemon_client/Makefile.in' seems to ignore the
> --datarootdir setting
> config.status: creating src/gui/Makefile
> config.status: WARNING:  'src/gui/Makefile.in' seems to ignore the
> --datarootdir setting
> config.status: creating src/gui/Ccode/Makefile
> config.status: WARNING:  'src/gui/Ccode/Makefile.in' seems to ignore the
> --datarootdir setting
> config.status: creating src/include/Makefile
> ...
> 
> This appears to be the result of the tarball having it's Makefile.in and
> modulefile.in files produced with an autoconf earlier that 2.60, see
> http://www.gnu.org/software/autoconf/manual/autoconf.html#Changed-Directory-Variables.
> A workaround that worked for me is:
> 
> # Add datarootdir to all Makefile.in files:
> find . -name Makefile.in -exec sed -i 's/datadir = @datadir@/datadir =
> @datadir@\ndatarootdir = @datarootdir@/g' {} \;
> 
> A more "correct" fix might be to produce the tarball on a host with newer
> autoconf tools. When I check out the 4.1.3 branch and run autogen.sh on a clean
> copy it produces correct *.in files to build on CentOS 6.3.
> 
> griznog
Comment 3 Michael Jennings 2012-10-31 15:55:11 MDT
I'm unable to reproduce this with the pristine tarball on SL6.3.  I get no
datarootdir warnings, and that variable doesn't occur anywhere in the source
tree.

Are you sure you didn't mistakenly run "autogen.sh" before building?
Comment 4 John Hanks 2012-11-01 14:50:06 MDT
I didn't *mistakenly* run autogen.sh but I did run it. On my CentOS 6.3 system
configure failed to find the hwloc libraries and the config.log output had a
comment suggesting that I run autogen.sh to fix that. FWIW, it worked for the
hwloc detection, but since hwloc fails before any datarootdir warning appear I
don't know what would happen on my systems with a pristine tarball beyond hwloc
detection.


(In reply to comment #3)
> I'm unable to reproduce this with the pristine tarball on SL6.3.  I get no
> datarootdir warnings, and that variable doesn't occur anywhere in the source
> tree.
> 
> Are you sure you didn't mistakenly run "autogen.sh" before building?
Comment 5 John Hanks 2012-11-01 14:55:12 MDT
It would probably help to include the complete configure command:

./configure --prefix=/rc/tools/free/redhat_6_x86_64/torque-4.1.3
--with-server-home=/rc/torque/server --with-default-server=torque.rc.usu.edu
--enable-drmaa --with-rcp=scp --with-maildomain=usu.edu
--disable-mom-checkspool --disable-spool --enable-cpuset --enable-blcr
--with-rcp=scp --enable-syslog
Comment 6 Michael Jennings 2012-11-01 15:42:24 MDT
Running autogen.sh is what caused the datarootdir problem.  This bug should
probably be closed since there's nothing to fix, and we can help you resolve
the hwloc issue.

You could also try "autoreconf -f -i" on either the pristine tarball or the
tree you ran autogen.sh on to see if it helps either or both situations.
Comment 7 John Hanks 2012-11-01 17:15:51 MDT
Starting on the tree that I had previously built from after adding the
datarootdir lines ot the Makefile.in filesautoreconf -f -i ended with:

autoreconf: automake failed with exit status: 1

configure correctly found hwloc and make install works correctly.

Starting from a freshly extracted tarball:

./configure fails with:

checking for HWLOC... configure: error: cpuset support requires the hwloc
package



This can be solved by configuring with --with-hwloc-path=<path>. This path
should be the path to the directory containing the lib/ and include/
directories
for your version of hwloc.
Another option is adding the directory containing 'hwloc.pc'
to the PKG_CONFIG_PATH environment variable.

If you have done these and still get this  error, try running ./autogen.sh and
then configuring again.

hwloc-devel is installed and using --with-hwloc-path and/or setting
PK_CONFIG_PATH to the proper place doesn't solve this.

 autoreconf -f -i exits with the last line being 

autoreconf: automake failed with exit status: 1

./configure now works, but gives lots of the warnings like:

config.status: WARNING:  'src/scheduler.cc/samples/fifo/Makefile.in' seems to
ignore the --datarootdir setting

make install then fails with:

test -z "/tmp/torque-4.1.3/include" || /bin/mkdir -p
"/tmp/torque-4.1.3/include"
 /usr/bin/install -c -m 644 'drmaa.h' '/tmp/torque-4.1.3/include/drmaa.h'
make[5]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa/src'
make[4]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa/src'
make[3]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa/src'
Making install in test
make[3]: Entering directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa/test'
make[4]: Entering directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa/test'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa/test'
make[3]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa/test'
make[3]: Entering directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa'
make[4]: Entering directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa'
make[4]: Nothing to be done for `install-exec-am'.
( cd doc; find -type f -exec /usr/bin/install -c -m 644 -D '{}'
'/doc/torque-drmaa/{}' \; )
/usr/bin/install: cannot create directory /doc: Permission denied
/usr/bin/install: cannot create directory /doc: Permission denied
/usr/bin/install: cannot create directory /doc: Permission denied
  [jbh note: previous message repeated *many* times.]
test -z "/doc/torque-drmaa" || /bin/mkdir -p "/doc/torque-drmaa"
/bin/mkdir: cannot create directory `/doc': Permission denied
make[4]: *** [install-pkgdocDATA] Error 1
make[4]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src/drmaa'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory
`/rc/tools/source/torque/torque-4.1.3/torque-4.1.3/src'
make: *** [install-recursive] Error 1

Will attach config.log files from the failed hwloc attempt and the post
autoreconf attempt.
Comment 8 John Hanks 2012-11-01 17:18:05 MDT
Created an attachment (id=119) [details]
conifg.log when hwloc is not found.
Comment 9 John Hanks 2012-11-01 17:18:51 MDT
Created an attachment (id=120) [details]
config.log after running autoreconf -f -i