View Issue Details

IDProjectCategoryView StatusLast Update
0000983SOGoBackend Generalpublic2011-10-04 17:54
ReporterwsourdeauAssigned Tojraby 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionwon't fix 
Summary0000983: packaging: make use of ld's --as-needed to reduce binary dependencies
Description

see title

TagsNo tags attached.

Activities

luca

luca

2011-06-16 09:41

reporter   ~0002588

FYI: In my own spec file for building sogo I have this sanity check copied from the gentoo ebuild:

#

Sanity check from gentoo ebuild

http://bugs.gentoo.org/show_bug.cgi?id=295636

#

SOGo tends to break horribly if gnustep-make is build with LDFLAGS such as

-Wl,--add-needed or -Wl,--as-needed. So we check here some vital binaries.

Check if Appointments.SOGo, Contacts.SOGo, Mailer.SOGo is correctly build/linked

LD_LIBRARY_PATH=./SOPE/NGCards/obj/:./SOPE/GDLContentStore/obj/:./UI/SOGoUI/obj/:./OGoContentStore/obj/:./SoObjects/SOGo/SOGo.framework/Versions/1/
export LD_LIBRARY_PATH
myAppointmentsLDD=$(ldd -d SoObjects/Appointments/Appointments.SOGo/Appointments 2>&1 | grep "lib(OGoContentStore|NG(Cards|ObjWeb|Mime|Streams|Extensions)|SOGo|GDL(Access|ContentStore)|EOControl|DOM|SaxObjC|XmlRpc).so." | wc -l)
myContactsLDD=$(ldd -d SoObjects/Contacts/Contacts.SOGo/Contacts 2>&1 | grep "lib(OGoContentStore|NG(Cards|ObjWeb|Mime|Streams|Extensions)|SOGo|GDL(Access|ContentStore)|EOControl|DOM|SaxObjC|XmlRpc).so." | wc -l)
myMailerLDD=$(ldd -d SoObjects/Mailer/Mailer.SOGo/Mailer 2>&1 | grep "lib(OGoContentStore|NG(Cards|ObjWeb|Mime|Streams|Extensions)|SOGo|GDL(Access|ContentStore)|EOControl|DOM|SaxObjC|XmlRpc).so." | wc -l)
if [ -z "${myAppointmentsLDD}" -o -z "${myContactsLDD}" -o -z "${myMailerLDD}" -o "${myAppointmentsLDD}" != "13" -o "${myContactsLDD}" != "13" -o "${myMailerLDD}" != "13" ]; then
echo
echo "This SOGo installtion has not been built correctly. Probably you are using"
echo "LDFLAGS to build SOGo that are not correctly handled in SOGo or you"
echo "have configured gnustep-base/gnustep-make with LDFLAGS which are"
echo "preventing SOGo to link the needed libraries into it's own binaries."
echo "Please avoid using --as-needed in your LDFLAGS."
echo
echo "SOGo build is not complete (Appointments.SOGo, Contacts.SOGo, Mailer.SOGo)"
exit 100
else
echo "ld check of Appointments.SOGo, Contacts.SOGo, Mailer.SOGo OK"
fi

See also bug 0000982

ludovic

ludovic

2011-10-04 17:54

administrator   ~0002861

We must not do that. It'll break with recent GNUstep's base and bundles.

Issue History

Date Modified Username Field Change
2010-11-16 14:24 wsourdeau New Issue
2011-06-15 21:23 ludovic Status new => assigned
2011-06-15 21:23 ludovic Assigned To => jraby
2011-06-16 09:41 luca Note Added: 0002588
2011-10-04 17:54 ludovic Note Added: 0002861
2011-10-04 17:54 ludovic Status assigned => closed
2011-10-04 17:54 ludovic Resolution open => won't fix