Skip to contentSkip to conversation

New: samba4 will not build for x86

Buildroot [email protected] 1 participant 10 messages Mar 18, 2024 – Jun 15, 2024

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=16003

            Bug ID: 16003
           Summary: samba4 will not build for x86
           Product: buildroot
           Version: 2024.02
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Target Milestone: ---

On my system (Debian 11 X86_64) i will try to build as cross-compile
the samba4 package.
Setup is near similar to the setup as x86_64 system what is build samba4
without problems.
So when i try to build samba4 i run in the error:
[1659/4058] Compiling source4/lib/socket/connect_multi.c /home/roland/.fbr/fbr-4.0-test_1_2024-x86/buildroot/output/per-package/samba4/host/bin/../lib/gcc/i586-buildroot-linux-uclibc/12.3.0/../../../../i586-buildroot-linux-uclibc/bin/ld:
/home/roland/.fbr/fbr-4.0-test_1_2024-x86/buildroot/output/per-package/samba4/host/i586-buildroot-linux-uclibc/sysroot/usr/lib/uclibc_nonshared.a(ssp-local.os):
in function `__stack_chk_fail_local':
buildroot/build/uclibc-1.0.45/libc/sysdeps/linux/common/ssp-local.c:35:
undefined reference to `__stack_chk_fail'
collect2: error: ld returned 1 exit status

../../lib/krb5_wrap/krb5_samba.c: In function 'smb_krb5_salt_principal_str':
../../lib/krb5_wrap/krb5_samba.c:712:9: warning: 'krb5_free_unparsed_name' is deprecated [-Wdeprecated-declarations]

  712 |         krb5_free_unparsed_name(krb5_ctx, salt_principal_malloc);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../third_party/heimdal/lib/krb5/krb5.h:1019,
                 from ../../lib/replace/system/kerberos.h:33,
                 from ../../lib/krb5_wrap/krb5_samba.h:41,
                 from ../../lib/krb5_wrap/krb5_samba.c:25:
third_party/heimdal/lib/krb5/krb5-protos.h:3774:1: note: declared here
 3774 | krb5_free_unparsed_name (
      | ^~~~~~~~~~~~~~~~~~~~~~~
../../lib/krb5_wrap/krb5_samba.c: In function 'smb_krb5_unparse_name':
../../lib/krb5_wrap/krb5_samba.c:892:17: warning: 'krb5_free_unparsed_name' is
deprecated [-Wdeprecated-declarations]
  892 |                 krb5_free_unparsed_name(context, utf8_name);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
third_party/heimdal/lib/krb5/krb5-protos.h:3774:1: note: declared here
 3774 | krb5_free_unparsed_name (
      | ^~~~~~~~~~~~~~~~~~~~~~~
../../lib/krb5_wrap/krb5_samba.c:895:9: warning: 'krb5_free_unparsed_name' is
deprecated [-Wdeprecated-declarations]
  895 |         krb5_free_unparsed_name(context, utf8_name);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
third_party/heimdal/lib/krb5/krb5-protos.h:3774:1: note: declared here
 3774 | krb5_free_unparsed_name (
      | ^~~~~~~~~~~~~~~~~~~~~~~

Waf: Leaving directory `/home/roland/.fbr/fbr-4.0-test_1_2024-x86/buildroot/output/build/samba4-4.19.5/bin/default' Build failed
-> task in 'cluster' failed with exit status 1 (run with -v to display more
information)

Any suggestion what will not work here?

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

https://bugs.busybox.net/show_bug.cgi?id=16003

--- Comment #1 from Peter Seiderer <[email protected]> ---
Please read '22.6. Reporting issues/bugs or getting help' ([1]) and '8.2. Understanding when a full rebuild is necessary' ([2]), please try to provide and (minimal) .config or defconfig file reproducing your failure on a complete build (e.g. 'make clean && make samba4')...

[1] https://buildroot.org/downloads/manual/manual.html#reporting-bugs
[2] https://buildroot.org/downloads/manual/manual.html#full-rebuild

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=16003

--- Comment #2 from Roland Franke <[email protected]> ---
I work with a Debian 11 (Bullseye) X86_64 host.
There will be the standard-version of GCC, C++, and all other need packages installed.
I will work here with the buildroot 2024.02 Version what is the actually official version. I will be build ing here with uClibc and GCC (Not musl) .I have here a few additional packages installed, but the main packages be complete the identical version as come with the 2024.02 version. Note that i normal work with BR2_PER_PACKAGE_DIRECTORY=y

my .config is stored at: https://pastes.io/wqa8jsvgsg

As soon as i try to activate the samba4 package, i will run in the named fault. It take her no matter, if i try this after an complete clean and build the whole buildroot. It stuck also when i had a full build and activate samba4 after that and try to build this after. It stuck also when i will try to build samba4 alone.

On the same system, i have a second configuration for building for a x86_64 system. Here the samba4 package will be build fine in all conditions. That is the point why i made the request here.
Maybe the actual samba4 will not longer work with a x86 system?

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=16003

--- Comment #3 from Peter Seiderer <[email protected]> --- Sorry, given .config fails with:

Kconfig file or fragment 'package/uclibc/uclibc.config-x86' for 'uclibc' does not exist

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=16003

--- Comment #4 from Roland Franke <[email protected]> --- Created attachment 9730
--> https://bugs.busybox.net/attachment.cgi?id=9730&action=edit
used uclibc.config-x86

Used uclibc.config-x86 of my system

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=16003

--- Comment #5 from Roland Franke <[email protected]> --- (In reply to Roland Franke from comment #4)
I hav add as attachemend the used uclibc.config-x86 from my system

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=16003

--- Comment #6 from Bernd Kuhls <[email protected]> --- Using this defconfig based on Roland's config

BR2_x86_pentium_mmx=y
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_KERNEL_HEADERS_6_1=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_PTHREAD_DEBUG=y
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
BR2_BINUTILS_VERSION_2_40_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_CCACHE=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_SSP_REGULAR=y
BR2_RELRO_PARTIAL=y
BR2_PACKAGE_SAMBA4=y

I could reproduce the build error (Debian 12 x86_64). According to some findings it seems to occur only on x86, reason unknown:
https://avidemux.org/smif/index.php?msg=70245
https://bz.apache.org/ooo/show_bug.cgi?id=127139#c6

Please add this hack in package/samba4/samba4.mk

ifeq ($(BR2_i386)$(BR2_TOOLCHAIN_HAS_SSP),yy)
SAMBA4_LDFLAGS += -lc -Wl,--as-needed
endif

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=16003

--- Comment #7 from Peter Seiderer <[email protected]> --- Can confirm the extra '-lc' fixes the linking problem...

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=16003

--- Comment #8 from Roland Franke <[email protected]> ---
I will also confirm that the build from samba4 with the additional -lc fix the build.

Thank you.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

[Buildroot] [Bug 16003] samba4 will not build for x86

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=16003

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |MOVED

--- Comment #9 from Yann E. MORIN <[email protected]> --- Thank you for your report.

The issue tracker for the Buildroot project has been moved to the Gitlab.com issue tracker:
https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old tracker. If you believe your issue is still relevant, please open one in the new issue tracker.

Thank you!

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot