Bug 10270 - Samba 4.1.0 Build on AIX 6.1 with gcc 4.8.2 Fails
Samba 4.1.0 Build on AIX 6.1 with gcc 4.8.2 Fails
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.1.0
PPC AIX
: P5 normal
: ---
Assigned To: Björn Jacke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-14 21:13 UTC by John Janosik
Modified: 2014-06-14 12:15 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Janosik 2013-11-14 21:13:13 UTC
Samba configure run with all defaults except for "--without-gettext".  The waf build step fails because there is no argument passed to the -G option to gcc.

[root@rchutl02] > ./buildtools/bin/waf -v build
./buildtools/wafsamba/samba_utils.py:397: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Waf: Entering directory `/usr/src/samba-4.1.0/bin'
    Selected embedded Heimdal build
[   7/3692] Linking default/lib/replace/libreplace.so
15:01:13 runner gcc default/lib/replace/replace_2.o default/lib/replace/timegm_2.o default/lib/replace/snprintf_2.o default/lib/replace/getifaddrs_2.o default/lib/replace/xattr_2.o -o /usr/src/samba-4.1.0/bin/default/lib/replace/libreplace.so -lpthread -lc -G -Wl,-brtl,-bexpfull -L/usr/local/lib -lrt -lbsd -lnsl
gcc: error: argument to '-G' should be a non-negative integer
Waf: Leaving directory `/usr/src/samba-4.1.0/bin'
Build failed:  -> task failed (err #1): 
        {task: cc_link replace_2.o,timegm_2.o,snprintf_2.o,getifaddrs_2.o,xattr_2.o -> libreplace.so}
Comment 1 John Janosik 2013-11-14 21:52:52 UTC
It seems the problem is that waf is configuring for xlc even though I have set CC=gcc.  From bin/config.log:

# project samba configured on Thu Nov 14 15:34:23 2013 by
# waf 1.5.19 (abi 7, python 20602f0 on aix6)
# using ./buildtools/bin/waf configure --without-gettext
#

----------------------------------------
Checking for program xlc_r or xlc
  find program=['xlc_r', 'xlc'] paths=[] var='CC'
  -> 'gcc'

----------------------------------------
Checking for program ar
  find program=['ar'] paths=[] var='AR'
  -> '/usr/bin/ar'

----------------------------------------
Checking for program ranlib
  find program=['ranlib'] paths=[] var='RANLIB'
  -> '/usr/bin/ranlib'

----------------------------------------
Checking for xlc 
ok 

I tried removing xlc from my path but configure still detects xlc even though it shouldn't be finding it:

[root@rchutl02] > echo $PATH
.:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/afsws/bin:/usr/afsws/etc:/usr/afs/bin:/usr/afs/tools
[root@rchutl02] > which xlc
no xlc in . /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/afsws/bin /usr/afsws/etc /usr/afs/bin /usr/afs/tools
[root@rchutl02] > which cc
no cc in . /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/afsws/bin /usr/afsws/etc /usr/afs/bin /usr/afs/tools
[root@rchutl02] > which gcc
/usr/bin/gcc
[root@rchutl02] > ls -ld /usr/bin/gcc
lrwxrwxrwx    1 root     system           26 May  1 2013  /usr/bin/gcc -> ../../opt/freeware/bin/gcc
[root@rchutl02] > rpm -qf /opt/freeware/bin/gcc
gcc-4.8.2-1

I'm looking at find_program in buildtoosl/wafadmin/Configure.py but haven't figured it out yet.
Comment 2 John Janosik 2013-11-15 14:25:28 UTC
I was able to get past this when I found the --check-c-compiler option to configure.  I'm not sure if the CC environment variable should work to select the compiler or if I need to do that as well as use this configure option by design.

The make step fails after getting past this with:

[3213/3692] Linking default/source4/heimdal_build/libroken-samba4.so
[3214/3692] Linking default/lib/ccan/libccan.so
[3215/3692] Linking default/lib/tdb/libtdb.so
sem_trywait: Permission denied
sem_post: Permission denied
sem_destroy: Permission denied
sem_trywait: Permission denied
sem_post: Permission denied
sem_destroy: Permission denied
ld: 0706-012 The -h flag is not recognized.
ld: 0706-005 Cannot find or open file: libtalloc.so.2
        ld:open(): No such file or directory
collect2: error: ld returned 255 exit status
sem_trywait: Permission denied
sem_post: Permission denied
sem_destroy: Permission denied
ld: 0706-012 The -h flag is not recognized.
ld: 0706-005 Cannot find or open file: libtdb.so.1
        ld:open(): No such file or directory
collect2: error: ld returned 255 exit status
ld: 0706-012 The -h flag is not recognized.
ld: 0706-005 Cannot find or open file: libroken-samba4.so.19
        ld:open(): No such file or directory
collect2: error: ld returned 255 exit status
Waf: Leaving directory `/usr/src/samba-4.1.0/bin'
Build failed:
 -> task failed (err #1): 
        {task: cc_link talloc_1.o -> libtalloc.so}
 -> task failed (err #1): 
        {task: cc_link check_1.o,error_1.o,tdb_1.o,traverse_1.o,freelistcheck_1.o,lock_1.o,dump_1.o,freelist_1.o,io_1.o,open_1.o,transaction_1.o,hash_1.o,summary_1.o,rescue_1.o -> libtdb.so}
 -> task failed (err #1): 
        {task: cc_link base64_3.o,ct_3.o,hex_3.o,bswap_3.o,dumpdata_3.o,emalloc_3.o,ecalloc_3.o,getarg_3.o,get_window_size_3.o,getdtablesize_3.o,h_errno_3.o,issuid_3.o,net_read_3.o,net_write_3.o,parse_time_3.o,parse_units_3.o,vis_3.o,strlwr_3.o,strsep_copy_3.o,strsep_3.o,strupr_3.o,strpool_3.o,estrdup_3.o,erealloc_3.o,simple_exec_3.o,strcollect_3.o,rtbl_3.o,rand_3.o,cloexec_3.o,xfree_3.o,replace_3.o,closefrom_3.o,resolve_3.o,socket_3.o,roken_gethostby_3.o,strerror_r_3.o -> libroken-samba4.so}
make: The error code from the last command is 1.


Stop.
Comment 3 Korbinian N. 2013-11-19 09:51:05 UTC
Any Idea?!?!?!?!
Comment 4 Korbinian N. 2013-11-19 09:51:49 UTC
(In reply to comment #3)
> Any Idea?!?!?!?!

Please ignore this comment ....
Comment 5 Christian Ambach 2014-05-14 15:24:29 UTC
I do not have access to AIX machines any more, so no chance to work on this efficiently.
Comment 6 Björn Jacke 2014-05-14 15:58:02 UTC
I also don't. Looks like this platform cannot be supported effectively anymore. Donations of an unsued AIX box to the Samba Team would be welcome, it would improve AIX support in the future probably again.
Comment 7 John Janosik 2014-06-13 16:00:39 UTC
FYI I'm still planning on getting some AIX instances that can be added to the build farm that will be able to be accessed by some Samba team members.  It may take a a few months as I'm waiting on new hardware.
Comment 8 Volker Lendecke 2014-06-14 12:15:28 UTC
(In reply to comment #7)
> FYI I'm still planning on getting some AIX instances that can be added to the
> build farm that will be able to be accessed by some Samba team members.  It may
> take a a few months as I'm waiting on new hardware.

A box in the build farm is nice, but the real benefit would be Hardware in a team-controlled network. There's only a limited set of tests that you can do without being able to play with the environment: You definitely want to test a real AD membership, and this only works if you have an AD controller next to the box being tested. And I guess it's very difficult to set up such an environment inside some IBM firewall that is really useful.