Bug#909396: systemd: FTBFS on hppa and x32 - relocation can not be used when making a shared object

John David Anglin dave.anglin at bell.net
Sun Sep 23 21:27:56 BST 2018


On 2018-09-23 9:27 AM, Michael Biebl wrote:
> Am 23.09.18 um 14:43 schrieb John David Anglin:
>> On 2018-09-23 4:06 AM, Michael Biebl wrote:
>>> Am 23.09.18 um 10:01 schrieb Michael Biebl:
>>>
>>>> There weren't any relevant changes between 239-7 and 239-9 afaics, which
>>>> makes me think that this is rather a toolchain issue on hppa and not a
>>>> bug in systemd itself.
>>>>
>>>> Would be great if you can investigate this.
>>> One obvious difference is that 239-7 was compiled with meson 0.47.1-1,
>>> 239-8 and 239-9 with 0.47.2-1
>> Okay.  I don't know anything about systemd build and where one would
>> modify link options.
>> I can try if you can suggest a possible location for change.
>>
>> It might be the "-flto" option would change things.  It causes various
>> compilations to occur
>> which might cause error linking.
> My point is, that the systemd build system did not change between 239-7
> and 239-8. So I suspect the root cause is elsewhere and not in systemd
> directly.
Well the problem was latent in 239-7 and probably gcc changed.  The 
thing is the error points
to an error in the link command.  On hppa, it is almost always necessary 
to link shared and pie
objects with -fPIC or -fPIE, respectively.  There are compilations in 
the link process and
the generated objects need to be position independent when doing shared 
and pie links.

The attached patch fixes the failing link command although I'm not sure 
it's optimal as
generally -fPIE and -pie need to be specified together.  Meson appears 
to test the options
separately.  Putting them together as one option doesn't work.  The 
systemd build completes
with the patch.  There was one timeout in the testsuite but the system 
was under high load.

Dave

-- 
John David Anglin  dave.anglin at bell.net

-------------- next part --------------
--- meson.build.save	2018-09-23 14:27:45.765707025 -0400
+++ meson.build	2018-09-23 14:40:20.002886449 -0400
@@ -341,7 +341,7 @@
 # enable it when we are linking against them
 if not fuzzer_build
         possible_cc_flags += '-fPIE'
-        possible_link_flags += '-pie'
+        possible_link_flags += [ '-fPIE', '-pie', ]
 endif
 
 if cc.get_id() == 'clang'


More information about the Pkg-systemd-maintainers mailing list