Bug 9064 - Building samba 4.0.0 RC4 on Solaris fails
Building samba 4.0.0 RC4 on Solaris fails
Status: NEEDINFO
Product: Samba 4.0
Classification: Unclassified
Component: Build
4.0.0rc4
Sparc Solaris
: P5 normal
: ---
Assigned To: Jelmer Vernooij
samba4-qa@samba.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-24 10:29 UTC by Tom Crummey
Modified: 2012-11-05 15:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Crummey 2012-07-24 10:29:25 UTC
Solaris 10 U9
configure --prefix=/opt/samba
samba-4.0.0beta4
gcc 

There are several issues building sabe 4 beta 4 on Solaris with gcc:

[ 849/3369] Compiling auth/credentials/credentials_secrets.c
../auth/credentials/credentials_secrets.c:39:32: error: dbwrap/dbwrap_open.h: No such file or directory
Waf: Leaving directory `/usr/local/src/samba-4.0.0beta4/bin'
Build failed:  -> task failed (err #1): 
        {task: cc credentials_secrets.c -> credentials_secrets_5.o}

Fixed this by removing #include dbwrap/dbwrap_open.h as the struct defined in there is also defined in dbwrap.h

[1144/3369] Compiling source4/ntvfs/posix/vfs_posix.c
../source4/ntvfs/posix/vfs_posix.c:29:24: error: tdb_compat.h: No such file or directory
Waf: Leaving directory `/usr/local/src/samba-4.0.0beta4/bin'
Build failed:  -> task failed (err #1): 
        {task: cc vfs_posix.c -> vfs_posix_5.o}


Fixed this by changing #include "tdb_compat.h" to #include "llib/tdb_wrap/tdb_compat.h"

[1173/3369] Compiling source4/ntvfs/posix/python/pyposix_eadb.c
../source4/ntvfs/posix/python/pyposix_eadb.c:24:24: error: tdb_compat.h: No such file or directory
Waf: Leaving directory `/usr/local/src/samba-4.0.0beta4/bin'
Build failed:  -> task failed (err #1): 
        {task: cc pyposix_eadb.c -> pyposix_eadb_10.o}

Same as above

[1177/3369] Compiling source4/ntvfs/common/brlock_tdb.c
../source4/ntvfs/common/brlock_tdb.c:29:24: error: tdb_compat.h: No such file or directory

Same again

[1391/3369] Compiling source4/torture/local/dbspeed.c
../source4/torture/local/dbspeed.c:24:24: error: tdb_compat.h: No such file or directory

Same again

[3193/3369] Linking default/lib/ntdb/ntdbtorture
Undefined                       first referenced
 symbol                             in file
err                                 default/lib/ntdb/tools/ntdbtorture_3.o
ld: fatal: Symbol referencing errors. No output written to /usr/local/src/samba-4.0.0beta4/bin/default/lib/ntdb/ntdbtorture


This one I can't fix. The undefined function (err) is used at line 496 in ntdbtorture.c. I guess it could be replaced with a perror call instead.
Comment 1 Tom Crummey 2012-07-24 10:36:27 UTC
Sorry, that should read samba 4 beta 4
The version of gcc is:
gcc version 4.4.0 (GCC)
Comment 2 Tom Crummey 2012-08-17 11:04:24 UTC
The same issues seem to arise in beta6
Comment 3 Tom Crummey 2012-08-29 13:09:55 UTC
Just tried beta7 and there's some improvement. Now there's only:

[1177/3379] Compiling source4/ntvfs/posix/python/pyposix_eadb.c
../source4/ntvfs/posix/python/pyposix_eadb.c:24:24: error: tdb_compat.h: No such file or directory
Waf: Leaving directory `/usr/local/src/samba-4.0.0beta7/bin'
Build failed:  -> task failed (err #1): 
        {task: cc pyposix_eadb.c -> pyposix_eadb_10.o}
gmake: *** [all] Error 1

and 

[3203/3379] Linking default/lib/ntdb/ntdbtorture
Undefined                       first referenced
 symbol                             in file
err                                 default/lib/ntdb/tools/ntdbtorture_3.o
ld: fatal: Symbol referencing errors. No output written to /usr/local/src/samba-4.0.0beta7/bin/default/lib/ntdb/ntdbtorture
collect2: ld returned 1 exit status
Waf: Leaving directory `/usr/local/src/samba-4.0.0beta7/bin'
Build failed:  -> task failed (err #1): 
        {task: cc_link ntdbtorture_3.o,ilog_2.o,hash_1.o,replace_2.o,timegm_2.o,snprintf_2.o,strptime_2.o,getpass_2.o,getifaddrs_2.o,xattr_2.o,debug_4.o,str_4.o,tally_5.o,likely_10.o,check_1.o,free_1.o,hash_1.o,io_1.o,lock_1.o,open_1.o,summary_1.o,ntdb_1.o,transaction_1.o,traverse_1.o -> ntdbtorture}
Comment 4 Tom Crummey 2012-09-04 13:19:02 UTC
Just tried beta8 and all the missing include file problems are fixed. The remaining issue is:

[3509/3687] Linking default/lib/ntdb/ntdbtorture
Undefined                       first referenced
 symbol                             in file
err                                 default/lib/ntdb/tools/ntdbtorture_4.o
ld: fatal: Symbol referencing errors. No output written to /usr/local/src/samba-4.0.0beta8/bin/default/lib/ntdb/ntdbtorture
collect2: ld returned 1 exit status
Waf: Leaving directory `/usr/local/src/samba-4.0.0beta8/bin'
Build failed:  -> task failed (err #1): 
        {task: cc_link ntdbtorture_4.o -> ntdbtorture}
gmake: *** [all] Error 1
Comment 5 Jelmer Vernooij 2012-09-25 20:36:37 UTC
Most of this code has changed significantly since this bug was reported (tdb_compat is gone, for example). Can you still reproduce the issue?
Comment 6 Tom Crummey 2012-09-25 22:20:59 UTC
Hello Jelmer,

The issue in comment 4 still stands in Release Candidate 1; i.e. the err symbol is still not resolved in ntdbtorture. I posted an email to the samba list on the 15th:

Building samba-4.0.0rc1 on Solaris 10 update 9 with gcc 4.4.0 fails at:

[3516/3766] Linking default/lib/ntdb/ntdbtorture
Undefined                       first referenced
 symbol                             in file
err                                 default/lib/ntdb/tools/ntdbtorture_4.o
ld: fatal: Symbol referencing errors. No output written to
/usr/local/src/samba-4.0.0rc1/bin/default/lib/ntdb/ntdbtorture
collect2: ld returned 1 exit status
Waf: Leaving directory `/usr/local/src/samba-4.0.0rc1/bin'
Build failed:  -> task failed (err #1):
        {task: cc_link ntdbtorture_4.o -> ntdbtorture}
*** Error code 1
make: Fatal error: Command failed for target `all'

configure was:

./configure --prefix=/opt/samba

This has been an issue from beta4 and is reported as a bug in #9064
Comment 7 Tom Crummey 2012-10-04 09:04:09 UTC
RC2 has regressed somewhat:

[1180/3466] Compiling source4/ntvfs/posix/python/pyposix_eadb.c
../source4/ntvfs/posix/python/pyposix_eadb.c:24:24: error: tdb_compat.h: No such file or directory
Waf: Leaving directory `/usr/local/src/samba-4.0.0rc2/bin'
Build failed:  -> task failed (err #1): 
        {task: cc pyposix_eadb.c -> pyposix_eadb_10.o}
gmake: *** [all] Error 1
Comment 8 Tom Crummey 2012-10-04 12:07:52 UTC
Further issues (after replacing #include "tdb_compat.h" with #include "lib/tdb_compat/tdb_compat.h")

[1278/3466] Compiling source4/torture/winbind/winbind.c
In file included from ../source4/torture/winbind/winbind.c:27:
../lib/replace/system/kerberos.h:33:18: error: krb5.h: No such file or directory
../lib/replace/system/kerberos.h:37:21: error: com_err.h: No such file or directory
In file included from ../source4/auth/kerberos/kerberos.h:27,
Comment 9 Tom Crummey 2012-10-16 13:17:05 UTC
The error shown in comment #7 still happens in rc3.
Comment 10 Tom Crummey 2012-11-05 15:10:12 UTC
Still can't build on Solaris 10, now with RC4 error message shown below.

[3517/3775] Linking default/lib/ntdb/ntdbtorture
Undefined                       first referenced
 symbol                             in file
err                                 default/lib/ntdb/tools/ntdbtorture_4.o
ld: fatal: Symbol referencing errors. No output written to /usr/local/src/samba-4.0.0rc4/bin/default/lib/ntdb/ntdbtorture
collect2: ld returned 1 exit status
Waf: Leaving directory `/usr/local/src/samba-4.0.0rc4/bin'
Build failed:  -> task failed (err #1): 
        {task: cc_link ntdbtorture_4.o -> ntdbtorture}
gmake: *** [all] Error 1