Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350720 - net-fs/samba-3.5.6 fails to build with sys-libs/tdb-1.2.7
Summary: net-fs/samba-3.5.6 fails to build with sys-libs/tdb-1.2.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-05 17:46 UTC by Alexandre Rostovtsev (RETIRED)
Modified: 2011-01-18 23:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
complete build log (samba-3.5.6-with-tdb-1.2.7.build.log.gz,18.30 KB, application/x-gzip)
2011-01-05 17:48 UTC, Alexandre Rostovtsev (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-01-05 17:46:36 UTC
tdb-1.2.7 (recently added to the tree) makes it impossible to build samba-3.5.6:

# USE="acl ads aio avahi caps client cups doc fam ldap netapi pam readline server smbclient swat winbind" MAKEOPTS="-j1" emerge samba
[...]
Compiling lib/tdb_validate.c
In file included from lib/tdb_validate.h:26:0,
                 from lib/tdb_validate.c:22:
/usr/include/tdb.h:94:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
/usr/include/tdb.h:96:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
/usr/include/tdb.h:100:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:102:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:103:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:104:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:105:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘enum’
/usr/include/tdb.h:106:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘const’
/usr/include/tdb.h:107:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘TDB_DATA’
/usr/include/tdb.h:108:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:112:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:113:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:114:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:115:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:116:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘TDB_DATA’
/usr/include/tdb.h:117:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘TDB_DATA’
/usr/include/tdb.h:118:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:119:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:120:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:121:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:122:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:123:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:124:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:125:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:126:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:127:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:128:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:129:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘const’
/usr/include/tdb.h:130:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:131:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘tdb_log_func’
/usr/include/tdb.h:132:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:133:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:134:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:135:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:136:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:137:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:138:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:139:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:140:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’
/usr/include/tdb.h:141:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:142:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:143:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:144:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:145:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:146:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘unsigned’
/usr/include/tdb.h:147:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:152:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:153:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:154:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:155:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:156:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:157:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:158:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:160:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:163:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:164:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:167:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/tdb.h:168:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:169:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:170:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
/usr/include/tdb.h:172:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
lib/tdb_validate.c: In function ‘tdb_validate_child’:
lib/tdb_validate.c:65:2: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
lib/tdb_validate.c:78:2: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
lib/tdb_validate.c: In function ‘tdb_validate’:
lib/tdb_validate.c:110:2: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
lib/tdb_validate.c:176:2: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘int’
lib/tdb_validate.c: In function ‘traverse_copy_fn’:
lib/tdb_validate.c:224:3: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
The following command failed:
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -I. -I/var/tmp/portage/net-fs/samba-3.5.6/work/samba-3.5.6/source3 -Iinclude -I./include  -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. -DHAVE_CONFIG_H  -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. -I./../lib/popt -DLDAP_DEPRECATED  -I/var/tmp/portage/net-fs/samba-3.5.6/work/samba-3.5.6/source3/lib -I.. -I../source4 -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3  -fPIC -c lib/tdb_validate.c -o lib/tdb_validate.o
make: *** [lib/tdb_validate.o] Error 1
emake failed
 * ERROR: net-fs/samba-3.5.6 failed:
 *   emake sbinprogs failed

Note that with tdb-1.2.1-r1, samba-3.5.6 compiles with no problems.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-01-05 17:48:38 UTC
Created attachment 258959 [details]
complete build log
Comment 2 Rafał Mużyło 2011-01-05 19:27:27 UTC
Ah, yes.
Seems whoever did the release upstream had a bad day.
http://gitweb.samba.org/?p=samba.git;a=commitdiff;h=62c4af99428abb2d4ac1b18454d72e0c8cbb67e8
partially fixes it, but as they were in process of switching to waf,
they've still failed to define _PUBLIC_ for autotools build.
Comment 3 Rafał Mużyło 2011-01-05 20:08:06 UTC
Actually, it seems that after that patch, correct solution would be
'append-flags -U_PUBLIC_'
Comment 4 Rafał Mużyło 2011-01-05 23:20:05 UTC
...or rather -D_PUBLIC_
Comment 5 Denis Kaganovich 2011-01-12 17:31:11 UTC
(In reply to comment #4)
> ...or rather -D_PUBLIC_

-D_PUBLIC_=
Comment 6 Víctor Ostorga (RETIRED) gentoo-dev 2011-01-18 21:16:44 UTC
This was a messy release, it seems like the next ebuild will need to use waf...

Thanks for the patch.

+*tdb-1.2.7-r1 (18 Jan 2011)
+
+  18 Jan 2011; Víctor Ostorga <vostorga@gentoo.org> -tdb-1.2.7.ebuild,
+  +tdb-1.2.7-r1.ebuild:
+  Set _PUBLIC_ in C file rather than header files bug #350720 patch thanks
+  to Rafał Mużyło <galtgendo@o2.pl>

Comment 7 Rafał Mużyło 2011-01-18 23:15:57 UTC
Next release won't have a choice - upstream has been removing autotools from the whole samba in favor of waf.
Comment 8 Rafał Mużyło 2011-01-18 23:19:28 UTC
LOL
After I wrote comment 7, I took a look at http://samba.org/ftp/tdb/
- there's 1.2.9 and it's waf-only.