[sane-devel] Compile problem ,please help!

zf zhang_fan at hk.fujitsu.com
Thu Aug 3 09:38:49 UTC 2006


    Yes , I am doing some work about fujitsu scanner~~. ^_^.  
    I have made a symlink as you say: ln -sf libsane-khf.so.1 libsane-khf.so. And then type ' strace scanimage -L' . I got the following output ( a piece of  output):
open("/usr/lib/sane/libsane-khf.so.1", O_RDONLY) = 3
close(3)                                = 0
open("/usr/lib/sane/libsane-khf.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\00002\0\000"..., 512) = 5
12
fstat64(3, {st_mode=S_IFREG|0744, st_size=106088, ...}) = 0
old_mmap(NULL, 104040, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4019f000
old_mmap(0x401b5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x150
00) = 0x401b5000
old_mmap(0x401b7000, 5736, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONY                                                              MOUS, -1, 0) = 0x401b7000
close(3)                                = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0                                                              x401b9000
write(1, "\n", 1
)                       = 1
 
    And I still can't see my tips in sane_init.( I wrote "printf("sane_init \n");" at the first  in sane_init code). Is there any steps I missed?? Thanks a lot~~

----- Original Message ----- 
From: "m. allan noah" <anoah at pfeiffer.edu>
To: "zf" <zhang_fan at hk.fujitsu.com>
Cc: "OrgSane-Devel at Lists. Alioth. Debian." <sane-devel at lists.alioth.debian.org>
Sent: Thursday, August 03, 2006 1:09 AM
Subject: Re: [sane-devel] Compile problem ,please help!


> On Wed, 2 Aug 2006, zf wrote:
> 
>>    Hi , all.
>>    I am a new programmer in linux. I wrote one sane-backend named khf.c . When I finished this code, I use gcc compiled sane-backends/frontend/test.c and khf.c into one executable file.Then I run it , and it works~ my code can control the scanner. After that , I compile khf.c into one shared object named libsane-khf.so.1 and do this by using this command: gcc -shared -fpic khf.c -o libsane-khf.so.1
>>    After that I do two things:
>>  1. copy libsane-khf.so.1 into /usr/lib/sane
>>  2. Add one line in /etc/sane.d/dll.conf : khf
>>
>>    However ,when I run xsane,it can't find any scanner. And I found my so isn't been called, since the sane_init is not called when xsane starts. This problem troubled me for a long time. Please help me!
> 
> did you also make a symlink:
> 
> ln -sf libsane-khf.so.1 libsane-khf.so
> 
> # out all lines from dll.conf except yours, and then try:
> 
> `strace scanimage -L` and see if your backend gets opened
> 
> what scanners does this backend support, fujitsu i assume?
> 
> allan noah
> SANE fujitsu backend maintainer :)
> 
> -- 
> "so don't tell us it can't be done, putting down what you don't know.
> money isn't our god, integrity will free our souls" - Max Cavalera
>


More information about the sane-devel mailing list