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

Re: FTBFS: how to test fixes



On 09/06/2016 11:57 AM, Jakub Wilk wrote:
> * Christian Seiler <christian@iwakd.de>, 2016-09-05, 20:33:
>> Also note that there are plans to make init non-Essential in the future,
> 
> The future is now! init is non-essential already. You can remove it
> from your unstable chroot if you want to.

Oh cool, didn't know that was already done. Then this just
means that the buildd chroots for most archs (except apparently
hppa) were only upgraded but never rebuilt from scratch - so
the fact that the package builds at all at the moment is an
artifact of how buildd chroots are maintained. ;-)

>> MIPS (at least 32bit) doesn't support 64bit atomic operations
>> intrinsically (_8 == 8 bytes) - and your software uses
>> std::atomic<uint64_t> (found that by grepping).
>>
>> However, gcc provides an emulation library called libatomic. You
>> should link against that emulation library if present in order to
>> use those intrinsics.
> 
> You shouldn't need to care about this. This should be the compiler's
> job.

You're right, I agree. I'll file a bug against gcc later.

>> This might result in a spurious dependency on libatomic on other
>> platforms, but unfortunately I don't know of any way to properly
>> pass --as-needed for just this library without libtool reordering
>> the entire list of linker flags. :-(
> 
> Not tested against libtool, but this should do the trick:
> 
> -Wl,--push-state,--as-needed,-latomic,--pop-state
> 
> (Since this is just one g++ argument, libtool doesn't have room to
> reorder much.)

Hrmpf, my try yesterday was

  -Wl,--push-state,--as-needed -latomic -Wl,--pop-state

I didn't think about adding -latomic to the linker flag list
directly via -Wl. I just tested your suggestion and it's really
funny; libtool does mangle your line and separate it into:

 -Wl,--push-state -Wl,--as-needed -Wl,-latomic -Wl,--pop-state

but since there's no direct -l argument, it actually does work
and the things are kept together and in order.

@Muri: use this line in the patch instead:
AC_CHECK_LIB([atomic], [__atomic_add_fetch_8], [atomic_LIBS="-Wl,--push-state,--as-needed,-latomic,--pop-state"], [atomic_LIBS=""]) 

That way, the libatomic dependency will only be picked up on
platforms where it's necessary.

Regards,
Christian


Reply to: