techie11
techie11

Reputation: 1387

libtoolize: error: cannot list files

I was installing libtool 2.4.6 and ran into the following problem:

libtool: Version mismatch error.  This is libtool 2.4.6, revision 2.4.6,
libtool: but the definition of this LT_INIT comes from revision .
libtool: You should recreate aclocal.m4 with macros from revision 2.4.6
libtool: of libtool 2.4.6 and run autoconf again.
Makefile:1261: recipe for target 'libltdl/loaders/libltdl_libltdl_la-preopen.lo' failed

In an effort to fix this issue and after looking around on google, I executed the following command to recreate aclocal.m4. however, I got "cannot list files" error:

[server]#  autoreconf --install
libtoolize:   error: cannot list files: '/var/tmp/work/libtool-2.4.6.i386/share/libtool/build-aux'
autoreconf: libtoolize failed with exit status: 1

the directory was there and can be listed with ls command:

[server]#  ls -l /var/tmp/work/libtool-2.4.6.i386/share/libtool/build-aux
total 0

Any idea?

Upvotes: 1

Views: 1178

Answers (1)

techie11
techie11

Reputation: 1387

this was cause by the line in libtoolize script:

        test -n "`{ cd $my_dir && ls; } 2>/dev/null`" \
            || func_fatal_error "cannot list files: '$my_dir'"

I don't know why it interpret a empty directory as "cannot list files" the issue can be overcome by replacing the above line with:

    cd $my_dir && ls || func_fatal_error "cannot list files: '$my_dir'"

Upvotes: 2

Related Questions