[Samba] 3.3 and 3.4 compile failure on dbwrap
Jeff.Block at radiology.ucsf.edu
Fri Feb 5 11:47:47 MST 2010
On 2/5/10 6:23 AM, "Gaiseric Vandal" <gaiseric.vandal at gmail.com> wrote:
> I also have problems using this gcc bundled with the Sun freeware tools
> (/usr/sfw/bin/gcc.) I had more luck with using gcc from
> sunfreeware.com. In hindsight I think it may have just been a matter
> of setting CPPFLAGS and LDFLAGS correctly. You may also find that the
> samba build on sunfreeware meets your needs. (zfs support seems lacking
> - which shouldn't matter for solaris 9, and you may still need to
> compile the nss_winbind modules.)
> I also installed OpenLDAP from Sunfreeware.com. The Solaris native ldap
> client does not seem to have full functionality for Active Directory
> support (may not be an issue for you.) I think Sun compiles Samba
> using a Mozilla LDAP SDK.
> This is how I ended up compiling Samba using Sunfreeware GCC.
> #LD_LIBRARY_PATH=/usr/sfw/lib:/usr/ccs/lib:$LD_LIBRARY PATH
> #export LD_LIBRARY_PATH
> #export CPPFLAGS="-I/usr/local/include -I/usr/local/ssl/include
> #export LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib
> -L/usr/local/lib -R/usr/local/lib -L/usr/lib -R/usr/lib"
> #./configure --prefix=/usr/local/samba-3.4.5
> --with-privatedir=/etc/samba/private --with-lockdir=/var/samba/locks
> --with-configdir=/etc/samba --enable-nss-wrapper
> #make install
> I think I may need to have manually copied nss_winbind.so.1 file to
> On 02/04/10 17:51, Jeff Block wrote:
>> I'm having problems compiling a newer version of samba (3.3.x or 3.4.x) on
>> solaris 9. We are currently running 3.0.23d and have been putting off
>> upgrading for far to long.
>> I've tried gcc and sun studio 12 cc with the same issues when it comes to
>> compiling dbwrap.c. I can't seem to find anything on google that's related
>> to my issue.
>> Here's my configure line when using gcc:
>> ./configure --prefix=/netopt --with-automount \
>> --with-configdir=/usr/local/samba --localstatedir=/var/log/samba \
>> --infodir=/netopt/share/info --mandir=/netopt/share/man \
>> --with-privatedir=/usr/local/samba/private --with-krb5=/netopt \
>> --with-libiconv=/netopt --with-utmp --with-winbind CC=gcc \
>> CFLAGS='-I/netopt/include' LD=gcc LDFLAGS='-L/netopt/lib -R/netopt/lib' \
>> When it finally gets to compiling dbwrap.c, here's what I see:
>> Compiling lib/dbwrap.c
>> lib/dbwrap.c:58:46: macro "fetch" passed 4 arguments, but takes just 1
>> lib/dbwrap.c: In function `dbwrap_fallback_parse_record':
>> lib/dbwrap.c:58: warning: assignment makes integer from pointer without a
>> lib/dbwrap.c:186:38: macro "store" passed 3 arguments, but takes just 2
>> lib/dbwrap.c: In function `dbwrap_store':
>> lib/dbwrap.c:186: error: incompatible types in assignment
>> lib/dbwrap.c:196:41: macro "fetch" passed 4 arguments, but takes just 1
>> lib/dbwrap.c: In function `dbwrap_fetch':
>> lib/dbwrap.c:196: warning: comparison between pointer and integer
>> The following command failed:
>> gcc -I../lib/zlib -I/netopt/include -I/netopt/include -I.
>> -I/opt/src/freeware/samba-3.4.5/source3/iniparser/src -Iinclude -I./include
>> -I. -I. -I./../lib/replace -I./../lib/talloc -I./../lib/tevent
>> -I./../lib/tdb/include -I./libaddns -I./librpc -I./.. -DHAVE_CONFIG_H
>> -I/netopt/include -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64
>> -I/netopt/include -DLDAP_DEPRECATED -DSUNOS5
>> -I/opt/src/freeware/samba-3.4.5/source3/lib -I.. -I../source4
>> -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 -fPIC -c lib/dbwrap.c -o lib/dbwrap.o
>> make: *** [lib/dbwrap.o] Error 1
Thanks for the advice, but unfortunately I'm still having problems.
I am using a compiled version of gcc (3.4.3).
My LDFLAGS and CFLAGS are:
CFLAGS='-I/netopt/include' LDFLAGS='-L/netopt/lib -R/netopt/lib'
This is generally what I use as /netopt is basically our /usr/local. I'm
not sure why /usr/lib would need to be added here. Isn't that just implied?
I added --enable-nss-wrapper and made sure that ssl libs could be found
(which you specifically added to your FLAGS) but I'm still getting a failure
I'm wondering if there is some lib or something that needs to be updated on
my end. But, I'm not sure how to determine what that is.
Thanks for any further help on this.
More information about the samba