On Wednesday 19 June 2002 03:56 pm, Nathan Scott wrote:
...
> > Any ideas why it won't compile or what I can do so that it will work?
>
> I find a useful way to diagnose this sort of problem is to run
> "sh -x ./configure", watch for the failing portion, then extract
> the gcc command line exactly as configure runs it along with the
> generated source file and do it by hand. That way you're able to
> see the error, and you have a fighting chance of diagnosing it.
>
> # sh -x ./configure
> ...[snip]...
> + echo -n 'checking for getxattr in -lattr... '
> checking for getxattr in -lattr... + echo 'configure:1417: checking for
> getxattr in -lattr' ++ echo attr_getxattr
> ++ sed y%./+-%__p_%
> + ac_lib_var=attr_getxattr
> ++ echo '${ac_cv_lib_attr_getxattr+set}'
> + eval 'test "${ac_cv_lib_attr_getxattr+set}" = set'
> ++ test '' = set
> + ac_save_LIBS=
> + LIBS=-lattr
> + cat
> + eval echo configure:1436: '"${CC-cc}' -o 'conftest${ac_exeext}' '$CFLAGS'
> '$CPPFLAGS' '$LDFLAGS' 'conftest.$ac_ext' '$LIBS' '1>&5"' ++ echo
> configure:1436: 'gcc -o conftest -g -O2 conftest.c -lattr 1>&5' + test
> -s conftest
> + rm -rf conftest conftest.c
> + eval ac_cv_lib_attr_getxattr=yes
> ++ ac_cv_lib_attr_getxattr=yes
> + rm -f 'conftest*'
>
>
> So, you'll want to keep a copy of conftest.c before this last rm
> (edit the generated configure script and copy it somewhere safe)
> so that you can rerun the gcc line by hand. Once you have that,
> if the failure is non-obvious, post the gcc error message here.
>
> cheers.
I tried the sh -x ./configure and it gaves me the following:
...
+ eval echo configure:1436: '"${CC-cc}' -o 'conftest${ac_exeext}' '$CFLAGS'
'$CPPFLAGS' '$LDFLAGS' 'conftest.$ac_ext' '$LIBS' '1>&5"'
++ echo configure:1436: 'gcc -o conftest -g -O2 conftest.c -lattr 1>&5'
+ echo 'configure: failed program was:'
+ cat conftest.c
+ rm -rf conftest.c
+ eval ac_cv_lib_attr_getxattr=no
++ ac_cv_lib_attr_getxattr=no
+ rm -f 'conftest*'
+ LIBS=
++ echo '$ac_cv_lib_attr_getxattr'
+ eval 'test "$ac_cv_lib_attr_getxattr" = yes'
++ test no = yes
+ echo no
no
+ echo
+ echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
FATAL ERROR: could not find a valid Extended Attributes library.
+ echo 'Install either the libattr (rpm) or the libattr1 (deb) package.'
Install either the libattr (rpm) or the libattr1 (deb) package.
+ echo 'Alternatively, run "make install-lib" from the attr source.'
Alternatively, run "make install-lib" from the attr source.
+ exit 1
The test program that it is trying to use is:
#line 1425 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char getxattr();
int main() {
getxattr()
; return 0; }
When compiled by: gcc -o conftest -g -O2 conftest.c -lattr
it says: /usr/bin/ld: cannot find -lattr
But... after running ldconfig and with ld.so.conf setup correctly it still
doesn't find it (a RH7.3 problem) so I added -L/lib and then it gave me the
following:
[root@localhost acl-2.0.9]# gcc -L/lib -o conftest -g -O2 conftest.c
/tmp/cclRzSPV.o: In function `main':
/root/acl-2.0.9/configure:1432: undefined reference to `getxattr'
collect2: ld returned 1 exit status
[root@localhost acl-2.0.9]# nm /lib/libattr.so.1 | grep getxattr
0000144c T fgetxattr
000013dc T getxattr
00001414 T lgetxattr
Apparently it is in the text (data) section, so I would presume it is a valid
call, but I'm not sure as I haven't played with nm enough to know how a valid
function reference is going to show up.
Anyway, I still can't get acl-2.0.9 installed after installing attr-2.0.7
(make installl install-lib).
I'd appreciate any suggestions. Thanks.
--Kaleb
|