Samba 3.0.25rc2 error in libsmbclient.so

Henrik Zagerholm henke at mac.se
Wed Apr 25 18:27:16 GMT 2007


Hi Derrell,

Welcome back. :)

Yes, I can confirm that Simo's patch with the Makefile.in solved the  
below issues.

I had my suspicions that there something wrong with the compile but  
couldn't figure out what. :)

Cheers,
Henrik

25 apr 2007 kl. 18:38 skrev derrell at samba.org:

> Henrik, I just returned and was about to look into your problems,  
> but see that
> a patch from Simo has been successful for you.  Please confirm that  
> all issues
> addressed in your messages (copied below) are resolved and that  
> libsmbclient
> works properly for you.
>
> Thanks,
>
> Derrell
>
>
> Henrik Zagerholm <henke at mac.se> writes:
>
>> Hello,
>>
>> We are trying to compile samba_3.0.25. ./configure, make, make   
>> install all
>> seems to work and runs without any errors.
>> The problems starts when we try to use libsmbclient.so.
>> We have a program that links with libsmbclient.so and after  
>> upgrading  from
>> SAMBA_3_0 revision 18029 to "Version 3.0.25rc2-SVN-build-22402"  I  
>> get lots of
>> different error messages similar to "undefined  reference to  
>> `smbc_open'" when
>> I compile our program.
>>
>> We did a test program and compared our old libsmbcilent.so with  
>> the  new
>> one. It basically opens it (using dlopen) and searches for a   
>> symbol (using
>> dlsym) for example "smbc_open". The test program  succeeds in  
>> opening both
>> files, but it will only find the symbols in  the old one.
>>
>> I've included our test program called sotest.
>>
>>
>>
>>
>>
>> Regards,
>> Henrik
>
> Henrik Zagerholm <henke at mac.se> writes:
>
>> 21 apr 2007 kl. 23:24 skrev derrell at samba.org:
>>
>>> Henrik Zagerholm <henke at mac.se> writes:
>>>
>>>> Hello list,
>>>>
>>>> I get the following errors when compiling the examples in   
>>>> libsmbclient.
>>>> The make && make install of samba itself works but no examples.
>>>
>>> Jeremy/Jerry, I don't see these errors in my test environment,  
>>> but  I suspect
>>> that it has to do with what configure finds available.  This is  
>>> almost
>>> certainly caused by the recent changes to link the example  
>>> programs  with the
>>> libsmbclient library in the ../source/bin directory rather than   
>>> with
>>> whatever
>>> happens to be "installed".
>>>
>> I would also like to mention that all my old apps that uses   
>> libsmbclient
>> can't compile any more.
>> See my post "Samba 3.0.25rc2 error in libsmbclient.so" sent 2 days  
>> ago.
>> There is even a small test app attached.
>>
>> Cheers,
>> Henrik
>>
>>
>>> Is there a mechanism in the current build system to determine  
>>> the  static
>>> libraries (.a) needed to link an executable given what configure   
>>> found?  If
>>> not (or maybe even if so), I should probably just explicitly link
>>> libsmbclient.a but leave the remainder of the example  
>>> dynamically  linked.
>>> That's really not what I wanted, but if there are going to be   
>>> environment-
>>> specific issues, that's probalby the best I can get.
>>>
>>> Derrell
>>>
>>>
>>>> Enclosed are the error messages.
>>>>
>>>> cubiq-debian:~/downloads/SAMBA_3_0/examples/libsmbclient# make
>>>> gcc -O0 -g -I../../source/include -I/usr/include/gtk-1.2 -I/usr/
>>>> include/glib-1.2 -I/usr/lib/glib/include -D_LARGEFILE64_SOURCE -
>>>> D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE   -c -o testsmbc.o testsmbc.c
>>>> Linking testsmbc
>>>> gcc -O0 -g -I../../source/include -I/usr/include/gtk-1.2 -I/usr/
>>>> include/glib-1.2 -I/usr/lib/glib/include -D_LARGEFILE64_SOURCE -
>>>> D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -L/usr/local/samba/lib -o    
>>>> testsmbc
>>>> testsmbc.o ../../source/bin/libsmbclient.a -ldl -lresolv
>>>> ../../source/bin/libsmbclient.a(cliconnect.o): In function
>>>> `cli_session_setup_spnego':
>>>> cliconnect.c:(.text+0x29b5): undefined reference to `error_message'
>>>> cliconnect.c:(.text+0x2ac3): undefined reference to `error_message'
>>>> ../../source/bin/libsmbclient.a(smb_seal.o): In function
>>>> `common_free_enc_buffer':
>>>> smb_seal.c:(.text+0x132): undefined reference to  
>>>> `gss_release_buffer'
>>>> ../../source/bin/libsmbclient.a(smb_seal.o): In function
>>>> `common_free_encryption_state':
>>>> smb_seal.c:(.text+0x1e4): undefined reference to `gss_release_cred'
>>>> smb_seal.c:(.text+0x200): undefined reference to    
>>>> `gss_delete_sec_context'
>>>> ../../source/bin/libsmbclient.a(smb_seal.o): In function
>>>> `common_encrypt_buffer':
>>>>
>>>> -------------------------------- SNIP
>>>> --------------------------------------
>>>>
>>>> clikrb5.c:(.text+0x17dc): undefined reference to `error_message'
>>>> clikrb5.c:(.text+0x1895): undefined reference to  
>>>> `krb5_set_real_time'
>>>> clikrb5.c:(.text+0x18b0): undefined reference to `krb5_cc_get_type'
>>>> clikrb5.c:(.text+0x1914): undefined reference to `krb5_cc_get_name'
>>>> clikrb5.c:(.text+0x19ec): undefined reference to   
>>>> `krb5_cc_remove_cred'
>>>> clikrb5.c:(.text+0x1a33): undefined reference to `error_message'
>>>> clikrb5.c:(.text+0x1abd): undefined reference to `krb5_cc_get_name'
>>>> clikrb5.c:(.text+0x1adb): undefined reference to `krb5_cc_get_type'
>>>> clikrb5.c:(.text+0x1b52): undefined reference to   
>>>> `krb5_mk_req_extended'
>>>> clikrb5.c:(.text+0x1b99): undefined reference to `error_message'
>>>> clikrb5.c:(.text+0x1bc0): undefined reference to `krb5_free_creds'
>>>> clikrb5.c:(.text+0x1bd8): undefined reference to    
>>>> `krb5_free_cred_contents'
>>>> clikrb5.c:(.text+0x1bed): undefined reference to   
>>>> `krb5_free_principal'
>>>> clikrb5.c:(.text+0x1c7a): undefined reference to `krb5_cc_close'
>>>> clikrb5.c:(.text+0x1c90): undefined reference to  
>>>> `krb5_auth_con_free'
>>>> clikrb5.c:(.text+0x1c9b): undefined reference to  
>>>> `krb5_free_context'
>>>> clikrb5.c:(.text+0x1cb2): undefined reference to   
>>>> `krb5_free_principal'
>>>> collect2: ld returned 1 exit status
>>>> make: *** [testsmbc] Error 1
>>>>
>>>>
>>>> Regards,
>>>> Henrik
>>>>
>>>
>>> -- 
>>
>
> idra at samba.org writes:
>
>> On Sun, Apr 22, 2007 at 12:50:54PM +0200, Henrik Zagerholm wrote:
>>> I would also like to mention that all my old apps that uses
>>> libsmbclient can't compile any more.
>>> See my post "Samba 3.0.25rc2 error in libsmbclient.so" sent 2  
>>> days ago.
>>> There is even a small test app attached.
>>
>> Tihs patch may fix your problem. We found out that we were using -pie
>> with -shared which is not exactly a good thing:
>>
>> http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_3_0_25/ 
>> source/Makefile.in? 
>> rev=22482&r1=22321&r2=22482&makepatch=1&diff_format=u
>>
>> Can you test it ?
>>
>> Thanks,
>> Simo.
>>
>> -- 
>> Simo Sorce       idra at samba.org
>> -------------------------------
>> Samba Team http://www.samba.org
>>
>
> Henrik Zagerholm <henke at mac.se> writes:
>
>> 23 apr 2007 kl. 11:59 skrev idra at samba.org:
>>
>>> On Sun, Apr 22, 2007 at 12:50:54PM +0200, Henrik Zagerholm wrote:
>>>> I would also like to mention that all my old apps that uses
>>>> libsmbclient can't compile any more.
>>>> See my post "Samba 3.0.25rc2 error in libsmbclient.so" sent 2  
>>>> days  ago.
>>>> There is even a small test app attached.
>>>
>>> Tihs patch may fix your problem. We found out that we were using - 
>>> pie
>>> with -shared which is not exactly a good thing:
>>>
>>> http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_3_0_25/
>>> source/Makefile.in?  
>>> rev=22482&r1=22321&r2=22482&makepatch=1&diff_format=u
>>>
>>> Can you test it ?
>>
>> Looks like we have a winner!
>> Great work Simo, thanks.
>> //Henrik
>>
>>>
>>> Thanks,
>>> Simo.
>>>
>>> -- 
>>> Simo Sorce       idra at samba.org
>>> -------------------------------
>>> Samba Team http://www.samba.org
>>
>
> -- 



More information about the samba-technical mailing list