LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing m4 (https://www.linuxquestions.org/questions/linux-newbie-8/installing-m4-586059/)

zigoto 09-20-2007 09:01 AM

Installing m4
 
I use OpenSuse-10.2 and I want to update m4 to m4-1.4.10.

I downloaded-uncompressed m4-1.4.10 from ftp.gnu.org/gnu/ to /telechar/m4.1.4.10

cd telechar/m4-1.4.10
./configure --prefix=/usr OK
make OK
checkinstall --> /usr/src/packages/RPMS/i586/m4-1.4.10-1.i586.rpm

I go to the directory containing this rpm :
rpm -U m4-1.4.10-1.i586.rpm
I get this error message : "The file /usr/share/info/dir of the m4-1.4.10-1 installation conflicts with the file of the info-4.8-43 package".

What that? What must I do?

jschiwal 09-20-2007 10:17 AM

/usr/share/info/dir is a data file for the info system. It is the top of the info tree. The installation of m4 may modify it to include itself in the main info page, but it shouldn't replace the entire file.

Take a look at the rpm you produced: "rpm -qlp m4-<version>.rpm".

For version 1.4.6.19, here is the post-install script:
Code:

postinstall scriptlet (using /bin/sh):

        ALL_ARGS=(--info-dir=/usr/share/info /usr/share/info/m4.info.gz)
        NUM_ARGS=${#ALL_ARGS[@]}
        if test -x sbin/install-info ; then
            if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then
                sbin/install-info "${ALL_ARGS[@]}"
            fi
        fi ;

From the install-info manpage:
Code:

NAME
      install-info - update info/dir entries

SYNOPSIS
      install-info [OPTION]... [INFO-FILE [DIR-FILE]]

DESCRIPTION
      Install or delete dir entries from INFO-FILE in the Info directory file DIR-FILE.

If this is all your install script does with the info/dir file then it should be safe to force the installation.

Also check the options you used in the configure phase. If you chose a different info-dir than what the system uses, that might be part of the problem.

Check "./configure --help" and see if there is an "--info-dir=..." option.

zigoto 09-21-2007 01:45 AM

Sorry, I don't understand well. I am really a newbie for rpm.

<<Take a look at the rpm you produced: "rpm -qlp m4-<version>.rpm" :
/usr
/usr/bin
/usr/bin/m4
/usr/share
/usr/share/doc
/usr/share/doc/packages
/usr/share/doc/packages/m4-1.4.10
/usr/share/doc/packages/m4-1.4.10/AUTHORS
/usr/share/doc/packages/m4-1.4.10/COPYING
/usr/share/doc/packages/m4-1.4.10/ChangeLog
/usr/share/doc/packages/m4-1.4.10/INSTALL
/usr/share/doc/packages/m4-1.4.10/NEWS
/usr/share/doc/packages/m4-1.4.10/README
/usr/share/doc/packages/m4-1.4.10/THANKS
/usr/share/doc/packages/m4-1.4.10/TODO
/usr/share/doc/packages/m4-1.4.10/doc
/usr/share/doc/packages/m4-1.4.10/doc/Makefile
/usr/share/doc/packages/m4-1.4.10/doc/Makefile.am
/usr/share/doc/packages/m4-1.4.10/doc/Makefile.in
/usr/share/doc/packages/m4-1.4.10/doc/fdl.texi
/usr/share/doc/packages/m4-1.4.10/doc/gendocs_template
/usr/share/doc/packages/m4-1.4.10/doc/gpl-3.0.texi
/usr/share/doc/packages/m4-1.4.10/doc/m4.1
/usr/share/doc/packages/m4-1.4.10/doc/m4.info
/usr/share/doc/packages/m4-1.4.10/doc/m4.texinfo
/usr/share/doc/packages/m4-1.4.10/doc/mdate-sh
/usr/share/doc/packages/m4-1.4.10/doc/stamp-vti
/usr/share/doc/packages/m4-1.4.10/doc/texinfo.tex
/usr/share/doc/packages/m4-1.4.10/doc/version.texi
/usr/share/info
/usr/share/info/dir
/usr/share/info/m4.info.gz
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/m4.1.gz

<< For version 1.4.6.19, here is the post-install script:
What is the post-install-script? Where can I find it?

<< From the install-info manpage:
<< If this is all your install script does with the info/dir file then it should be safe to force the installation.
Yes, it is so. How can I force the installation?

<< Also check the options you used in the configure phase. If you chose a different info-dir than what the system uses, that might be part of the problem.
I only used --prefix=/usr. Is there some log for ./configure?
I don't know how I can choose a different info-dir...

<< Check "./configure --help" and see if there is an "--info-dir=..." option.
It seems it exists :
`configure' configures GNU M4 1.4.10 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']

Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/m4]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]

Thanks for your answer.

jschiwal 09-21-2007 11:16 AM

Code:

/usr/share/info
/usr/share/info/dir
/usr/share/info/m4.info.gz

I highlighted the problem. You can read the rpm scripts with:
Code:

rpm -qp path/to/rpm-<version>.rpm --scripts
Since you are installing from source, you could try "info-dir=/usr/share/info sudo make --install" instead to install.

If your installation scriptlet doesn't look like the one I posted, you could also make a backup of of the old /usr/share/info/dir file, run the installation with rpm -Uhv --force, and then compare the new dir file with the old one.

Alternately, you could restore the backup and run:
Code:

        ALL_ARGS=(--info-dir=/usr/share/info /usr/share/info/m4.info.gz)
        NUM_ARGS=${#ALL_ARGS[@]}
        if test -x sbin/install-info ; then
            if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then
                sbin/install-info "${ALL_ARGS[@]}"
            fi
        fi ;

This code simply inserts an entry for m4 in the top info page. It will probably be the same, so first try out "info" and "info m4" with the "dir" file, since the old M4 entry is present, and the m4.info.gz filename is the same.

zigoto 09-22-2007 02:39 PM

rpm -Uvh m4-1.4.10-1.i586.rpm --force
OK.
I got the same error when up-dating automake, and solved it
in the same way.
(--force creates a copy of the old 'dir' file : dir.rpmsave)

My autogen.sh works back :-)

Thank you for your help.

jschiwal 09-23-2007 05:24 AM

Glad to hear it. If entering "info" to get the top page has a working entry for "m4" then you don't need to run the install-info script.


All times are GMT -5. The time now is 04:50 PM.