From paddy at panici.net Mon Mar 20 08:42:05 2006 From: paddy at panici.net (paddy) Date: Mon, 20 Mar 2006 13:42:05 +0000 Subject: [Pymilter] Building pymilter on debian sarge ? Message-ID: <20060320134200.GA20886@cobalt0.panici.net> Hi, I'm having a go at building milter-0.8.5 on debian sarge I get as far as # python setup.py build running build running build_py running build_ext building 'milter' extension gcc -pthread -shared build/temp.linux-i686-2.3/miltermodule.o -lmilter -lsmutil -o build/lib.linux-i686-2.3/milter.so /usr/bin/ld: cannot find -lsmutil collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 I have a libmilter.so but only libsmutil.a Am I correct in thinking I need libsmutil.so ? Regards, Paddy -- Perl 6 will give you the big knob. -- Larry Wall From stuart at bmsi.com Tue Mar 21 10:37:48 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Tue, 21 Mar 2006 10:37:48 -0500 (EST) Subject: [Pymilter] Building pymilter on debian sarge ? In-Reply-To: <20060320134200.GA20886@cobalt0.panici.net> Message-ID: On Mon, 20 Mar 2006, paddy wrote: > I get as far as > > # python setup.py build > running build > running build_py > running build_ext > building 'milter' extension > gcc -pthread -shared build/temp.linux-i686-2.3/miltermodule.o -lmilter -lsmutil -o build/lib.linux-i686-2.3/milter.so > /usr/bin/ld: cannot find -lsmutil > collect2: ld returned 1 exit status > error: command 'gcc' failed with exit status 1 > > I have a libmilter.so but only libsmutil.a > > Am I correct in thinking I need libsmutil.so ? The name of the sendmail library varies with distro for some reason. Try renaming "smutil" to "sm" in setup.py. Any suggestions on how to make this change automatically are welcome (perhaps a big table in setup.py). -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at bmsi.com Tue Mar 21 10:43:21 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Tue, 21 Mar 2006 10:43:21 -0500 (EST) Subject: [Pymilter] Building pymilter on debian sarge ? In-Reply-To: Message-ID: On Tue, 21 Mar 2006, Stuart D. Gathman wrote: > The name of the sendmail library varies with distro for some reason. Try > renaming "smutil" to "sm" in setup.py. Any suggestions on how to make this > change automatically are welcome (perhaps a big table in setup.py). Hmm. Could test which library exists - and distutils might have a portable way to test whether it exports certain symbols as well when they both exist. Does distutils have a way to test for a library taking into account LIBPATH and naming conventions (e.g. .so vs. .a)? -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at bmsi.com Tue Mar 21 10:53:37 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Tue, 21 Mar 2006 10:53:37 -0500 (EST) Subject: [Pymilter] Building pymilter on debian sarge ? In-Reply-To: Message-ID: On Tue, 21 Mar 2006, Stuart D. Gathman wrote: > > I have a libmilter.so but only libsmutil.a > > > > Am I correct in thinking I need libsmutil.so ? > > The name of the sendmail library varies with distro for some reason. Try > renaming "smutil" to "sm" in setup.py. Any suggestions on how to make this > change automatically are welcome (perhaps a big table in setup.py). I recently compiled milter-0.8.5 on a slackware system. On that system, I had to remove "smutil" entirely from libs in setup.py. I think that the necessary routines from smutil get incorporated into libmilter on some systems. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From paddy at panici.net Tue Mar 21 11:15:19 2006 From: paddy at panici.net (paddy) Date: Tue, 21 Mar 2006 16:15:19 +0000 Subject: [Pymilter] Building pymilter on debian sarge ? In-Reply-To: References: Message-ID: <20060321161456.GA13333@cobalt0.panici.net> On Tue, Mar 21, 2006 at 10:53:37AM -0500, Stuart D. Gathman wrote: > On Tue, 21 Mar 2006, Stuart D. Gathman wrote: > > > > I have a libmilter.so but only libsmutil.a > > > > > > Am I correct in thinking I need libsmutil.so ? > > > > The name of the sendmail library varies with distro for some reason. Try > > renaming "smutil" to "sm" in setup.py. Any suggestions on how to make this > > change automatically are welcome (perhaps a big table in setup.py). > > I recently compiled milter-0.8.5 on a slackware system. On that system, > I had to remove "smutil" entirely from libs in setup.py. I think that > the necessary routines from smutil get incorporated into libmilter on > some systems. ok, that would seem to be the case on Debian Sarge also. # python setup.py build running build running build_py running build_ext building 'milter' extension gcc -pthread -shared build/temp.linux-i686-2.3/miltermodule.o -lmilter -o build/lib.linux-i686-2.3/milter.so Somehow I was expecting it to do more than that ?! :-) Anyway I can have a proper look when I have some time, many thanks. What you said about symbols might be the answer, sort of like the usual automake/autoconf find out by trying approach. It's not hard to imagine version numbers being a dead end with the way distros treat them. Is the move purely a distro mod and not in the upstream source at some point ?? Regards, Paddy -- Perl 6 will give you the big knob. -- Larry Wall From stuart at bmsi.com Wed Mar 29 14:28:22 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Wed, 29 Mar 2006 14:28:22 -0500 (EST) Subject: [Pymilter] Building pymilter on debian sarge ? In-Reply-To: <20060321161456.GA13333@cobalt0.panici.net> Message-ID: On Tue, 21 Mar 2006, paddy wrote: > What you said about symbols might be the answer, sort of like the usual > automake/autoconf find out by trying approach. It's not hard to imagine > version numbers being a dead end with the way distros treat them. Is the > move purely a distro mod and not in the upstream source at some point ?? It is purely a distro choice. The same symbols are used by libmilter on all distros, but sendmail provides *both* a libsm and libsmutil. Each distro resolves those libraries with some combination of static and dynamic when building libmilter. There are 4 combinations - I've encountered three. Perhaps I should start out with both sm and smutil in setup.py, with a comment to try removing one or both. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.