As part of #83, it was found that there is some issue with compiling samba on i.MX28 platforms. I think it is not specific to i.MX28, but rather it is the only CPU we have in our LTS program without hard floating point.
The error looks like:
[1451/4125] Compiling lib/param/loadparm.c
/work/out/ts7670_extra_packages/host/lib/gcc/arm-buildroot-linux-gnueabi/13.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: third_party/heimdal/lib/krb5/krcache.c.55.o: in function `krcc_get_principal':
krcache.c:(.text+0xb1c): undefined reference to `__atomic_load_8'
/work/out/ts7670_extra_packages/host/lib/gcc/arm-buildroot-linux-gnueabi/13.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: krcache.c:(.text+0xb34): undefined reference to `__atomic_store_8'
/work/out/ts7670_extra_packages/host/lib/gcc/arm-buildroot-linux-gnueabi/13.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: third_party/heimdal/lib/krb5/krcache.c.55.o: in function `krcc_remove_cred':
krcache.c:(.text+0x1678): undefined reference to `__atomic_load_8'
/work/out/ts7670_extra_packages/host/lib/gcc/arm-buildroot-linux-gnueabi/13.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: krcache.c:(.text+0x1694): undefined reference to `__atomic_store_8'
/work/out/ts7670_extra_packages/host/lib/gcc/arm-buildroot-linux-gnueabi/13.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: third_party/heimdal/lib/krb5/krcache.c.55.o: in function `initialize_internal.isra.0':
krcache.c:(.text+0x20c0): undefined reference to `__atomic_load_8'
/work/out/ts7670_extra_packages/host/lib/gcc/arm-buildroot-linux-gnueabi/13.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: krcache.c:(.text+0x20d8): undefined reference to `__atomic_store_8'
/work/out/ts7670_extra_packages/host/lib/gcc/arm-buildroot-linux-gnueabi/13.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: krcache.c:(.text+0x2294): undefined reference to `__atomic_load_8'
/work/out/ts7670_extra_packages/host/lib/gcc/arm-buildroot-linux-gnueabi/13.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: krcache.c:(.text+0x22ac): undefined reference to `__atomic_store_8'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/work/out/ts7670_extra_packages/build/samba4-4.21.3/bin/default'
Build failed
-> task in 'krb5' failed with exit status 1 (run with -v to display more information)
make[2]: *** [Makefile:7: all] Error 1
make[2]: Leaving directory '/work/out/ts7670_extra_packages/build/samba4-4.21.3'
make[1]: *** [package/pkg-generic.mk:273: /work/out/ts7670_extra_packages/build/samba4-4.21.3/.stamp_built] Error 2
Adding libatomic to samba build options seems to help:
diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk
index 70200279a4..53f17e2d73 100644
--- a/package/samba4/samba4.mk
+++ b/package/samba4/samba4.mk
@@ -24,7 +24,7 @@ SAMBA4_DEPENDENCIES = \
$(if $(BR2_PACKAGE_READLINE),readline) \
$(TARGET_NLS_DEPENDENCIES)
SAMBA4_CFLAGS = $(TARGET_CFLAGS)
-SAMBA4_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
+SAMBA4_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS) -latomic
SAMBA4_CONF_ENV = \
CFLAGS="$(SAMBA4_CFLAGS)" \
LDFLAGS="$(SAMBA4_LDFLAGS)" \
I'm unsure on the best path to resolve this at this time.
As part of #83, it was found that there is some issue with compiling samba on i.MX28 platforms. I think it is not specific to i.MX28, but rather it is the only CPU we have in our LTS program without hard floating point.
The error looks like:
Adding libatomic to samba build options seems to help:
I'm unsure on the best path to resolve this at this time.