Skip to contentSkip to conversation

libselinux -- Do not link against python library, this is considered bad practice in debian

PATCH In review Laurent Bigonville 2 participants 2 messages Mar 26, 2012 – Mar 27, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 libselinux -- Do not link against python library, this is considered bad practice in debian

Hi,

Do not link python module with libpython, the interpreter is already linked against it.

Description: Do not link against python library, this is considered bad practice in debian
Author: Laurent Bigonville <[email protected]>
Date: Wed, 07 Mar 2012 23:33:43 +0100

libselinux/src/Makefile +1 -1
@@ -85,7 +85,7 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
 	$(CC) $(filter-out -Werror, $(CFLAGS)) -I$(RUBYINC) -fPIC -DSHARED -c -o $@ $<
 
 $(SWIGSO): $(SWIGLOBJ)
-	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) $(PYTHONLIBDIR) -Wl,-soname,$@,-z,defs
+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) $(PYTHONLIBDIR)
 
 $(SWIGRUBYSO): $(SWIGRUBYLOBJ)
 	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 3 lines · Laurent Bigonville

Hi,

Do not link python module with libpython, the interpreter is already linked against it.

ah, that reminds me: does the python debian build infrastructure cope
with 2.6, 2.7 etc. etc. producing multiple versions of this c-based module? if not i know of a way to do that, but it uses an earlier version of the debian helper tools, and also needs automake not just autoconf.

for another project i had to write an m4 automake macro which used
python2.{insertversion}-config to record the various includes and library versions etc.

let me know if this is of any use?

l.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.