You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/06/14 00:57:53 UTC
[Bug 5515] New: libsslspamc.so & libsslspamc.so can not build without -fPIC
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
Summary: libsslspamc.so & libsslspamc.so can not build without -
fPIC
Product: Spamassassin
Version: 3.2.1
Platform: Other
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P5
Component: Building & Packaging
AssignedTo: dev@spamassassin.apache.org
ReportedBy: Mark.Martinec@ijs.si
Compiling for shareable libraries must produce position-independent
code (PIC) for a shareable library to build and work properly.
gcc compiler needs option -fPIC to request it to produce a PIC code.
On 32-bit Intel processors with OS in 32-bit mode one may get away
by forgetting the -fPIC, resulting .so just happens to work.
On 64-bit Intel platforms (like on a FreeBSD built in 64-bit mode)
and on other architectures one can not get away so easily,
so -fPIC should be specified every time that objects for a
shareable library are produced, regardless of platform and OS.
The attached patch adds -fPIC option to spamc/Makefile.in
when libsslspamc.so and libsslspamc.so are to be built,
avoiding ugly hacks that packagers would otherwise need
to apply.
Note that the issue is not specific to FreeBSD nor to AMD,
it is just that it was discovered there when building
for 64-bit Intel or 64-bit AMD platforms.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] [review] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
------- Additional Comments From jm@jmason.org 2007-06-15 08:36 -------
applied to trunk:
: jm 299...; svn commit -m "bug 5515: libsslspamc.so & libsslspamc.so can not build
without -fPIC, but we were picking up the wrong CFLAGS to do this. fix"
spamc/configure* spamc/Makefile.in
Sending spamc/Makefile.in
Sending spamc/configure
Sending spamc/configure.in
Transmitting file data ...
Committed revision 547714.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] [review] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From jm@jmason.org 2007-06-18 09:29 -------
applied for 3.2.2:
: jm 164...; svn commit -m "bug 5515: libsslspamc.so & libsslspamc.so can not
build without -fPIC, but we were picking up the wrong CFLAGS to do this. fix"
spamc/configure spamc/Makefile.in spamc/configure.in
Sending spamc/Makefile.in
Sending spamc/configure
Sending spamc/configure.in
Transmitting file data ...
Committed revision 548399.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] [review] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P5 |P3
Summary|libsslspamc.so & |[review] libsslspamc.so &
|libsslspamc.so can not build|libsslspamc.so can not build
|without -fPIC |without -fPIC
Status Whiteboard| |needs 2 votes
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
spamassassin@dostech.ca changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Undefined |3.2.2
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
------- Additional Comments From Mark.Martinec@ijs.si 2007-06-14 03:40 -------
> -Wl,-E will be irrelevant to us; we indeed want -fPIC.
> So we should be using cccdlflags instead of ccdlflags.
Thanks for checking! I just came across the cccdlflags too.
> Could you check your platforms and run the second perl commandline,
> and verify that it creates the right -fPIC-equivalent for that platform?
> if it does, we need to fix the configure.in to use that.
Looks good:
$ perl -le 'use Config; print $Config::Config{ccdlflags}'
-Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE
$ perl -le 'use Config; print $Config::Config{cccdlflags}'
-DPIC -fPIC
$ uname -a
FreeBSD xxx 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5... amd64
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] [review] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
spamassassin@dostech.ca changed:
What |Removed |Added
----------------------------------------------------------------------------
Status Whiteboard|needs 1 vote |go
------- Additional Comments From spamassassin@dostech.ca 2007-06-17 20:11 -------
+1
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #3987 is|0 |1
obsolete| |
------- Additional Comments From jm@jmason.org 2007-06-15 05:51 -------
Created an attachment (id=3992)
--> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3992&action=view)
fix using cccdlflags
ok, here's a patch that uses cccdlflags instead of ccdlflags; please vote...
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
------- Additional Comments From Mark.Martinec@ijs.si 2007-06-13 15:59 -------
Created an attachment (id=3987)
--> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3987&action=view)
the promised patch
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] [review] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
sidney@sidney.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status Whiteboard|needs 2 votes |needs 1 vote
------- Additional Comments From sidney@sidney.com 2007-06-15 08:42 -------
+1
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5515] libsslspamc.so & libsslspamc.so can not build without -fPIC
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515
------- Additional Comments From jm@jmason.org 2007-06-14 03:19 -------
actually, perl is supposed to take care of this.
the "DL" part of "CCDLFLAGS" in that Makefile.in refers to dynamic loading, ie.
the -fPIC, -pic, or equivalent flag for the platform. In turn,
spamc/configure.in takes this from the perl config like so:
# we cheat, since we *know* we have Perl installed ;)
CCDLFLAGS=`perl -e 'use Config; print $Config::Config{ccdlflags}'`
LDDLFLAGS=`perl -e 'use Config; print $Config::Config{lddlflags}'`
from perldoc Config:
"ccdlflags"
From dlsrc.U:
This variable contains any special flags that might need to be passed
to cc to link with a shared library for dynamic loading. It is up to
the makefile to use it. For sunos 4.1, it should be empty.
oops. I've just realised, we're using the wrong one. that's for people linking
against dyn libs; we want cccdlflags:
"cccdlflags"
From dlsrc.U:
This variable contains any special flags that might need to be passed
with "cc -c" to compile modules to be used to create a shared library
that will be used for dynamic loading. For hpux, this should be +z.
It is up to the makefile to use it.
on my x86 linux:
perl -e 'use Config; print $Config::Config{ccdlflags}'
-Wl,-E
perl -e 'use Config; print $Config::Config{cccdlflags}'
-fPIC
-Wl,-E will be irrelevant to us; we indeed want -fPIC. So we should be using
cccdlflags instead of ccdlflags.
Could you check your platforms and run the second perl commandline, and verify
that it creates the right -fPIC-equivalent for that platform? if it does, we
need to fix the configure.in to use that.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.