The Samba-Bugzilla – Bug 6832
Build system: Necessary patches to get S4 to build on OpenSolaris
Last modified: 2009-11-24 19:36:33 UTC
This patch set fixes so Samba 4 actually compiles and test solid on OpenSolaris.
1. configure.developer don't actually finish. This is due to illegal compiler flags. Se notes in 0001 for details.
2. Build of idl files assumes that the compiler is gcc. Wrong in my case. Use perl's internal grep function to check for compiler. Se notes in 0002 for details
3. This behavior is seen by all Solaris boxes on buildfarm. This is due to how libintl is handled in samba and heimdal. One change to heimdal_build fixes this. See 0003 for details
4. <sys/mman.h> home of mmap and friends defines MAP_RENAME and friends. LDB module namespace isn't clean in this regards and make for compilation imposible. Add a prefix of LDB_ to clean up namespace. This fixes last remaining issue for compilation of Samba 4 on OpenSolaris. See 0004 for details.
Created attachment 4868 [details]
Created attachment 4869 [details]
Created attachment 4870 [details]
Created attachment 4871 [details]
patch 001 should better be made indepent of operating system as the sun studio compiler is also availabel on other platforms and the other way round: there can be other compilers on solaris, too. I'm not sure if there is some compiler detection code, if not - we should probably add some.
Patch 3 and 4 look good (part of 4 is already merged). Patches 1 and 2 need more work - using 'gcc is in the compiler name' isn't really good enough, we need something better than that. Similarly, I would like the per-platform stuff in 1 to go via the samba-technical list for review.
(In reply to comment #5)
> patch 001 should better be made indepent of operating system as the sun studio
> compiler is also availabel on other platforms and the other way round: there
> can be other compilers on solaris, too. I'm not sure if there is some compiler
> detection code, if not - we should probably add some.
I can't see how to do this better, without writing a lot of m4 to determan make of compiler. (Outside my foo level) As is without 0001 Samba4 will not finish configure. Existing code assumes all non gnu compilers to be irix. Is that better?
(In reply to comment #6)
> Patch 3 and 4 look good (part of 4 is already merged). Patches 1 and 2 need
> more work - using 'gcc is in the compiler name' isn't really good enough, we
> need something better than that. Similarly, I would like the per-platform
> stuff in 1 to go via the samba-technical list for review.
A better patch for 1 and 2 is outside my abaility. I would love to come up with a better solution, but available info inside perl at 0002 level is not available. So patch just make it not use gcc flags if the compiler is not gcc. Can you se a better solution?
For patch 1 would a patch that just runes AX_CFLAGS_IRIX on irix be aceptable? As is it brakes compilation as it sets fals flags.
For 0001: From source4/build/m4/ax_cflags_gcc_option.m4:
dnl see also:
dnl AX_CFLAGS_SUN_OPTION AX_CFLAGS_HPUX_OPTION
dnl AX_CFLAGS_AIX_OPTION AX_CFLAGS_IRIX_OPTION
We may need to use AX_CFLAGS_SUN_OPTION(-v, DEVELOPER_CFLAGS)
0002 is broken for me with CC="cache gcc"
Patches 0003 and 0004 are push to master as 95ce7dff20d5629eff16cc6f7527c542987d8eb0
And what is with the other patches?
I posted a patch at https://bugzilla.samba.org/show_bug.cgi?id=6905 similar to Patch 001. Can anyone take a look at it? Thanks
The patches we are willing to take from this bug have been applied. For patch 2, Doing a regex on a compiler name isn't an acceptable way to determine GCC.