Date: Fri, 16 Jan 2009 08:51:06 GMT From: Sergey <z_serg_2000@mail.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/130610: port net/samba32-devel don't build at libsmb/libsmb_cache.c if old version of Samba is installed Message-ID: <200901160851.n0G8p6tb035068@www.freebsd.org> Resent-Message-ID: <200901160900.n0G902GD033862@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 130610 >Category: ports >Synopsis: port net/samba32-devel don't build at libsmb/libsmb_cache.c if old version of Samba is installed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 16 09:00:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Sergey >Release: FreeBSD 7.0-RELEASE-p7 >Organization: >Environment: FreeBSD acc.acc.tula.ru 7.0-RELEASE-p7 FreeBSD 7.0-RELEASE-p7 #62: Tue Dec 23 12:57:54 MSK 2008 root@acc.acc.tula.ru:/usr/obj/usr/src/sys/Z i386 >Description: If old version of Samba is installed port net/samba32-devel stop building at libsmb/libsmb_cache.c with error: Linking non-shared library bin/libnetapi.a Compiling libsmb/libsmb_cache.c In file included from libsmb/libsmb_cache.c:25: include/libsmb_internal.h:176: error: expected specifier-qualifier-list before 'smbc_smb_encrypt_level' libsmb/libsmb_cache.c: In function 'SMBC_add_cached_server': libsmb/libsmb_cache.c:91: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:91: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:91: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:91: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:91: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c: In function 'SMBC_get_cached_server': libsmb/libsmb_cache.c:121: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:163: error: called object 'smbc_getFunctionRemoveCachedServer(context)' is not a function libsmb/libsmb_cache.c:178: error: called object 'smbc_getFunctionRemoveCachedServer(context)' is not a function libsmb/libsmb_cache.c: In function 'SMBC_remove_cached_server': libsmb/libsmb_cache.c:203: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:207: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:207: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:207: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:207: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c:207: error: dereferencing pointer to incomplete type libsmb/libsmb_cache.c: In function 'SMBC_purge_cached_servers': libsmb/libsmb_cache.c:232: error: dereferencing pointer to incomplete type The following command failed: cc -I. -I/usr/ports/net/samba32-devel/work/samba-3.2.4/source -O -D_SAMBA_BUILD_=3 -I/usr/local/include -I/usr/ports/net/samba32-devel/work/samba-3.2.4/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/usr/local/include -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -I./popt -I/usr/local/include -DLDAP_DEPRECATED -I/include -I/usr/ports/net/samba32-devel/work/samba-3.2.4/source/lib -D_SAMBA_BUILD_=3 -fPIC -DPIC -c libsmb/libsmb_cache.c -o libsmb/libsmb_cache.o gmake: *** [libsmb/libsmb_cache.o] Ошибка 1 *** Error code 2 Stop in /usr/ports/net/samba32-devel. *** Error code 1 Stop in /usr/ports/net/samba32-devel. >How-To-Repeat: 1. Install net/samba3 2. Try to make at net/samba32-devel >Fix: The reason of error is simple: make use /usr/local/include/libsmbclient.h instead of libsmbclient.h from work directory because of -I/usr/local/include is first path for searching *.h files. ===> Building for samba-3.2.4_2 Using FLAGS = -O -D_SAMBA_BUILD_=3 -I/usr/local/include -I/usr/ports/net/samba32-devel/work/samba-3.2.4/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/usr/local/include -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -I./popt -I/usr/local/include -DLDAP_DEPRECATED -I/include -I/usr/ports/net/samba32-devel/work/samba-3.2.4/source/lib -D_SAMBA_BUILD_=3 The patch is just stop biulding if /usr/local/include/libsmbclient.h from early version of Samba. Patch attached with submission follows: --- /usr/ports/net/samba32-devel/Makefile 2009-01-07 03:28:42.000000000 +0300 +++ Makefile 2009-01-10 12:30:13.000000000 +0300 @@ -99,6 +99,11 @@ .if exists(${LOCALBASE}/include/tdb.h) IGNORE= doesn't compile when tdb is installed. Uninstall databases/tdb port .endif +# Stop building if Samba 3.0.x or previous is installed +OLD_SAMBA!= grep -s -q SMBC_internal_data /usr/local/include/libsmbclient.h; echo $$? +.if ${OLD_SAMBA}==1 +IGNORE= doesn't compile when old Samba version installed +.endif # Let process generate meaningful backtrace on a core dump LIB_DEPENDS+= execinfo.1:${PORTSDIR}/devel/libexecinfo >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901160851.n0G8p6tb035068>