Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiling Samba using IBM's C compiler

Status
Not open for further replies.

clund

Technical User
Sep 9, 2004
23
US
Has anybody here had any success using IBM's C compiler to compile Samba?
I have heard that it's supposed to produce a (measurably) faster binary compared to GCC but nobody seems to have working instructions for getting it done.

When I run the compile it produces a lot of errors like this:
"cc: 1501-218 file nsswitch/wb_common.po contains an incorrect file suffix"

When I use GCC then I don't see any errors like that.
 
Hello You can download CIFS SAMBA AIX at or Ibm site I think that this binairies version probably is build with Vis.. Ag.. I have making some tests with gnu g++ and Ibm products with same program it is big work for small result (at link ld control is hard to drive in two sides with original source Gcc) (several coffee take and the long night... with computeur noise that in add) . The two products are very performant.... << "(with the errors messages !!!!)" << endl; Happy new year , (only Samba music has no errors....)
 
when you run ./configure, can you paste us the configure.log?

Maybe its missing a dependency. Looks like a LOCALE issue....

 
Here's part of the output when I run configure:

checking whether building shared libraries actually works... cc: 1501-218 file shlib.po contains an incorrect file suffix
yes

There're no relevant warnings/errors in the config.log file ... grepping through the file leads to one relevant (?) line:
PICSUFFIX='po'

Not sure what to do next...
 
Can you please paste the 3 lines before and after this error?

So, far it looks like a missing openssh library...

 
I don't think it has anything to do with openssh ... I'm just running:
./configure --prefix=/usr/local

Using xlc I get the above errors ... if I use GCC then everything works just fine. And both are being run on the same fresh, basic AIX5.3 install (nothing except what comes with the base install + the two compilers). It has something to do with the .po suffix...

There's a bug (with a little more detail) posted on Samba's site about this issue:
 
And here's the section of the config.log where the error/warning occurs:

| builtin and then its argument prototype would still apply. */
| char extattr_set_link ();
| /* The GNU C library defines this for functions which it implements
| to always fail with ENOSYS. Some functions are actually named
| something starting with __ and the normal name is an alias. */
| #if defined (__stub_extattr_set_link) || defined (__stub___extattr_set_link)
| choke me
| #else
| char (*f) () = extattr_set_link;
| #endif
| #ifdef __cplusplus
| }
| #endif
|
| int
| main ()
| {
| return f != extattr_set_link;
| ;
| return 0;
| }
configure:25231: result: no
configure:25261: checking ability to build shared libraries
configure:25638: result: true
configure:25640: checking linker flags for shared libraries
configure:25642: result: -Wl,-bexpall,-bM:SRE,-bnoentry,-berok
configure:25644: checking compiler flags for position-independent code
configure:25646: result: -O2
configure:25653: checking whether building shared libraries actually works
configure:25670: result: yes
configure:25679: checking for long long
configure:25698: cc -o conftest -O -D_SAMBA_BUILD_ -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 conftest.
c >&5
configure:25701: $? = 0
configure:25703: ./conftest
configure:25706: $? = 0
configure:25720: result: yes
configure:25734: checking for LL suffix on long long integers
configure:25756: cc -c -O -D_SAMBA_BUILD_ -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 conftest.c >&5
configure:25762: $? = 0
configure:25766: test -z
|| test ! -s conftest.err

 
Samba probally won't compile for xlc. It probally has GNUized code :-(

 
Well, thanks for talking a look at it Mag0007.

I'll be upgrading to the latest version of xlc in the not too distant future (I'm currently on v6.0) and it's supposed to be more compatible with "GNUized code" so that may solve my problem.
 
IBM AIX 4.3.2 ppc avec gcc 3.2.3 :
CFLAGS="-O2 -mcpu=powerpc -Wa,-many " CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/samba --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared

***********************************

IBM AIX 4.3.3 ppc avec xlC_r (IBM Visual Age C/C++ 6.0) :
CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" CXX=xlC_r CXXFLAGS ="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" ./configure --prefix=/usr/local/samba --localstatedir=/usr/local/samba/data --libexecdir=/usr/local/samba/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared --with-innodb

***********************************

IBM AIX 5.1.0 ppc avec gcc 3.3 :
CFLAGS="-O2 -mcpu=powerpc -Wa,-many" CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/samba --with-extra-charsets=complex --with-server-suffix="-pro" --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared

**********************************************

IBM AIX 5.2.0 ppc avec xlC_r (IBM Visual Age C/C++ 6.0) :
CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" CXX=xlC_r CXXFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" ./configure --prefix=/usr/local/samba --localstatedir=/usr/local/samba/data --libexecdir=/usr/local/samba/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared --with-embedded-server --with-innodb

********************************************
 
Thank you macazu ... what version of Samba is this supposed to work with?
I tried it on the latest stable (3.0.21a) and it bombed when it tried to compile smbd.
 
Probably is 3.0.7-5 of the dvd sources Suse 9.2 I have take this file in the shared internal user VisualAge on my network I have not verify is just for you can see the difference with two sample configuration. The Samba VisualAge is running on this computer.I have create duplicate file with it.
When I see the man I can take exact specific information for SAMBA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top