VFS Linking errors

Paul Weaver paul.weaver at bbc.co.uk
Thu Sep 18 14:54:45 GMT 2008


After successful tests on a linux machine, we're trying to deploy a VFS module onto a solaris x64 machine.

Initial problem was we couldn't compile. Downloaded the source for 3.0.28, ran through configure and make. The VFS object compiled fine, but then wouldn't connect

/usr/sfw/sbin/smbd --version
Version 3.0.28

[2008/09/18 15:18:26, 0] smbd/vfs.c:(66)
  Failed to register vfs module.
  The module was compiled against SMB_VFS_INTERFACE_VERSION 134502736,
  current SMB_VFS_INTERFACE_VERSION is 21.
  Please recompile against the current Samba Version!


So we removed the prepackaged samba completely and installed 3.0.28 (the version we'd tested on on x86 linux)

/usr/local/samba/sbin/smbd --version
Version 3.0.28

and recompiled the vfs module

We could then connect to the server, but then hit a snag
ld.so.1: smbd: fatal: relocation error: file /usr/local/samba/lib/vfs/media_harmony.so: symbol __unsafe_string_function_usage_here__: referenced symbol not found

The compiled version seems fine, aside from this vfs module. 

Now I understand that this function is defined in safe_string.h. It compiles fine, appears to link fine

/usr/sfw/bin/gcc -c -g -O2  -fPIC -Iinclude -I/export/home/npf/mediaharmony/samba/samba-3.0.28/source/include -I/export/home/npf/mediaharmony/samba/samba-3.0.28/source/popt -I/export/home/npf/mediaharmony/samba/samba-3.0.28/source/lib/replace -I/export/home/npf/mediaharmony/samba/samba-3.0.28/source/lib/talloc -I/export/home/npf/mediaharmony/samba/samba-3.0.28/source/tdb/include -I/export/home/npf/mediaharmony/samba/samba-3.0.28/source/smbwrapper -I/export/home/npf/mediaharmony/samba/samba-3.0.28/source/librpc -I/export/home/npf/mediaharmony/samba/samba-3.0.28/source -I. media_harmony.c
/usr/sfw/bin/gcc -shared  media_harmony.o -o media_harmony.so 
~/mediaharmony $ echo $?
0


I assume it's because I'm compiling with gcc, and Solaris isn't GNU. I've looked at running crle and added the gcc library to no avail
bash-3.00# crle

Configuration file [version 4]: /var/ld/ld.config  
  Default Library Path (ELF):   /usr/sfw/lib:/lib:/usr/lib
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)

Command line:
  crle -c /var/ld/ld.config -l /usr/sfw/lib:/lib:/usr/lib

As far as I can see strncmp seems to work fine (the opendir function works), the error occurs with strcmp -- smbclient works fine and I assume that uses strcmp. I'm not a C programmer, so I'm not keen on the idea of swapping strcmp with strncmp if there's a better way.

Any ideas?

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					


More information about the samba-technical mailing list