Discussion:
[Thinkfinger-devel] Problems during installation
Peter Kußmann
2007-01-15 10:42:56 UTC
Permalink
Hello,

i try to install thinkfinger from svn

1.) svn co https://svn.sourceforge.net/svnroot/thinkfinger
2.) ./autogen.sh (libtool are missing - i will install it)
3.) ./configure (some thinks like - libpam0g-dev / libusb-dev are
missing - i will install it)
4.) make

Error (snip - from console)
____________________________________________________________________

make
Making all in docs
make[1]: Entering directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/docs'
Making all in autodocs
make[2]: Entering directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/docs/autodocs'
make[2]: Leaving directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/docs/autodocs'
make[2]: Entering directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/docs'
make[2]: Für das Ziel »all-am« ist nichts zu tun.
make[2]: Leaving directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/docs'
make[1]: Leaving directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/docs'
Making all in libthinkfinger
make[1]: Entering directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/libthinkfinger'
make[1]: Für das Ziel »all« ist nichts zu tun.
make[1]: Leaving directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/libthinkfinger'
Making all in tf-init
make[1]: Entering directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/tf-init'
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -fno-common
-fPIC -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare
-Wdeclaration-after-statement -o tf-init tf_init-tf-init.o
../libthinkfinger/libthinkfinger.la
gcc -g -O2 -Wall -fno-common -fPIC -Wchar-subscripts
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wcast-align -Wsign-compare
-Wdeclaration-after-statement -o .libs/tf-init tf_init-tf-init.o
../libthinkfinger/.libs/libthinkfinger.so -Wl,--rpath -Wl,/usr/local/lib
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_bulk_write'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_find_busses'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to `usb_init'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_find_devices'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to `usb_open'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_control_msg'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_busses'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_release_interface'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_close'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_bulk_read'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_claim_interface'
collect2: ld returned 1 exit status
make[1]: *** [tf-init] Fehler 1
make[1]: Leaving directory
`/home/peter/Download/thinkfinger-0.2/svn/thinkfinger/tf-init'
make: *** [all-recursive] Fehler 1
***@debian:~/Download/thinkfinger-0.2/svn/thinkfinger$
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

any idea?

greetings from germay

Peter
Timo Hoenig
2007-01-15 11:59:34 UTC
Permalink
Hi Peter,
Post by Peter Kußmann
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_bulk_write'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_find_busses'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to `usb_init'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_find_devices'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to `usb_open'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_control_msg'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_busses'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_release_interface'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_close'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_bulk_read'
../libthinkfinger/.libs/libthinkfinger.so: undefined reference to
`usb_claim_interface'
collect2: ld returned 1 exit status
It looks like there's a problem while linking against libusb. Do you
have libusb installed?

Also, by the name of the mentioned package 'libpam0g-dev' I assume that
you're using Debian/Ubuntu. Currently, ThinkFinger requires a very new
version of PAM (>= 0.81). There are reports that Debian/Ubuntu is not
shipping such a recent version of PAM. So, please do not expect to have
everything in place once the libusb issue is solved.

Timo
Peter Kußmann
2007-01-15 12:36:28 UTC
Permalink
Hello Timo,

thanks for your Message.
Post by Timo Hoenig
Hi Peter,
It looks like there's a problem while linking against libusb. Do you
have libusb installed?
Also, by the name of the mentioned package 'libpam0g-dev' I assume that
you're using Debian/Ubuntu. Currently, ThinkFinger requires a very new
version of PAM (>= 0.81). There are reports that Debian/Ubuntu is not
shipping such a recent version of PAM. So, please do not expect to have
everything in place once the libusb issue is solved.
Timo
I use debian.

cat /proc/version
Linux version 2.6.18-3-686 (Debian 2.6.18-7) (***@debian.org)
(gcc version 4.1.2 20061115 (prerelease)
(Debian 4.1.1-20)) #1 SMP Mon Dec 4 16:41:14 UTC 2006

install-stuff:

1.)
dpkg -l | grep libusb
ii libusb++-0.1-4c2 0.1.12-2 userspace C++ USB programming library
ii libusb++-dev 0.1.12-2 userspace C++ USB programming
library develo
ii libusb-0.1-4 0.1.12-2 userspace USB programming library
ii libusb-dev 0.1.12-2 userspace USB programming
library developmen

which version of libusb is recommended?

2.)
dpkg -l | grep pam
ii libpam-modules 0.79-4 Pluggable Authentication Modules
for PAM
ii libpam-runtime 0.79-4 Runtime support for the PAM library
ii libpam0g 0.79-4 Pluggable Authentication
Modules library
ii libpam0g-dev 0.79-4 Development files for PAM

i will update pam this evening.

other stuff:

when i - ./configure - i will seeat the end of - ./configure -:
---------------------------------------------------------------------------------------------------------------------------------
ThinkFinger 0.2
===============

+ prefix: /usr/local
+ libdir: /usr/local/lib
+ bindir: /usr/local/bin
+ sbindir: /usr/local/sbin
+ securedir: /usr/local/lib/security

+ cflags: -g -O2 -Wall -fno-common -fPIC -Wchar-subscripts
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-statement
+ libusb: -lusb

Build PAM module: yes

+ libpam: -lpam
+ libpthread: -lpthread

configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/autodocs/Makefile
config.status: creating libthinkfinger/Makefile
config.status: creating libthinkfinger/libthinkfinger.pc
config.status: creating pam/Makefile
config.status: creating tf-init/Makefile
config.status: creating tf-tool/Makefile
config.status: executing depfiles commands
---------------------------------------------------------------------------------------------------------------------------------

any options that make linking against libusb ?

greetings

Peter
Luca Capello
2007-01-15 13:35:18 UTC
Permalink
Hello!
Post by Peter Kußmann
Post by Timo Hoenig
It looks like there's a problem while linking against libusb. Do
you have libusb installed?
The same errors happens on a clean Debian etch, with libusb-dev
(0.1.12) installed. The problem is that pkg-config is not installed
and thus the error. With pkg-config, there the pam_prompt() error as
per [1].
Post by Peter Kußmann
Post by Timo Hoenig
Also, by the name of the mentioned package 'libpam0g-dev' I assume
that you're using Debian/Ubuntu. Currently, ThinkFinger requires a
very new version of PAM (>= 0.81). There are reports that
Debian/Ubuntu is not shipping such a recent version of PAM. So,
please do not expect to have everything in place once the libusb
issue is solved.
In fact, there's the already mentioned problem as per [1].
The dependencies on a Debian etch should be the followings:

- gcc
- libtool
- pkg-config
- libpam-dev (>= 0.81 because of pam_prompt() as per [1])
- libusb-dev (>= 2:0.1.12-1)
- doxygen

BTW, there's no version check for libpam and while there's a check for
libusb-dev, this seems to be useless because without pkg-config
libusb-dev isn't pulled in.
Post by Peter Kußmann
i will update pam this evening.
Please keep me informed about your progress.
[...]
Post by Peter Kußmann
any options that make linking against libusb ?
Run `./configure | grep USB`. Anyway it's just before "ThinkFinger
0.2" (scroll up in the terminal and you can see it).

Thx, bye,
Gismo / Luca

Footnotes:
[1] http://sourceforge.net/mailarchive/message.php?msg_id=37888706
Timo Hoenig
2007-01-15 14:00:46 UTC
Permalink
Hi Luca,

Thanks for the pointers for Peter.
Post by Luca Capello
- gcc
- libtool
- pkg-config
- libpam-dev (>= 0.81 because of pam_prompt() as per [1])
- libusb-dev (>= 2:0.1.12-1)
- doxygen
Doxygen should stay optional.
Post by Luca Capello
BTW, there's no version check for libpam and while there's a check for
libusb-dev, this seems to be useless because without pkg-config
libusb-dev isn't pulled in.
Yes, the auto{conf,make} bits definitely need some more love.

Timo
Luca Capello
2007-01-15 14:21:37 UTC
Permalink
Hello!
Post by Timo Hoenig
Thanks for the pointers for Peter.
You're welcome, I tried to compile it on my X60 and I got the same
error (but I hadn't find the time to report yet and I wanted to
investigate more).
[...]
Post by Timo Hoenig
Post by Luca Capello
- doxygen
Doxygen should stay optional.
Yes, I know this, but as no information is present in REAMDE/INSTALL,
I reported it anyway :-)
Post by Timo Hoenig
Post by Luca Capello
BTW, there's no version check for libpam and while there's a check
for libusb-dev, this seems to be useless because without pkg-config
libusb-dev isn't pulled in.
Yes, the auto{conf,make} bits definitely need some more love.
Even if I can't assure anything, I'll try to find some time to have a
look at it.

Thx, bye,
Gismo / Luca
Timo Hoenig
2007-01-15 14:30:43 UTC
Permalink
Hi Luca,
Post by Luca Capello
Post by Timo Hoenig
Doxygen should stay optional.
Yes, I know this, but as no information is present in REAMDE/INSTALL,
I reported it anyway :-)
Well, it's not that hard to use $EDITOR and 'diff', is it? :-)
Post by Luca Capello
Post by Timo Hoenig
Yes, the auto{conf,make} bits definitely need some more love.
Even if I can't assure anything, I'll try to find some time to have a
look at it.
As always: Patches are very welcome.

Thanks,

Timo
Luca Capello
2007-01-15 18:22:40 UTC
Permalink
Hi Timo!
Post by Timo Hoenig
Post by Luca Capello
Post by Timo Hoenig
Doxygen should stay optional.
Yes, I know this, but as no information is present in REAMDE/INSTALL,
I reported it anyway :-)
Well, it's not that hard to use $EDITOR and 'diff', is it? :-)
`M-x vc-diff` isn't difficult at all, the main problem is to find some
spare time to sit down and do it. But as you asked for it, here a
patch for README.

--8<---------------cut here---------------start------------->8---
Index: README
===================================================================
--- README (revision 17)
+++ README (working copy)
@@ -10,6 +10,37 @@
print reader. The utility 'tf-tool' can be used to acquire and to verify
fingerprints.

+Software required for compilation
+=================================
+
+In order to compile ThinkFinger you need the following software:
+
+- the GCC compiler (http://www.gnu.org/software/gcc/)
+- libtool (http://www.gnu.org/software/libtool/)
+- pkg-config (http://pkgconfig.freedesktop.org)
+- the Linux-PAM, development files, version >= 0.81 (http://www.kernel.org/pub/linux/libs/pam/)
+- libusb, development files, version >= 0.1.12 (http://libusb.sourceforge.net/)
+
+To have access to the optional documentation, you also need:
+
+- doxygen (http://www.stack.nl/~dimitri/doxygen/)
+
+Once the necessary software is installed, run:
+
+ $ ./configure
+ $ make
+ $ make install
+
+If you are compiling from an SVN checkout, the first time you also
+need:
+
+- autoconf (http://www.gnu.org/software/autoconf/)
+- automake (http://www.gnu.org/software/automake/)
+
+And before the './configure' script run:
+
+ $ ./autogen.sh
+
Simple test tool: tf-tool
=========================

--8<---------------cut here---------------end--------------->8---

IMHO it'd be better to patch INSTALL, i.e. remove all the general
instructions and put only the ThinkFinger specific ones. In such a
case, I'll be more than happy to provide an updated patch.

Thx, bye,
Gismo / Luca
Timo Hoenig
2007-01-15 19:42:29 UTC
Permalink
Hi Luca,
Post by Luca Capello
`M-x vc-diff` isn't difficult at all, the main problem is to find some
spare time to sit down and do it.
:-)
Post by Luca Capello
But as you asked for it, here a patch for README.
Thanks a lot, I appreciate that you've taken the time for the patch.

I have commited your patch with the changes written as inline comments
below.
Post by Luca Capello
--8<---------------cut here---------------start------------->8---
Index: README
===================================================================
--- README (revision 17)
+++ README (working copy)
@@ -10,6 +10,37 @@
print reader. The utility 'tf-tool' can be used to acquire and to verify
fingerprints.
+Software required for compilation
+=================================
+
+
+- the GCC compiler (http://www.gnu.org/software/gcc/)
+- libtool (http://www.gnu.org/software/libtool/)
+- pkg-config (http://pkgconfig.freedesktop.org)
+- the Linux-PAM, development files, version >= 0.81 (http://www.kernel.org/pub/linux/libs/pam/)
I broke down the line not to exceed 80 chars.
Post by Luca Capello
+- libusb, development files, version >= 0.1.12 (http://libusb.sourceforge.net/)
+
+
+- doxygen (http://www.stack.nl/~dimitri/doxygen/)
+
+
+ $ ./configure
+ $ make
+ $ make install
I have additionally added:

35 Note: For a proper installation it is very likely that you have to use the
36 parameter '--with-securedir=$PAM_MODULES_DIR' when running 'configure'.
37 $PAM_MODULES_DIR is the directory where your PAM installation expects the
38 pluggable authentication modules. It is convenient that this directory is
39 '/lib/security'. Example:
40
41 $ ./configure --with-securedir=/lib/security
Post by Luca Capello
+If you are compiling from an SVN checkout, the first time you also
+
+- autoconf (http://www.gnu.org/software/autoconf/)
+- automake (http://www.gnu.org/software/automake/)
+
+
+ $ ./autogen.sh
+
Simple test tool: tf-tool
=========================
--8<---------------cut here---------------end--------------->8---
IMHO it'd be better to patch INSTALL, i.e. remove all the general
instructions and put only the ThinkFinger specific ones. In such a
case, I'll be more than happy to provide an updated patch.
Agreed.

Thanks,

Timo
Luca Capello
2007-01-15 22:20:02 UTC
Permalink
Hi Timo!
Post by Timo Hoenig
Post by Luca Capello
But as you asked for it, here a patch for README.
Thanks a lot, I appreciate that you've taken the time for the patch.
You're welcome. It's the minimum I can do and it's not so difficult.
Post by Timo Hoenig
I have commited your patch with the changes written as inline comments
below.
I completely agree on your comments.
Post by Timo Hoenig
Post by Luca Capello
IMHO it'd be better to patch INSTALL, i.e. remove all the general
instructions and put only the ThinkFinger specific ones. In such a
case, I'll be more than happy to provide an updated patch.
Agreed.
Attached the new patch, which completely removes the old general
instructions.

Thx, bye,
Gismo / Luca
Luca Capello
2007-01-20 16:06:50 UTC
Permalink
Hello!
Post by Luca Capello
Post by Timo Hoenig
Post by Luca Capello
IMHO it'd be better to patch INSTALL, i.e. remove all the general
instructions and put only the ThinkFinger specific ones. In such a
case, I'll be more than happy to provide an updated patch.
Agreed.
Attached the new patch, which completely removes the old general
instructions.
Any news on this patch?

Thx, bye,
Gismo / Luca
Timo Hoenig
2007-01-22 09:55:28 UTC
Permalink
Hi Luca,

Sorry for the lag.
Post by Luca Capello
Any news on this patch?
Committed to SVN with minor changes.

Thanks!

Timo
Luca Capello
2007-01-25 00:59:55 UTC
Permalink
Hello!

Sorry for the long mail, it was quite necessary to document my steps...
Post by Luca Capello
`M-x vc-diff` isn't difficult at all, the main problem is to find
some spare time to sit down and do it. But as you asked for it,
here a patch for README.
[...]
Post by Luca Capello
+If you are compiling from an SVN checkout, the first time you also
+
+- autoconf (http://www.gnu.org/software/autoconf/)
+- automake (http://www.gnu.org/software/automake/)
At least on Debian etch, I discovered that not all automake versions work:
=====
***@gismo:~/thinkfinger$ automake --version | grep automake
automake (GNU automake) 1.4-p6

***@gismo:~/thinkfinger$ ./autogen.sh
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
configure.in: 28: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'
automake: configure.in: installing `./install-sh'
automake: configure.in: installing `./mkinstalldirs'
automake: configure.in: installing `./missing'
configure.in: 28: required file `./[config.h].in' not found
Makefile.am:5: variable `PAM_SUBDIR' not defined

***@gismo:~/thinkfinger$ ./configure
[...]
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING: Makefile.in seems to ignore the --datarootdir setting
config.status: creating docs/Makefile
config.status: WARNING: docs/Makefile.in seems to ignore the --datarootdir setting
config.status: creating docs/autodocs/Makefile
config.status: WARNING: docs/autodocs/Makefile.in seems to ignore the --datarootdir setting
config.status: creating libthinkfinger/Makefile
config.status: WARNING: libthinkfinger/Makefile.in seems to ignore the --datarootdir setting
config.status: creating libthinkfinger/libthinkfinger.pc
config.status: creating pam/Makefile
config.status: WARNING: pam/Makefile.in seems to ignore the --datarootdir setting
config.status: creating tf-init/Makefile
config.status: WARNING: tf-init/Makefile.in seems to ignore the --datarootdir setting
config.status: creating tf-tool/Makefile
config.status: WARNING: tf-tool/Makefile.in seems to ignore the --datarootdir setting
config.status: creating config.h

***@gismo:~/thinkfinger$ make
cd . && autoheader
make[1]: Entering directory `/home/luca/thinkfinger'
cd . && autoheader
make[1]: Leaving directory `/home/luca/thinkfinger'
cd . \
&& CONFIG_FILES= CONFIG_HEADERS=[config.h] \
/bin/sh ./config.status
config.status: error: cannot find input file: [config.h].in
make: *** [stamp-h] Error 1

***@gismo:~/thinkfinger$
=====

The next version available...
=====
***@gismo:~/thinkfinger$ automake --version | grep automake
automake (GNU automake) 1.7.9

***@gismo:~/thinkfinger$ ./autogen.sh
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
configure.in: installing `./install-sh'
configure.in: installing `./mkinstalldirs'
configure.in: installing `./missing'
libthinkfinger/Makefile.am: installing `./compile'
libthinkfinger/Makefile.am: installing `./depcomp'

***@gismo:~/thinkfinger$
=====

Now, automake-1.7.9 on Debian depends on autoconf >= 2.54 so I would
add that dependencies, but I don't know for the other distributions.
Thus, below a proposed updated patch.

--8<---------------cut here---------------start------------->8---
Index: INSTALL
===================================================================
--- INSTALL (revision 42)
+++ INSTALL (working copy)
@@ -47,8 +47,8 @@

If you are compiling from an SVN checkout, the first time you also need:

-- autoconf (http://www.gnu.org/software/autoconf/)
-- automake (http://www.gnu.org/software/automake/)
+- autoconf, version >= 2.54 (http://www.gnu.org/software/autoconf/)
+- automake, version >= 1.7.9 (http://www.gnu.org/software/automake/)

And before the './configure' script run:

--8<---------------cut here---------------end--------------->8---

Thx, bye,
Gismo / Luca
Timo Hoenig
2007-01-25 10:15:16 UTC
Permalink
Hi Luca,
Post by Luca Capello
Sorry for the long mail, it was quite necessary to document my steps...
No worries.
Post by Luca Capello
Post by Luca Capello
`M-x vc-diff` isn't difficult at all, the main problem is to find
some spare time to sit down and do it. But as you asked for it,
here a patch for README.
[...]
Post by Luca Capello
+If you are compiling from an SVN checkout, the first time you also
+
+- autoconf (http://www.gnu.org/software/autoconf/)
+- automake (http://www.gnu.org/software/automake/)
<snip log/>
Post by Luca Capello
Now, automake-1.7.9 on Debian depends on autoconf >= 2.54 so I would
add that dependencies, but I don't know for the other distributions.
Thus, below a proposed updated patch.
--8<---------------cut here---------------start------------->8---
Index: INSTALL
===================================================================
--- INSTALL (revision 42)
+++ INSTALL (working copy)
@@ -47,8 +47,8 @@
-- autoconf (http://www.gnu.org/software/autoconf/)
-- automake (http://www.gnu.org/software/automake/)
+- autoconf, version >= 2.54 (http://www.gnu.org/software/autoconf/)
+- automake, version >= 1.7.9 (http://www.gnu.org/software/automake/)
--8<---------------cut here---------------end--------------->8---
Fine with me, committed to SVN.

Thanks,

Timo

Luca Capello
2007-01-20 22:37:56 UTC
Permalink
Hi Timo!
Post by Timo Hoenig
Post by Luca Capello
Post by Timo Hoenig
Yes, the auto{conf,make} bits definitely need some more love.
Even if I can't assure anything, I'll try to find some time to have
a look at it.
As always: Patches are very welcome.
Here we are! The attached patch causes ./configure to exit with an
error when pkg-config is not found and when pkg-config is installed
but libusb-dev no (all the tests performed on a clean Debian etch).
In fact, pkg-config and libusb-dev are strictly speaking dependencies,
not optional.

--8<---------------cut here---------------start------------->8---
Index: configure.in
===================================================================
--- configure.in (revision 21)
+++ configure.in (working copy)
@@ -51,8 +51,8 @@
AC_ARG_ENABLE(securedir, AC_HELP_STRING([--with-securedir=dir],[Where to put PAM module @<:@default=$libdir/security@:>@]))


-# Check for libusb
-PKG_CHECK_MODULES(USB, libusb >= 0.1.12, usb_found=yes, AC_MSG_RESULT(no))
+# Check for libusb using pkg-config
+PKG_CHECK_MODULES(USB, libusb >= 0.1.12, usb_found=yes, AC_MSG_ERROR([libusb missing]))

# Check for Doxygen
AC_CHECK_PROG(DOXYGEN, [doxygen], [doxygen], [])
--8<---------------cut here---------------end--------------->8---

I tried to add another test to check if pkg-config is present or not,
but then I thought it's not worth it and AFAIK other programs do the
same. The ./configure error is still a bit brutal, but at least it's
working ;-)

BTW, in order to have the libusb error output, you need to launch
./autogen.sh with pkg-config installed, otherwise it complains about
PKG_CHECK_MODULES:
=====
***@gismo:~/thinkfinger$ ./configure
[...]
checking for pam_start in -lpam... yes
checking for pthread_create in -lpthread... yes
./configure: line 19677: syntax error near unexpected token `USB,'
./configure: line 19677: `PKG_CHECK_MODULES(USB, libusb >= 0.1.12, \
usb_found=yes, { { echo "$as_me:$LINENO: error: libusb missing" >&5'
***@gismo:~/thinkfinger$
=====

Thx, bye,
Gismo / Luca
Timo Hoenig
2007-01-22 10:20:27 UTC
Permalink
Hi,
Post by Luca Capello
Here we are! The attached patch causes ./configure to exit with an
error when pkg-config is not found and when pkg-config is installed
but libusb-dev no (all the tests performed on a clean Debian etch).
In fact, pkg-config and libusb-dev are strictly speaking dependencies,
not optional.
Thanks for looking into this, your patch looks good.
Post by Luca Capello
--8<---------------cut here---------------start------------->8---
Index: configure.in
===================================================================
--- configure.in (revision 21)
+++ configure.in (working copy)
@@ -51,8 +51,8 @@
-# Check for libusb
-PKG_CHECK_MODULES(USB, libusb >= 0.1.12, usb_found=yes, AC_MSG_RESULT(no))
+# Check for libusb using pkg-config
+PKG_CHECK_MODULES(USB, libusb >= 0.1.12, usb_found=yes, AC_MSG_ERROR([libusb missing]))
# Check for Doxygen
AC_CHECK_PROG(DOXYGEN, [doxygen], [doxygen], [])
--8<---------------cut here---------------end--------------->8---
I've committed this to SVN.
Post by Luca Capello
I tried to add another test to check if pkg-config is present or not,
but then I thought it's not worth it and AFAIK other programs do the
same. The ./configure error is still a bit brutal, but at least it's
working ;-)
Yes, agreed.

Thanks,

Timo
Luca Capello
2007-01-24 12:30:21 UTC
Permalink
Hello!
[...]
Post by Luca Capello
- libpam-dev (>= 0.81 because of pam_prompt() as per [1])
[...]

My fault, I checked the Linux-PAM ChangeLog [2] and there's no mention
of pam_prompt() for version 0.81. Thus I checked the Linux-PAM NEWS
[3] and indeed pam_prompt() has been introduced with version 0.99.1.0.

Here a patch for INSTALL ;-)

--8<---------------cut here---------------start------------->8---
Index: INSTALL
===================================================================
--- INSTALL (revision 37)
+++ INSTALL (working copy)
@@ -11,7 +11,7 @@
- the GCC compiler (http://www.gnu.org/software/gcc/)
- libtool (http://www.gnu.org/software/libtool/)
- pkg-config (http://pkgconfig.freedesktop.org)
-- the Linux-PAM, development files, version >= 0.81
+- the Linux-PAM, development files, version >= 0.99.1.0
(http://www.kernel.org/pub/linux/libs/pam/)
- libusb, development files, version >= 0.1.12 (http://libusb.sourceforge.net/)

--8<---------------cut here---------------end--------------->8---

Thx, bye,
Gismo / Luca

Footnotes:
[1] http://sourceforge.net/mailarchive/message.php?msg_id=37888706
[2] http://pam.cvs.sourceforge.net/pam/Linux-PAM/CHANGELOG?revision=1.203.2.1&view=markup
[3] http://pam.cvs.sourceforge.net/pam/Linux-PAM/NEWS?revision=1.18&view=markup
Timo Hoenig
2007-01-15 12:49:38 UTC
Permalink
Post by Peter Kußmann
which version of libusb is recommended?
0.1.x should be fine.
Post by Peter Kußmann
2.)
dpkg -l | grep pam
ii libpam-modules 0.79-4 Pluggable Authentication Modules
for PAM
ii libpam-runtime 0.79-4 Runtime support for the PAM library
ii libpam0g 0.79-4 Pluggable Authentication
Modules library
ii libpam0g-dev 0.79-4 Development files for PAM
i will update pam this evening.
---------------------------------------------------------------------------------------------------------------------------------
ThinkFinger 0.2
===============
+ prefix: /usr/local
+ libdir: /usr/local/lib
+ bindir: /usr/local/bin
+ sbindir: /usr/local/sbin
+ securedir: /usr/local/lib/security
+ cflags: -g -O2 -Wall -fno-common -fPIC -Wchar-subscripts
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-statement
+ libusb: -lusb
Build PAM module: yes
+ libpam: -lpam
+ libpthread: -lpthread
configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/autodocs/Makefile
config.status: creating libthinkfinger/Makefile
config.status: creating libthinkfinger/libthinkfinger.pc
config.status: creating pam/Makefile
config.status: creating tf-init/Makefile
config.status: creating tf-tool/Makefile
config.status: executing depfiles commands
---------------------------------------------------------------------------------------------------------------------------------
any options that make linking against libusb ?
Actually I think that it should be enough if libthinkfinger is linked
against libusb. You seem to have troubles to build tf-init -- after
building libthinkger succeeded. I'll have a look into this issue it
once I find some time.

Timo
Loading...