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}
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.
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.
Any Idea?!?!?!?!
(In reply to comment #3) > Any Idea?!?!?!?! Please ignore this comment ....
I do not have access to AIX machines any more, so no chance to work on this efficiently.
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.
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.
(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.
Created attachment 14984 [details] Fix the build on AIX with GCC This is a patch for Samba 4.10 to fix the build on AIX with GCC. I can compile Samba 4.10 with this patch on AIX 7.2 with GCC 4.8.5 and 6.3.0.
Addition. The following 2 command-lines are required before configure to fix other build problems. ``` export LDFLAGS="-Wl,-bbigtoc" export CPPFLAGS="-D_LARGE_FILES -D_UINTPTR_T_DEFINED=1" ```
the changes in thirdparty need to go upstream to the , in the case of waf, this is https://waf.io/ - can you report the fix there, please? Leaving this bug report open for documentation reasons until we can import a fixed waf release is fine. Thanks!
*** Bug 10828 has been marked as a duplicate of this bug. ***
closing as this needs to be fixed in upstream waf and also because AIX 6 is no longer supported by Samba with the reworked VFS layer