Eric Johnson
Eric Johnson

Reputation: 17970

Image::Imlib2->load("filename") says file doesn't exists even though it does

use Image::Imlib2;
my $a = Image::Imlib2->load("/foo/file");

gives me the following error:

Runtime error: Image::Imlib2 load error: File does not exist at (eval 469) line 6.

Note that /foo/file is a CIFS mounted directory and this only happens for files on CIFS mounted directories. An additional complication is that this happens on Debian Squeeze but not on Debian Lenny.

Upvotes: 1

Views: 238

Answers (1)

Eric Johnson
Eric Johnson

Reputation: 17970

The solution is to mount the CIFS directory using the 'noserverino' option.

Image::Imlib2 is a Perl wrapper around the Imlib2 C library. The problem is CIFS servers can return inode integer values > 31^2. This makes programs not compiled with LFS (Large File Support), to throw a glibc EOVERFLOW error. Either compile the program with LFS support (i.e. with -D_FILE_OFFSET_BITS=64) or use the "noserverino" mount option. But you may not be able to detect hardlinks properly.

http://linux.die.net/man/8/mount.cifs

Upvotes: 1

Related Questions