Kai Lanz
2008-Jun-03 21:01 UTC
[Samba] unsafe_string_function_usage_here when linking smbd
I'm trying to build 3.0.30 on Alpha/Tru64-4.0G. The configure step works, but make fails when it tries to link smbd: Compiling popt/popt.c Compiling popt/poptconfig.c Compiling popt/popthelp.c Compiling popt/poptparse.c Linking bin/smbd ld: Unresolved: __unsafe_string_function_usage_here_size_t__ gmake: *** [bin/smbd] Error 1 This Should Never Happen :) -- that looks like a message for the developers. How can I track down the cause of this and fix it? Here are some details: I'm using the samba-3.0.30.tar.gz source distribution downloaded from samba.org. I configured the build as follows: > env CC=cc LDFLAGS=-L/local/lib CPPFLAGS=-I/local/include ./ configure \ --with-winbind --with-krb5=/local --with-ldap --with-ads (I have to use the vendor cc, because if I try to build with gcc, I get the same errors Bengt Nilsson is reporting about tdb_open, _E__lc_ctype, tdb_traverse, _Eioctl and many others.) Prior to running make, I fixed what appears to be a typo in the Makefile: > diff Makefile Makefile.orig 590c590 < LIBSMBSHAREMODES_OBJ = libsmb/smb_share_modes.o $(TDBBASE_OBJ) --- > LIBSMBSHAREMODES_OBJ = libsmb/smb_share_modes.o $(TDB_BASE_OBJ) Dunno if that's important. Then I ran make like so, using GNU make: > limit datasize 1048576 > limit memoryuse 2041072 > gmake The make process begins by reporting (long lines wrapped): Using FLAGS = -I/usr/local/include -O -D_SAMBA_BUILD_=3 -I/src/pub/samba-3.0.30/source/popt -I/src/pub/samba-3.0.30/source/iniparser/src -Iinclude -I./include - I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/usr/local/include -I/local/include -DLDAP_DEPRECATED -I/src/pub/samba-3.0.30/source/lib -D_SAMBA_BUILD_=3 PICFLAG = -fPIC LIBS = -lproplist -lsecurity -lresolv -lresolv LDFLAGS = -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/ local/lib DYNEXP LDSHFLAGS = -shared -L/usr/local/lib -Wl,-rpath -Wl,/usr/ local/lib -L/local/lib SHLIBEXT = so SONAMEFLAG = -Wl,-soname, Generating smbd/build_options.c This dies with the "unresolved" complaint from the linker as shown above. My guess is this is a false-positive from safe_string.h -- i.e., there's nothing wrong with the string function calls in the smbd source files, but rather safe_string is mistakenly reporting a problem. Is it possible to muzzle safe_string and just get on with the build? I have previously built 3.0.25 successfully on this same Alpha box. But when I was trying to build 3.0.28 after it came out, I hit the same "unsafe_string_function_usage" error as I'm now seeing with 3.0.30. At that time I just gave up; this time I'd like to solve the problem. -- Kai Lanz Stanford University School of Earth Sciences
Bengt Nilsson
2008-Jun-06 12:16 UTC
[Samba] unsafe_string_function_usage_here when linking smbd
I get the prorotype error (uint32 / uint32_t) in include/util_tdb.h regardless of if I use cc or gcc, see [Samba] Failed building 3.0.30 for tru64 4.0F If I modfy include/util_tdb.h changing uint32_t to uint32, and correct the typo (TDB_BASE_OBJ) -> (TDBBASE_OBJ) in the Makefile.in, . and use CC=gcc for /configure I get the same result as Kai Lanz. 3 jun 2008 kl. 22.52 skrev Kai Lanz:> I'm trying to build 3.0.30 on Alpha/Tru64-4.0G. The configure step > works, > but make fails when it tries to link smbd: > > Compiling popt/popt.c > Compiling popt/poptconfig.c > Compiling popt/popthelp.c > Compiling popt/poptparse.c > Linking bin/smbd > ld: > Unresolved: > __unsafe_string_function_usage_here_size_t__ > gmake: *** [bin/smbd] Error 1 > > This Should Never Happen :) -- that looks like a message for the > developers. > How can I track down the cause of this and fix it? > > Here are some details: I'm using the samba-3.0.30.tar.gz source > distribution > downloaded from samba.org. I configured the build as follows: > > > env CC=cc LDFLAGS=-L/local/lib CPPFLAGS=-I/local/include ./ > configure \ > --with-winbind --with-krb5=/local --with-ldap --with-ads > > (I have to use the vendor cc, because if I try to build with gcc, I > get > the same errors Bengt Nilsson is reporting about tdb_open, > _E__lc_ctype, > tdb_traverse, _Eioctl and many others.) Prior to running make, I fixed > what appears to be a typo in the Makefile: > > > diff Makefile Makefile.orig > 590c590 > < LIBSMBSHAREMODES_OBJ = libsmb/smb_share_modes.o $(TDBBASE_OBJ) > --- > > LIBSMBSHAREMODES_OBJ = libsmb/smb_share_modes.o $(TDB_BASE_OBJ) > > Dunno if that's important. Then I ran make like so, using GNU make: > > > limit datasize 1048576 > > limit memoryuse 2041072 > > gmake > > The make process begins by reporting (long lines wrapped): > > Using FLAGS = -I/usr/local/include -O -D_SAMBA_BUILD_=3 > -I/src/pub/samba-3.0.30/source/popt > -I/src/pub/samba-3.0.30/source/iniparser/src -Iinclude -I./include - > I. -I. > -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc > -DHAVE_CONFIG_H -I/usr/local/include -I/local/include - > DLDAP_DEPRECATED > -I/src/pub/samba-3.0.30/source/lib -D_SAMBA_BUILD_=3 > PICFLAG = -fPIC > LIBS = -lproplist -lsecurity -lresolv -lresolv > LDFLAGS = -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/ > local/lib > DYNEXP > LDSHFLAGS = -shared -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/ > lib > -L/local/lib > SHLIBEXT = so > SONAMEFLAG = -Wl,-soname, > Generating smbd/build_options.c > > This dies with the "unresolved" complaint from the linker as shown > above. > My guess is this is a false-positive from safe_string.h -- i.e., > there's > nothing wrong with the string function calls in the smbd source files, > but rather safe_string is mistakenly reporting a problem. Is it > possible > to muzzle safe_string and just get on with the build? > > I have previously built 3.0.25 successfully on this same Alpha box. > But when I was trying to build 3.0.28 after it came out, I hit the > same > "unsafe_string_function_usage" error as I'm now seeing with 3.0.30. At > that time I just gave up; this time I'd like to solve the problem. > > -- > Kai Lanz Stanford University School of Earth Sciences > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/listinfo/samba
Kai Lanz
2008-Jun-06 17:32 UTC
[Samba] unsafe_string_function_usage_here when linking smbd
On Jun 6, 2008, at 10:10 AM, Herb Lewis wrote:> try doing an nm on the suspected .o file and see if the reference > to the function is there. That will prove which file(s) is comes > from than maybe you can determine which function it comes from.Thanks, but I've already done that; I used "nm" to confirm that the call to an undefined external function called "unsafe_string_function_usage_here_size_t" was present in trans2.o and in no other object file under source/smbd. The trouble is there are 27 calls in trans2.c that have been wrapped by safe_string.h and I haven't thought of a way to determine which one is getting replaced by the "unsafe_" marker. -- Kai Lanz