Mailing List Archive

problem with default include/library files installation location -- ?
Hi,

Some time ago I've talked to Paul about a problem I'm having with the
installation locations for quagga's header/lib files; by default, those
seem to be /usr/local/{include,lib}. However, installing files with
general names like memory.h or log.h to those locations, seems to screw
up building of some other packages, as /usr/local/include appears to be
in the default inclusion path of my gcc (I'm running a latest Gentoo
system).

What Paul has agreed to do, is change the default location(s) to
/usr/local/{include,lib}/quagga, thus preventing this kind of trouble,
yet still allowing other packages to be compiled with quagga's
headers/libraries. Paul recalled that Greg Troxel already had applied
this change to CVS, however it doesn't seem to work.

Does anybody know for sure what's the status of CVS tree with regard to
default installation locations?

Many thanks,
Gilad
Re: problem with default include/library files installation location -- ? [ In reply to ]
What Paul has agreed to do, is change the default location(s) to
/usr/local/{include,lib}/quagga, thus preventing this kind of trouble,
yet still allowing other packages to be compiled with quagga's
headers/libraries. Paul recalled that Greg Troxel already had applied
this change to CVS, however it doesn't seem to work.

I did, and it works for me.

The change is in lib/Makefile.am, which sets

pkginclude_HEADERS = \

instead of include_HEADERS, which leads to Makefile.in having:

pkgincludedir = $(includedir)/@PACKAGE@

install-pkgincludeHEADERS: $(pkginclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
$(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
done

which leads to Makfile having:

pkgincludedir = $(includedir)/quagga


See the automake manual, node Headers.


Full details follow:

I just did a build with sources from CVS with no local changes (on
NetBSD 1.6.2ish/i386). I had run configure:

$ ./configure --prefix=/usr/quagga --sysconfdir=/etc/zebra --localstatedir=/var/run/zebra --enable-exampledir=/usr/quagga/share/examples/zebra --disable-isisd --enable-opaque-lsa --no-create --no-recursion

And got

$ ls -lR /usr/quagga

total 6
drwxr-xr-x 3 root wheel 512 Dec 22 15:09 include
drwxr-xr-x 2 root wheel 512 Mar 22 08:20 info
drwxr-xr-x 2 root wheel 512 Mar 22 08:20 lib
drwxr-xr-x 4 root wheel 512 Dec 22 15:09 man
drwxr-xr-x 2 root wheel 512 Mar 22 08:20 sbin
drwxr-xr-x 3 root wheel 512 Dec 22 15:09 share

/usr/quagga/include:
total 1
drwxr-xr-x 4 root wheel 1024 Mar 22 08:20 quagga

/usr/quagga/include/quagga:
total 127
-rw-r--r-- 1 root wheel 2107 Mar 22 08:20 buffer.h
-rw-r--r-- 1 root wheel 10366 Mar 22 08:20 command.h
-rw-r--r-- 1 root wheel 32 Mar 22 08:20 debug.h
-rw-r--r-- 1 root wheel 1779 Mar 22 08:20 distribute.h
-rw-r--r-- 1 root wheel 1716 Mar 22 08:20 filter.h
-rw-r--r-- 1 root wheel 4591 Mar 22 08:20 getopt.h
-rw-r--r-- 1 root wheel 1819 Mar 22 08:20 hash.h
-rw-r--r-- 1 root wheel 6580 Mar 22 08:20 if.h
-rw-r--r-- 1 root wheel 1324 Mar 22 08:20 if_rmap.h
-rw-r--r-- 1 root wheel 1403 Mar 22 08:20 keychain.h
-rw-r--r-- 1 root wheel 2991 Mar 22 08:20 linklist.h
-rw-r--r-- 1 root wheel 3600 Mar 22 08:20 log.h
-rw-r--r-- 1 root wheel 5546 Mar 22 08:20 md5-gnu.h
-rw-r--r-- 1 root wheel 6044 Mar 22 08:20 memory.h
-rw-r--r-- 1 root wheel 977 Mar 22 08:20 network.h
drwxr-xr-x 2 root wheel 512 Mar 22 08:20 ospfapi
drwxr-xr-x 2 root wheel 512 Mar 22 08:20 ospfd
-rw-r--r-- 1 root wheel 1995 Mar 22 08:20 plist.h
-rw-r--r-- 1 root wheel 4884 Mar 22 08:20 prefix.h
-rw-r--r-- 1 root wheel 2562 Mar 22 08:20 privs.h
-rw-r--r-- 1 root wheel 4405 Mar 22 08:20 routemap.h
-rw-r--r-- 1 root wheel 1573 Mar 22 08:20 sigevent.h
-rw-r--r-- 1 root wheel 4258 Mar 22 08:20 smux.h
-rw-r--r-- 1 root wheel 1371 Mar 22 08:20 sockopt.h
-rw-r--r-- 1 root wheel 3798 Mar 22 08:20 sockunion.h
-rw-r--r-- 1 root wheel 444 Mar 22 08:20 str.h
-rw-r--r-- 1 root wheel 3516 Mar 22 08:20 stream.h
-rw-r--r-- 1 root wheel 2293 Mar 22 08:20 table.h
-rw-r--r-- 1 root wheel 5145 Mar 22 08:20 thread.h
-rw-r--r-- 1 root wheel 1911 Mar 22 08:20 vector.h
-rw-r--r-- 1 root wheel 1244 Mar 22 08:20 version.h
-rw-r--r-- 1 root wheel 5705 Mar 22 08:20 vty.h
-rw-r--r-- 1 root wheel 4513 Mar 22 08:20 zclient.h
-rw-r--r-- 1 root wheel 10735 Mar 22 08:20 zebra.h

/usr/quagga/include/quagga/ospfapi:
total 5
-rw-r--r-- 1 root wheel 4621 Mar 22 08:20 ospf_apiclient.h

/usr/quagga/include/quagga/ospfd:
total 69
-rw-r--r-- 1 root wheel 10571 Mar 22 08:20 ospf_api.h
-rw-r--r-- 1 root wheel 2638 Mar 22 08:20 ospf_asbr.h
-rw-r--r-- 1 root wheel 4603 Mar 22 08:20 ospf_dump.h
-rw-r--r-- 1 root wheel 3445 Mar 22 08:20 ospf_ism.h
-rw-r--r-- 1 root wheel 10343 Mar 22 08:20 ospf_lsa.h
-rw-r--r-- 1 root wheel 3334 Mar 22 08:20 ospf_lsdb.h
-rw-r--r-- 1 root wheel 3403 Mar 22 08:20 ospf_nsm.h
-rw-r--r-- 1 root wheel 6150 Mar 22 08:20 ospf_opaque.h
-rw-r--r-- 1 root wheel 19840 Mar 22 08:20 ospfd.h

/usr/quagga/info:
total 377
-rw-r--r-- 1 root wheel 609 Mar 22 08:20 dir
-rw-r--r-- 1 root wheel 187787 Mar 22 08:20 quagga.info
-rw-r--r-- 1 root wheel 51019 Dec 22 15:09 quagga.info-1
-rw-r--r-- 1 root wheel 51053 Dec 22 15:09 quagga.info-2
-rw-r--r-- 1 root wheel 40509 Dec 22 15:09 quagga.info-3
-rw-r--r-- 1 root wheel 44632 Dec 22 15:09 quagga.info-4

/usr/quagga/lib:
total 6248
-rw-r--r-- 1 root wheel 3227108 Mar 22 08:20 libospf.a
-rw-r--r-- 1 root wheel 112494 Mar 22 08:20 libospfapiclient.a
-rw-r--r-- 1 root wheel 3030596 Mar 22 08:20 libzebra.a

/usr/quagga/man:
total 2
drwxr-xr-x 2 root wheel 512 Mar 22 08:20 man1
drwxr-xr-x 2 root wheel 512 Mar 22 08:20 man8

/usr/quagga/man/man1:
total 2
-rw-r--r-- 1 root wheel 1178 Mar 22 08:20 vtysh.1

/usr/quagga/man/man8:
total 24
-rw-r--r-- 1 root wheel 4047 Mar 22 08:20 bgpd.8
-rw-r--r-- 1 root wheel 2866 Mar 22 08:20 ospf6d.8
-rw-r--r-- 1 root wheel 2946 Mar 22 08:20 ospfd.8
-rw-r--r-- 1 root wheel 5345 Mar 22 08:20 ripd.8
-rw-r--r-- 1 root wheel 3204 Mar 22 08:20 ripngd.8
-rw-r--r-- 1 root wheel 3371 Mar 22 08:20 zebra.8

/usr/quagga/sbin:
total 7704
-rwxr-xr-x 1 root wheel 1744685 Mar 22 08:20 bgpd
-rwxr-xr-x 1 root wheel 1080129 Mar 22 08:20 ospf6d
-rwxr-xr-x 1 root wheel 1182673 Mar 22 08:20 ospfclient
-rwxr-xr-x 1 root wheel 1432424 Mar 22 08:20 ospfd
-rwxr-xr-x 1 root wheel 861636 Mar 22 08:20 ripd
-rwxr-xr-x 1 root wheel 781966 Mar 22 08:20 ripngd
-rwxr-xr-x 1 root wheel 725222 Mar 22 08:20 zebra

/usr/quagga/share:
total 1
drwxr-xr-x 3 root wheel 512 Dec 22 15:09 examples

/usr/quagga/share/examples:
total 1
drwxr-xr-x 2 root wheel 512 Mar 22 08:20 zebra

/usr/quagga/share/examples/zebra:
total 10
-rw-r--r-- 1 root wheel 570 Mar 22 08:20 bgpd.conf.sample
-rw-r--r-- 1 root wheel 2801 Mar 22 08:20 bgpd.conf.sample2
-rw-r--r-- 1 root wheel 1170 Mar 22 08:20 ospf6d.conf.sample
-rw-r--r-- 1 root wheel 182 Mar 22 08:20 ospfd.conf.sample
-rw-r--r-- 1 root wheel 410 Mar 22 08:20 ripd.conf.sample
-rw-r--r-- 1 root wheel 394 Mar 22 08:20 ripngd.conf.sample
-rw-r--r-- 1 root wheel 373 Mar 22 08:20 zebra.conf.sample


--
Greg Troxel <gdt@ir.bbn.com>
Re: problem with default include/library files installation location -- ? [ In reply to ]
Hi,

Sorry for the late reply, but here goes...


Greg Troxel wrote:

> The change is in lib/Makefile.am, which sets
>
> pkginclude_HEADERS = \
>
> instead of include_HEADERS, which leads to Makefile.in having:
>
> pkgincludedir = $(includedir)/@PACKAGE@
>
> install-pkgincludeHEADERS: $(pkginclude_HEADERS)
> @$(NORMAL_INSTALL)
> test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
> @list='$(pkginclude_HEADERS)'; for p in $$list; do \
> if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
> f="`echo $$p | sed -e 's|^.*/||'`"; \
> echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
> $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
> done

I can see the two above changes. However...


> which leads to Makfile having:
>
> pkgincludedir = $(includedir)/quagga

This one does not show up. I keep seeing the original line in lib/Makefile:

pkgincludedir = $(includedir)/

(I simply issued './configure', with no additional arguments.)

How do you explain that? What additional information do you need? I'll
be happy to provide any (versions, logs, etc).

Thanks,
Gilad
Re: problem with default include/library files installation location -- ? [ In reply to ]
@PACKAGE@ should get set to quagga from the call to AC_INIT in
configure.ac. Check config.status etc. to find how how that is set.
Re: problem with default include/library files installation location -- ? [ In reply to ]
The problem was that automake 1.5 doesn't set @PACKAGE@, so that
includes don't get put in the quagga subdir. configure.ac failed to
state the requirement to use newer automake, and gentoo's
automake-chooser-script guessed 1.5, probably assuming that something
without a prereq statement wanted old automake.

I committed a change to configure.ac to require automake 1.7. I
chose 1.7 rather than 1.8 to avoid forcing upgrades that weren't
needed, but probably people should use 1.8. If there is trouble with
1.7 I'll bump it to 1.8 - just let me know.

I didn't do anything to move the libs. I note that the libs aren't
built/installed shared, and are statically linked into the binaries.
This would be nice to fix IMHO, but I'm curious how others see this.

--
Greg Troxel <gdt@ir.bbn.com>
Re: problem with default include/library files installation location -- ? [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Greg,

| The problem was that automake 1.5 doesn't set @PACKAGE@, so that
| includes don't get put in the quagga subdir. configure.ac failed to
| state the requirement to use newer automake, and gentoo's
| automake-chooser-script guessed 1.5, probably assuming that something
| without a prereq statement wanted old automake.
|
| I committed a change to configure.ac to require automake 1.7. I
| chose 1.7 rather than 1.8 to avoid forcing upgrades that weren't
| needed, but probably people should use 1.8. If there is trouble with
| 1.7 I'll bump it to 1.8 - just let me know.

The current net-misc/quagga GenToo ebuild (merged by me to GenToo's CVS
on monday) uses WANT_AUTOMAKE=1.7 in the ebuild to get GenToo to choose
the right automake.

automake under GenToo is a wrapper script which tries to find out which
automake is needed and which also honors the WANT_AUTOMAKE environment
variable.

| I didn't do anything to move the libs. I note that the libs aren't
| built/installed shared, and are statically linked into the binaries.
| This would be nice to fix IMHO, but I'm curious how others see this.

SRRD makes use of these libraries. It links them statically.

Regards,
- - Amir
- --
Amir Guindehi, nospam.amir@datacore.ch
DataCore GmbH, Witikonerstrasse 289, 8053 Zurich, Switzerland

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-nr1 (Windows 2000)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAanfYbycOjskSVCwRAlyHAKCgBEGKkZwdHj1XkjnRHN6DU2gM3gCg/LFy
oOyzHiHBONf+fToYmCYDePY=
=ZJxX
-----END PGP SIGNATURE-----
Re: problem with default include/library files installation location -- ? [ In reply to ]
> Message-ID: <406A77D9.9090106@datacore.ch>
> Date: Wed, 31 Mar 2004 09:48:41 +0200
> From: Amir Guindehi <amir@datacore.ch>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Greg,
>
> | The problem was that automake 1.5 doesn't set @PACKAGE@, so that
> | includes don't get put in the quagga subdir. configure.ac failed to
> | state the requirement to use newer automake, and gentoo's
> | automake-chooser-script guessed 1.5, probably assuming that something
> | without a prereq statement wanted old automake.
> |
> | I committed a change to configure.ac to require automake 1.7. I
> | chose 1.7 rather than 1.8 to avoid forcing upgrades that weren't
> | needed, but probably people should use 1.8. If there is trouble with
> | 1.7 I'll bump it to 1.8 - just let me know.
>
> The current net-misc/quagga GenToo ebuild (merged by me to GenToo's CVS
> on monday) uses WANT_AUTOMAKE=1.7 in the ebuild to get GenToo to choose
> the right automake.
>
> automake under GenToo is a wrapper script which tries to find out which
> automake is needed and which also honors the WANT_AUTOMAKE environment
> variable.

OK, so that will work. But GenToo's way of choosing automake versions
could be improved, since AM_INIT_AUTOMAKE takes a required version,
and that's a very good hint.

> | I didn't do anything to move the libs. I note that the libs aren't
> | built/installed shared, and are statically linked into the binaries.
> | This would be nice to fix IMHO, but I'm curious how others see this.
>
> SRRD makes use of these libraries. It links them statically.

That's fine - I wasn't trying to suggest not installing static libs,
but rather than it would be nice to install both static and shared.
Re: problem with default include/library files installation location -- ? [ In reply to ]
On Tue, 30 Mar 2004, Greg Troxel wrote:

> The problem was that automake 1.5 doesn't set @PACKAGE@, so that

> I committed a change to configure.ac to require automake 1.7. I
> chose 1.7 rather than 1.8 to avoid forcing upgrades that weren't
> needed, but probably people should use 1.8. If there is trouble
> with 1.7 I'll bump it to 1.8 - just let me know.

Hmmm, there is... namely the quagga.net server has automake 1.6 and
hence cant create dist tarballs anymore for the snapshots :)

Does 1.6 set PACKAGE? And if so can we make 1.6 the dependent
version?

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
I want to reach your mind -- where is it currently located?
Re: problem with default include/library files installation location -- ? [ In reply to ]
I would now put 1.6 in the 'crufty' category. Can you update the
server? If not, please send me the output of config.status from
quagga.net so I can think of what to do. I believe that the
config.status output comes from the autoconf bits that aclocal pulls
in from the automake install.
Re: problem with default include/library files installation location -- ? [ In reply to ]
On Wed, 7 Apr 2004, Greg Troxel wrote:

> I would now put 1.6 in the 'crufty' category. Can you update the
> server?

not very quickly no. though, i might be able to generate the
snapshots on another machine.

> If not, please send me the output of config.status from
> quagga.net so I can think of what to do.

still want that?

> I believe that the config.status output comes from the autoconf
> bits that aclocal pulls in from the automake install.

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
A bird in the hand is worth what it will bring.