Bug 13754 - raspberry pi - invalid string offset for section `.strtab' during make
Summary: raspberry pi - invalid string offset for section `.strtab' during make
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.10.2
Hardware: Other Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2019-01-18 09:30 UTC by dariuszb
Modified: 2022-02-11 07:25 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description dariuszb 2019-01-18 09:30:55 UTC
Raspberry Pi 2 running Linux DBRPi01 4.14.93-v7+ #1191 SMP Wed Jan 16 11:53:33 GMT 2019 armv7l GNU/Linux 

As in summary during compilation there are hundreds of errors like below:

/usr/bin/ld: /media/db_tc_1/Varia/Sources/samba-4.10.0rc1/bin/default/lib/param/libserver-role-samba4.so: invalid string offset 731 >= 716 for section `.strtab'
/usr/bin/ld: /media/db_tc_1/Varia/Sources/samba-4.10.0rc1/bin/default/source3/libutil-cmdline-samba4.so: invalid string offset 3862 >= 3380 for section `.strtab'
/usr/bin/ld: /media/db_tc_1/Varia/Sources/samba-4.10.0rc1/bin/default/source3/libutil-cmdline-samba4.so: invalid string offset 4028 >= 3380 for section `.strtab'
/usr/bin/ld: /media/db_tc_1/Varia/Sources/samba-4.10.0rc1/bin/default/source3/libutil-cmdline-samba4.so: invalid string offset 3848 >= 3380 for section `.strtab'
/usr/bin/ld: /media/db_tc_1/Varia/Sources/samba-4.10.0rc1/bin/default/source3/libutil-cmdline-samba4.so: invalid string offset 3863 >= 3380 for section `.strtab'
/usr/bin/ld: /media/db_tc_1/Varia/Sources/samba-4.10.0rc1/bin/default/source3/libutil-cmdline-samba4.so: invalid string offset 3874 >= 3380 for section `.strtab'
/usr/bin/ld: /media/db_tc_1/Varia/Sources/samba-4.10.0rc1/bin/default/libcli/registry/libutil-reg-samba4.so: invalid string offset 866 >= 822 for section `.strtab'
/usr/bin/ld: /media/db_tc_1/Varia/Sources/samba-4.10.0rc1/bin/default/source3/libmessages-util-samba4.so: invalid string offset 662 >= 607 for section `.strtab'
Comment 1 Norbert Hanke 2019-04-02 19:33:26 UTC
The same is true for version 4.10.0 built on Raspberry Pi 3B+ .
Comment 2 dariuszb 2019-04-03 19:36:58 UTC
(In reply to Norbert Hanke from comment #1)
Still the same for me as well. I have tried to reach samba mailing list but no answer. If you find the way to fix it let me know.
Comment 3 dariuszb 2019-04-03 19:55:33 UTC
4.10.1 the same
Comment 4 Louis 2019-04-04 08:09:06 UTC
if you could try this, use higher version of the buildtools. 

Google shows a lot of simular messages, which point to packages listed in the next line here: 
apt install -t stretch-backports devscripts cmake build-essential binutils 

# optional g++-aarch64-linux-gnu gcc-aarch64-linux-gnu

I dont have an arm setup to test this, so please try. 
but upgrading/useing the backported packages (cmake build-essential ) helps with the builds on stretch (amd64/i386) 

and optional run make without -j

Last option, you could try to use my sources and build these on arm.
Comment 5 dariuszb 2019-04-04 10:06:01 UTC
(In reply to Louis from comment #4)
I have tried - still the same.(In reply to Louis from comment #4)

thank you for suggestions. 

I have tried but without success so far but I think this is right direction.

I can't use g++-aarch64-linux-gnu gcc-aarch64-linux-gnu - as raspbian is still 32bits
Comment 6 dariuszb 2019-04-05 09:05:25 UTC
I have tried amd64/i386 platform build on debian Stretch. Clean install without any backports.

The latest Samba 4.10.1 builds without any issues. So there is no problem with mainline buildtools.

It is only something on arm.
Comment 7 Norbert Hanke 2019-06-29 09:39:48 UTC
The problem is not present when building Samba on the rpi3 running Debian Buster preview (64Bit), available from

The problem is still present when trying the same on 2019-06-20-raspbian-buster-lite (32Bit)

--> it's definitely related to the 32Bit rpi armhf/armv7l build chain
Comment 8 Norbert Hanke 2020-03-15 14:15:38 UTC
Problem still existed with Samba 4.11.6
Problem no more exists with Samba 4.12.0
Comment 9 Andrew Bartlett 2020-03-17 17:57:03 UTC
Any chance of a git bisect between these releases to work out what 'fixed' it?

It would be helpful to know what we unintentionally changed, or alternately to confirm that actually, the toolchain changed.
Comment 10 Björn Baumbach 2020-03-17 18:31:49 UTC
(In reply to Andrew Bartlett from comment #9)
Building latest Samba 4.11.7 armhf worked fine on my systems for the last builds. I've added myself on the CC list, because the very last build failed here with the (in this bug handled) error. I'll add more details until I have some results.
Comment 11 Björn Baumbach 2020-03-18 19:08:34 UTC
(In reply to Björn Baumbach from comment #10)
I've just tried the build again with the same parameters - without any changes or modifications on the build system with Samba 4.11.7. The build was successful. I can't reproduce the error anymore.
Comment 12 Norbert Hanke 2020-03-19 17:22:55 UTC
Here the build of 4.11.7 still fails.

First message is
[1450/3994] Linking bin/default/auth/libcommon-auth-samba4.so
/usr/bin/ld: /home/pi/samba-4.11.7/bin/default/source4/lib/messaging/libMESSAGING-SEND-samba4.so: invalid string offset 1071 >= 1071 for section `.strtab'

Last message is
[3950/3994] Linking bin/default/file_server/libservice_module_s3fs.so
/usr/bin/ld: /home/pi/samba-4.11.7/bin/default/source4/smbd/libservice-samba4.so: invalid string offset 4171 >= 4142 for section `.strtab'
/usr/bin/ld: /home/pi/samba-4.11.7/bin/default/source4/auth/libauth-unix-token-samba4.so: invalid string offset 2514 >= 1097 for section `.strtab'
/usr/bin/ld: /home/pi/samba-4.11.7/bin/default/source4/libcli/wbclient/libLIBWBCLIENT-OLD-samba4.so: invalid string offset 2817 >= 1717 for section `.strtab'
/usr/bin/ld: /home/pi/samba-4.11.7/bin/default/source4/lib/messaging/libMESSAGING-SEND-samba4.so: invalid string offset 1071 >= 1071 for section `.strtab'
and many many in between.

In contrast, 4.12.0 builds fine, and so does 4.12.0rc1 .

All above built on the same system
> uname -a
Linux <sysname> 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux
Comment 13 dariuszb 2020-03-29 09:52:47 UTC
I have tried on Raspberry Pi 2B and 3B+ running Raspbian fully updated Stretch and Buster.

./configure --prefix=/opt/samba --with-systemd --systemd-install-services --with-systemddir=/lib/systemd/system --sysconfdir=/etc/samba && make  --jobs=`nproc --all`

With Samba 4.12.0 both builds are successful without "invalid string offset" issue observed earlier. 

I am happy to close this bug unless there are some objections.