pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44810: pkgsrc 2010Q4 samba35 Solaris 2.{8,10} - libintl problem - configure in samba35 broken

>Number:         44810
>Category:       pkg
>Synopsis:       pkgsrc 2010Q4 samba35 Solaris 2.{8,10} - libintl problem - 
>configure in samba35 broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 31 09:45:00 +0000 2011
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        pkgsrc 2010Q4
Dr. Nagler & Company GmbH
System: NetBSD test-s0 4.0 NetBSD 4.0 (NSW-WS) #0: Tue Aug 17 17:28:09 CEST 
2010 wgstuken@test-s0:/usr/src/sys/arch/amd64/compile/NSW-WS amd64
Architecture: x86_64
Machine: amd64
        While building samba35 on Solaris 8 linking "net" fails due to 
unresolved symbols. (same on 2.10)
        libintl_gettext is one of them.
        Libintl has been build before by pkgsrc and is installed in /usr/pkg 
        The problem is the configure script source3/configure.
        It checks for the presense of "libintl.h" and defines HAVE_LIBINTL_H in 
config.h in any case.
        So libintl.h gets included in the sources. There gettext() is redefined 
to libintl_gettext() like
        some other function now.
        Accedently the check for the library is only done in the samba4-merged 
build check stuff.
        There it is found and some variables for the source4 build part are set.
        "-lintl" is never added to the link commands (or the LIBS vairable in 
configure) for source3 linking.
        This is a problem on systems that requires libintl for pkgsrc builds.
        There may be other architectures affected too.
        Try to compile samba35 on Solaris 2.8 (I use sunstudio as main 
compiler, but same happens if ggc is used).
        The configure (and must be fixed in order to check for presence and add it to
        the LIBS variable.
        Accedently I found no easy way to check this only if libintl.h has been 
found before. I found no variable
        in configure that I can test.
        The following patch will add a check for libintl in all cases and if 
found -lintl is added to LIBS.
        With this change samba35 now compiles on Solaris 2.8.
        But this change has a side effect on other builds - e.g. NetBSD builds.
        The is no linked to all binaries, even if not needed. I 
count 11 additional references to
        /usr/lib/ on a 5.0.2 system in the resulting "bin" folder.
        I have no idea how to add the libintl linkage only if libintl.h is 
found and libintl is a requirement
        in the pkgsrc build process. Someone with more experiance in this topic 
should have a look at it.

        Normaly the best way would be to correct and let configure 
to be recreated.
        But this is not possible, because there is a large patch for 
source3/configure in the patches folder
        and the output of autoconf is very version specific. pkgsrc autoconf is 
a newer version as used
        to generate the configure script in samba35. A diff will report nearly 
all of the 100000 lines ...

        So I generate an additional patch for source3/configure - it should be 
integrated into the existing one.
        remark: autoconf is not called by pkgsrc build in any case - as far as 
I figured out.
        The "new" part in configure is simply a copy of the generated code for 
-lintl-check in the samba4-merged

---   2011-03-30 16:52:19.000000000 +0200
+++        2010-10-07 18:41:16.000000000 +0200
@@ -6733,6 +6733,8 @@
+AC_CHECK_LIB_EXT(intl, INTL_LIBS, gettext)

--- configure.orig      2011-03-29 11:11:40.766380000 +0200
+++ configure   2011-03-29 11:10:45.547857000 +0200
@@ -47252,6 +47251,104 @@
+LIBS="-lintl $INTL_LIBS  $LIBS"
+        { $as_echo "$as_me:$LINENO: checking for gettext in -lintl" >&5
+$as_echo_n "checking for gettext in -lintl... " >&6; }
+if test "${ac_cv_lib_ext_intl_gettext+set}" = set; then
+  $as_echo_n "(cached) " >&6
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+char gettext ();
+main ()
+return gettext ();
+  ;
+  return 0;
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_ext_intl_gettext=yes;
+                 ac_cv_lib_ext_intl=yes
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+       ac_cv_lib_ext_intl_gettext=no;
+                 ac_cv_lib_ext_intl=no
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_intl_gettext" >&5
+$as_echo "$ac_cv_lib_ext_intl_gettext" >&6; }
+    if test $ac_cv_lib_ext_intl_gettext = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETTEXT 1
+if test $ac_cv_lib_ext_intl = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINTL 1
+               case "$INTL_LIBS" in
+                   *-lintl*)
+                       ;;
+                   *)
+                       INTL_LIBS="-lintl $INTL_LIBS"
+                       ;;
+               esac



Home | Main Index | Thread Index | Old Index