The Samba-Bugzilla – Attachment 9747 Details for
Bug 9911
Build Samba 4.0.x on AIX with IBM XL C/C++ (gettext detection issues)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for 4.0 and 4.1 with cherry-pick information
9911_4_x.patch (text/plain), 11.32 KB, created by
Christian Ambach
on 2014-03-03 20:33:33 UTC
(
hide
)
Description:
Patches for 4.0 and 4.1 with cherry-pick information
Filename:
MIME Type:
Creator:
Christian Ambach
Created:
2014-03-03 20:33:33 UTC
Size:
11.32 KB
patch
obsolete
>From 15bb6198decdf74f62b879e59d5aab1bf4ed1836 Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 2 Jan 2014 23:28:20 +0100 >Subject: [PATCH 1/7] waf:lib/replace correct detection of libiconv > >add -liconv as a complete command line argument, >not all characters on their own > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 > >Signed-off-by: Christian Ambach <ambi@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 1a42ff7d8db63b26e2beb43268a1c4664723358e) >--- > lib/replace/wscript | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/lib/replace/wscript b/lib/replace/wscript >index b6fb10b..2bcf542 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -386,7 +386,7 @@ removeea setea > # Some hosts need lib iconv for linking with lib intl > # So we try with flags just in case it helps. > oldflags = conf.env['EXTRA_LDFLAGS']; >- conf.env['EXTRA_LDFLAGS'].extend("-liconv") >+ conf.env['EXTRA_LDFLAGS'].extend(["-liconv"]) > conf.CHECK_FUNCS_IN('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', > 'intl', checklibc=False, headers='libintl.h') > conf.env['EXTRA_LDFLAGS'] = oldflags >-- >1.8.3.2 > > >From 4c7fc9520fec35504d54857b131714f3ea2fec4e Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 2 Jan 2014 22:23:16 +0100 >Subject: [PATCH 2/7] waf:lib/replace fix up libintl related checks > >on a default installation of AIX, libintl.a exists but >libintl.h does not >So check for the declarations of those functions as well >to make sure that the build works. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 > >Signed-off-by: Christian Ambach <ambi@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit df6ddcfbfcd33274c1b768ce26829b0ad9278cd0) >--- > lib/replace/wscript | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/lib/replace/wscript b/lib/replace/wscript >index 2bcf542..8b82b75 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -367,6 +367,7 @@ removeea setea > if not Options.options.disable_gettext: > conf.CHECK_HEADERS('libintl.h') > conf.CHECK_LIB('intl') >+ conf.CHECK_DECLS('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', headers="libintl.h") > # *textdomain functions are not strictly necessary > conf.CHECK_FUNCS_IN('bindtextdomain textdomain bind_textdomain_codeset', > '', checklibc=True, headers='libintl.h') >-- >1.8.3.2 > > >From aab11a3d73fc888ce729e90e8283aedf35e628ce Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 12 Dec 2013 22:12:07 +0100 >Subject: [PATCH 3/7] waf:lib/replace change detection of gettext > >convert this to an automatic check: if no option is given, try to find gettext >and if found, use it >if user has specified --with-gettext, then bail out if it could not be found >in case of --without-gettext, skip all gettext related configure checks > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 > >Signed-off-by: Christian Ambach <ambi@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit a83f491810d34cc8b6eb4b0f40bbbb1440e0f84d) >--- > buildtools/wafsamba/wscript | 3 +-- > lib/replace/wscript | 9 +++++---- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript >index fe2e515..7984227 100755 >--- a/buildtools/wafsamba/wscript >+++ b/buildtools/wafsamba/wscript >@@ -80,8 +80,7 @@ def set_options(opt): > match = ['Checking for library iconv', 'Checking for iconv_open', 'Checking for header iconv.h']) > opt.add_option('--with-gettext', > help='additional directory to search for gettext', >- action='store', dest='gettext_location', default='/usr/local', >- match = ['Checking for library intl', 'Checking for header libintl.h']) >+ action='store', dest='gettext_location', default='None') > opt.add_option('--without-gettext', > help=("Disable use of gettext"), > action="store_true", dest='disable_gettext', default=False) >diff --git a/lib/replace/wscript b/lib/replace/wscript >index 8b82b75..91a93ef 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -363,6 +363,7 @@ removeea setea > headers='netinet/in.h arpa/nameser.h resolv.h') > > >+ # try to find libintl (if --without-gettext is not given) > conf.env.intl_libs='' > if not Options.options.disable_gettext: > conf.CHECK_HEADERS('libintl.h') >@@ -394,10 +395,10 @@ removeea setea > if conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DGETTEXT']: > # save for dependency definitions > conf.env.intl_libs='iconv intl' >- else: >- conf.fatal('library gettext not found, try specifying the path to ' + >- 'it with --with-gettext=</path/to/gettext> or ' + >- '--without-gettext to build without''') >+ >+ # did the user insist on gettext (--with-gettext)? >+ if Options.options.gettext_location != 'None' and (not conf.env['HAVE_GETTEXT'] or not conf.env['HAVE_DGETTEXT']): >+ conf.fatal('library gettext not found at specified location') > > conf.CHECK_FUNCS_IN('pthread_create', 'pthread', checklibc=True, headers='pthread.h') > >-- >1.8.3.2 > > >From 5aa0ca877665c5906a97018463133b0f6770e32d Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 12 Dec 2013 22:10:36 +0100 >Subject: [PATCH 4/7] waf:lib/replace fix gettext detection > >if the user has specified a path for gettext, add it to CFLAGS and LDFLAGS >so we can find it during configure and build > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 > >Signed-off-by: Christian Ambach <ambi@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 31db0c8acdd68f396417e1f6504a91a40295bc89) >--- > lib/replace/wscript | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/lib/replace/wscript b/lib/replace/wscript >index 91a93ef..5c79517 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -366,6 +366,13 @@ removeea setea > # try to find libintl (if --without-gettext is not given) > conf.env.intl_libs='' > if not Options.options.disable_gettext: >+ # any extra path given to look at? >+ if not Options.options.gettext_location == 'None': >+ conf.env['CFLAGS'].extend(["-I%s" % Options.options.gettext_location]); >+ conf.env['LDFLAGS'].extend(["-L%s" % Options.options.gettext_location]); >+ else: >+ conf.env['CFLAGS'].extend(["-I/usr/local"]); >+ conf.env['LDFLAGS'].extend(["-L/usr/local"]); > conf.CHECK_HEADERS('libintl.h') > conf.CHECK_LIB('intl') > conf.CHECK_DECLS('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', headers="libintl.h") >-- >1.8.3.2 > > >From 2ddfb4adb20707c735241dec927497c28bd188fc Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 25 Jul 2013 19:41:02 +0200 >Subject: [PATCH 5/7] waf:lib/replace gettext configure checks > >Make sure we only try to work with gettext if we found >the prototypes and were able to link > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 > >Signed-off-by: Christian Ambach <ambi@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Christian Ambach <ambi@samba.org> >Autobuild-Date(master): Fri Jan 17 19:30:33 CET 2014 on sn-devel-104 > >(cherry picked from commit da891e2101c568d2f0b9a2bda78702826ea68f3c) >--- > lib/replace/wscript | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/lib/replace/wscript b/lib/replace/wscript >index 5c79517..1bc979c 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -403,6 +403,15 @@ removeea setea > # save for dependency definitions > conf.env.intl_libs='iconv intl' > >+ # did we find both prototypes and a library to link against? >+ # if not, unset the detected values (see Bug #9911) >+ if not (conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DECL_GETTEXT']): >+ conf.undefine('HAVE_GETTEXT') >+ conf.undefine('HAVE_DECL_GETTEXT') >+ if not (conf.env['HAVE_DGETTEXT'] and conf.env['HAVE_DECL_DGETTEXT']): >+ conf.undefine('HAVE_DGETTEXT') >+ conf.undefine('HAVE_DECL_DGETTEXT') >+ > # did the user insist on gettext (--with-gettext)? > if Options.options.gettext_location != 'None' and (not conf.env['HAVE_GETTEXT'] or not conf.env['HAVE_DGETTEXT']): > conf.fatal('library gettext not found at specified location') >-- >1.8.3.2 > > >From 0d0d7fa8c5727edb55fa9522cb2f226f68992e45 Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Wed, 29 Jan 2014 20:48:38 +0100 >Subject: [PATCH 6/7] waf:lib/replace fix iconv checks on HP/UX > >we need to copy away the list of LDFLAGS >to be tried before modifying it instead of >just creating a new reference and then continuing >with a modified list while it should have been >reset back to the original value > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 > >Signed-off-by: Christian Ambach <ambi@samba.org> > >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Thu Feb 13 02:01:03 CET 2014 on sn-devel-104 > >(cherry picked from commit 6a7c420a79cc1258528f152f4de9a0608767729f) >--- > lib/replace/wscript | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/lib/replace/wscript b/lib/replace/wscript >index 1bc979c..8451689 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -394,7 +394,7 @@ removeea setea > else: > # Some hosts need lib iconv for linking with lib intl > # So we try with flags just in case it helps. >- oldflags = conf.env['EXTRA_LDFLAGS']; >+ oldflags = list(conf.env['EXTRA_LDFLAGS']); > conf.env['EXTRA_LDFLAGS'].extend(["-liconv"]) > conf.CHECK_FUNCS_IN('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', > 'intl', checklibc=False, headers='libintl.h') >-- >1.8.3.2 > > >From 20a55774d6807df36700901626ea4315aee6ab1d Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Wed, 19 Feb 2014 22:17:01 +0100 >Subject: [PATCH 7/7] heimdal_build: only enable libintl functions if > everything was found > >do not rely on intl.h being available but also on the functions being usable >This should fix the build on HP-UX > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 >Signed-off-by: Christian Ambach <ambi@samba.org> > >Change-Id: I5dd88d2d5216b778624778455cca99b32d0be58f >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Thu Feb 20 01:28:24 CET 2014 on sn-devel-104 > >(cherry picked from commit 8f0d06fa5e654f647664727db6f12901579ec2c7) >--- > source4/heimdal_build/config.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/source4/heimdal_build/config.h b/source4/heimdal_build/config.h >index bd5a1b8..2d113ae 100644 >--- a/source4/heimdal_build/config.h >+++ b/source4/heimdal_build/config.h >@@ -41,7 +41,8 @@ > #endif > > /*Workaround for heimdal define vs samba define*/ >-#ifdef HAVE_LIBINTL_H >+#if defined(HAVE_LIBINTL_H) && defined(HAVE_BINDTEXTDOMAIN) &&\ >+ defined(HAVE_TEXTDOMAIN) > #define LIBINTL > #endif > >-- >1.8.3.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
abartlet
:
review+
Actions:
View
Attachments on
bug 9911
:
8964
|
8987
|
8998
|
9007
|
9106
|
9107
|
9114
|
9115
|
9127
|
9419
|
9482
|
9483
|
9500
|
9554
|
9746
| 9747