RE: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-05 Thread Nick Harring
> 
> this is a little off the main topic, but i was wondering ..
> 
> 
> what does the -fPIC do? what causes this "issue" ? good buddy of mine
> wrote & updates a QMAIL Install script ... does it all for you,
> including courier-IMAP or Bincc ... and he was wondering whether or
not
> he shoudl include the -fPIC command when his script compiles vpopmail
-
> whether this command will bomb & cause errors on 32bit systems.
> 
>From the gcc manpage:
-fPIC
If supported for the target machine, emit position-independent code,
suitable for dynamic linking and avoiding any limit on the size
of the global offset table.  This option makes a difference on the m68k,
m88k, and the SPARC.

Position-independent code requires special support, and therefore works
only on certain machines.

Essentially what this does is make libraries relocatable, the difference
between -fpic and -fPIC being the size of the global offset table (and
this difference is only on some archs). You may want to try with -fpic
instead, since you're not using one of the arches specifically
mentioned. 

Since vpopmail doesn't generate dynamic libraries this shouldn't really
be making any difference. Doing it on 32bit won't cause any problems, as
it has nothing to do with word size.

Also, you'll want to be on the latest stable gcc release you can get
your hands on, as the x86-64 target has been evolving fairly rapidly
from what I can see with a little quick googling. 

Hope that helps,
Nick 


Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-05 Thread Martin Kos
hi marco
i will most def. try that tonight. however i can only test on the 
production machine, as all my other test machines are 32bit Intels.

I will let you know most def. ... should be another 2 hours or so 
till i can take it down again.
the last time i tried to install courier-authlib and vpopmail on a amd64
was in january (the mail you've found in the archive). i've tried it
again some minutes ago on my production machine (as you can try more or
less without disturbing the normal users) and i've run again in the same
problems:
1. compiled vpopmail with -fPIC
2. compiled courier-authlib with -fPIC
the compilation of both of them worked just fine
3. started the installed authdaemon...
already at the beginning i get the following:
12:30:54 pluto authdaemond: Installing libauthvchkpw
12:30:54 pluto authdaemond:
/usr/local/libexec/courier-authlib/authdaemond: Symbol `read' causes
overflow in R_X86_64_PC32 relocation
12:30:54 pluto authdaemond:
/usr/local/libexec/courier-authlib/authdaemond: Symbol
`__errno_location' causes overflow in R_X86_64_PC32 relocation
12:30:54 pluto authdaemond:
/usr/local/libexec/courier-authlib/authdaemond: Symbol
`__errno_location' causes overflow in R_X86_64_PC32 relocation
12:30:54 pluto authdaemond: Installation complete: authvchkpw
if i try then to login with e.g. sqwebmail (5.0.1 compiled with -fPIC
too) the authdaemon segfaults:
12:30:54 pluto kernel: authdaemond[966]: segfault at 2aab004016b0
rip 2aab004016b0 rsp 7fffcde8 error 14
i have no idea if this would be a problem of authdaemon or of the
vpopmail libraries that the daemon uses? :-(
up to now i haven't heard of anybody that has had success with
courier-authlib & vpopmail on a amd64 architecture :-((
regards
 KoS


Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Marco Prechel
Jeremy,

I did compile vpopmail the way you suggested ... and now i'm getting another 
error - different but same nature.




--


Compiling authvchkpw.c
authvchkpw.c: In function `auth_vchkpw_changepass':
authvchkpw.c:142: warning: passing arg 1 of `parse_email' discards qualifiers 
from pointer target type
Compiling authvchkpwlib.c
Compiling preauthvchkpw.c
preauthvchkpw.c: In function `auth_vchkpw_pre':
preauthvchkpw.c:67: warning: passing arg 1 of `parse_email' discards qualifiers 
from pointer target type
preauthvchkpw.c:141: warning: passing arg 3 of `vset_lastauth' discards 
qualifiers from pointer target type
Linking libauthvchkpw.la
/usr/bin/ld: /home/vpopmail/lib/libvpopmail.a(cdb_seek.o): relocation 
R_X86_64_PC32 against `read@@GLIBC_2.2.5' can not be used when making a shared 
object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libauthvchkpw.la] Error 1
make[2]: Leaving directory `/downloads/qmailrocks/courier-authlib-0.55'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/downloads/qmailrocks/courier-authlib-0.55'
make: *** [all] Error 2
[EMAIL PROTECTED] courier-authlib-0.55]#

-






On Monday, April 04, 2005, at 06:26PM, Jeremy Kitchen <[EMAIL PROTECTED]> wrote:

>On Monday 04 April 2005 04:48 pm, Marco Prechel wrote:
>> Jeremy,
>>
>> are you saying that one will have to run
>>
>> CFLAGS=-fPIC BEFORE the ./configure
>>
>> like Nick stated? so in essence i would run my configure as followed:
>>
>>
>> #CFLAGS=-fPIC  ./configure --enable-roaming-users=y --enable-logging=p
>> --enable-qmaildir=/var/qmail
>
>yep, that's how you would do it.  You could also do something like (assuming 
>bash):
>
># export CFLAGS="-fPIC"
># ./configure .
>
>but that would also affect all subsequent builds within that session.
>
>One thing I like to do, is create (outside of the source tree) files called 
>say... ./configure-sqwebmail, ./configure-vpopmail, etc.. that contain my 
>configure command lines.  For instance, here's my ./configure-apache
>
>#!/bin/sh
>
>exec ./configure --with-so --enable-rewrite --enable-suexec \
>--with-suexec-caller=nobody --with-suexec-docroot=/home/www --enable-ssl \
>--enable-proxy --enable-dav --enable-dav-fs
>
>you could easily do something like:
>
>#!/bin/sh
>
>exec CFLAGS=-fPIC ./configure ..
>
>> I apologize in advance, I'm learning.
>
>no need for apologies, everyone is new at some point :)
>
>-Jeremy
>
>-- 
>Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc.
>[EMAIL PROTECTED] ++ inter7.com ++ 866.528.3530 ++ 815.776.9465 int'l
>  kitchen @ #qmail #gentoo on EFnet IRC ++ scriptkitchen.com/qmail
> GnuPG Key ID: 481BF7E2 ++ jabber:[EMAIL PROTECTED]
>
>


Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Marco Prechel
Jeremy,
this is a little off the main topic, but i was wondering ..
what does the -fPIC do? what causes this "issue" ? good buddy of mine 
wrote & updates a QMAIL Install script ... does it all for you, 
including courier-IMAP or Bincc ... and he was wondering whether or not 
he shoudl include the -fPIC command when his script compiles vpopmail - 
whether this command will bomb & cause errors on 32bit systems.

I will take the production server down in a little, and try to install 
vpopmail with fpic the way you suggested.

Thanks again,
--marco
On Apr 4, 2005, at 6:26 PM, Jeremy Kitchen wrote:
On Monday 04 April 2005 04:48 pm, Marco Prechel wrote:
Jeremy,
are you saying that one will have to run
CFLAGS=-fPIC BEFORE the ./configure
like Nick stated? so in essence i would run my configure as followed:
#CFLAGS=-fPIC  ./configure --enable-roaming-users=y --enable-logging=p
--enable-qmaildir=/var/qmail
yep, that's how you would do it.  You could also do something like 
(assuming
bash):

# export CFLAGS="-fPIC"
# ./configure .
but that would also affect all subsequent builds within that session.
One thing I like to do, is create (outside of the source tree) files 
called
say... ./configure-sqwebmail, ./configure-vpopmail, etc.. that contain 
my
configure command lines.  For instance, here's my ./configure-apache

#!/bin/sh
exec ./configure --with-so --enable-rewrite --enable-suexec \
--with-suexec-caller=nobody --with-suexec-docroot=/home/www 
--enable-ssl \
--enable-proxy --enable-dav --enable-dav-fs

you could easily do something like:
#!/bin/sh
exec CFLAGS=-fPIC ./configure ..
I apologize in advance, I'm learning.
no need for apologies, everyone is new at some point :)
-Jeremy
--
Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet 
Technologies, Inc.
[EMAIL PROTECTED] ++ inter7.com ++ 866.528.3530 ++ 815.776.9465 
int'l
  kitchen @ #qmail #gentoo on EFnet IRC ++ scriptkitchen.com/qmail
 GnuPG Key ID: 481BF7E2 ++ jabber:[EMAIL PROTECTED]



Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Jeremy Kitchen
On Monday 04 April 2005 04:48 pm, Marco Prechel wrote:
> Jeremy,
>
> are you saying that one will have to run
>
> CFLAGS=-fPIC BEFORE the ./configure
>
> like Nick stated? so in essence i would run my configure as followed:
>
>
> #CFLAGS=-fPIC  ./configure --enable-roaming-users=y --enable-logging=p
> --enable-qmaildir=/var/qmail

yep, that's how you would do it.  You could also do something like (assuming 
bash):

# export CFLAGS="-fPIC"
# ./configure .

but that would also affect all subsequent builds within that session.

One thing I like to do, is create (outside of the source tree) files called 
say... ./configure-sqwebmail, ./configure-vpopmail, etc.. that contain my 
configure command lines.  For instance, here's my ./configure-apache

#!/bin/sh

exec ./configure --with-so --enable-rewrite --enable-suexec \
--with-suexec-caller=nobody --with-suexec-docroot=/home/www --enable-ssl \
--enable-proxy --enable-dav --enable-dav-fs

you could easily do something like:

#!/bin/sh

exec CFLAGS=-fPIC ./configure ..

> I apologize in advance, I'm learning.

no need for apologies, everyone is new at some point :)

-Jeremy

-- 
Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc.
[EMAIL PROTECTED] ++ inter7.com ++ 866.528.3530 ++ 815.776.9465 int'l
  kitchen @ #qmail #gentoo on EFnet IRC ++ scriptkitchen.com/qmail
 GnuPG Key ID: 481BF7E2 ++ jabber:[EMAIL PROTECTED]


pgp1Djpyk37fJ.pgp
Description: PGP signature


Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Marco Prechel
Jeremy,

are you saying that one will have to run

CFLAGS=-fPIC BEFORE the ./configure 

like Nick stated? so in essence i would run my configure as followed:


#CFLAGS=-fPIC  ./configure --enable-roaming-users=y --enable-logging=p --enable-qmaildir=/var/qmail


I apologize in advance, I'm learning.


Thank You,

--marco




On Apr 4, 2005, at 5:25 PM, Jeremy Kitchen wrote:

On Monday 04 April 2005 04:08 pm, Marco Prechel wrote:
any idea how to use it then?

if you run a

#./configure --help

it lists this on the bottom:

---
Some influential environment variables:

[snip]

so would you not use it within the ./configure "flags" ?   thats what i
was thinking ... however that was my best guess 

no, if you read the first line of the section you pasted it says "influential 
environment variables"

-Jeremy

-- 
Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc.
[EMAIL PROTECTED] ++ inter7.com ++ 866.528.3530 ++ 815.776.9465 int'l
kitchen @ #qmail #gentoo on EFnet IRC ++ scriptkitchen.com/qmail
GnuPG Key ID: 481BF7E2 ++ jabber:[EMAIL PROTECTED]


Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Jeremy Kitchen
On Monday 04 April 2005 04:08 pm, Marco Prechel wrote:
> any idea how to use it then?
>
> if you run a
>
> #./configure --help
>
> it lists this on the bottom:
>
> ---
> Some influential environment variables:

[snip]

> so would you not use it within the ./configure "flags" ?   thats what i
> was thinking ... however that was my best guess 

no, if you read the first line of the section you pasted it says "influential 
environment variables"

-Jeremy

-- 
Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc.
[EMAIL PROTECTED] ++ inter7.com ++ 866.528.3530 ++ 815.776.9465 int'l
  kitchen @ #qmail #gentoo on EFnet IRC ++ scriptkitchen.com/qmail
 GnuPG Key ID: 481BF7E2 ++ jabber:[EMAIL PROTECTED]


pgpwfGgk6My8w.pgp
Description: PGP signature


Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Marco Prechel
i will most def. try that tonight. however i can only test on the 
production machine, as all my other test machines are 32bit Intels.

I will let you know most def. ... should be another 2 hours or so till 
i can take it down again.

--marco
ANYBODY ELSE HAVE ANY IDEAS/SOLUTIONS?
On Apr 4, 2005, at 5:12 PM, Nick Harring wrote:
any idea how to use it then?

so would you not use it within the ./configure "flags" ?   thats what
i
was thinking ... however that was my best guess 
--marco

Marco -
Run it the way I showed. You put CFLAGS=-fPIC BEFORE the ./configure.
This makes it an environment variable. You can find more out about
environment variables in man bash, ksh, or whatever shell you use.
Hope that helps,
Nick



RE: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Nick Harring
> 
> any idea how to use it then?
> 

> 
> so would you not use it within the ./configure "flags" ?   thats what
i
> was thinking ... however that was my best guess 
> 
> 
> --marco
> 
> 
> 
Marco -
Run it the way I showed. You put CFLAGS=-fPIC BEFORE the ./configure.
This makes it an environment variable. You can find more out about
environment variables in man bash, ksh, or whatever shell you use.
Hope that helps,
Nick


Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Marco Prechel
any idea how to use it then?
if you run a
#./configure --help
it lists this on the bottom:
---
Some influential environment variables:
  CC  C compiler command
  CFLAGS  C compiler flags
  LDFLAGS linker flags, e.g. -L if you have libraries in a 
nonstandard directory 
  CPPFLAGSC/C++ preprocessor flags, e.g. -I if you 
have headers in a nonstandard directory 
  CPP C preprocessor

Use these variables to override the choices made by `configure' or to 
help
it to find libraries and programs with nonstandard names/locations.
---

so would you not use it within the ./configure "flags" ?   thats what i 
was thinking ... however that was my best guess 

--marco

On Apr 4, 2005, at 5:01 PM, Nick Harring wrote:

I'm trying to bring up courier-imap, which requires courier-authlib,
however i am unable to compile courier-authlib. >it complains about
vpopmail. says i should recompile it with -fPIC.
my configure flags are as followed:
for vpopmail:
./configure CFLAGS=-fPIC --enable-roaming-users=y --enable-logging=p
--enable-qmaildir=/var/qmail
for courier-authlib:
./configure CFLAGS=-fPIC --prefix=/usr/local --exec-prefix=/usr/local
--with-authvchkpw --without-authldap --without->authmysql
--disable-root-check --with-ssl
--with-authchangepwdir=/usr/local/libexec/authlib --with-redhat
The way to do this is:
CFLAGS=-fPIC ./configure --enable-roaming-users=y --enable-logging=p
--enable-qmaildir=/var/qmail
CFLAGS is an environment variable, not an argument to configure.
Hope that helps,
Nick



RE: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Nick Harring

>I'm trying to bring up courier-imap, which requires courier-authlib,
however i am unable to compile courier-authlib. >it complains about
vpopmail. says i should recompile it with -fPIC. 
>my configure flags are as followed: 
>for vpopmail: 
>./configure CFLAGS=-fPIC --enable-roaming-users=y --enable-logging=p
--enable-qmaildir=/var/qmail 
>
>for courier-authlib: 
>./configure CFLAGS=-fPIC --prefix=/usr/local --exec-prefix=/usr/local
--with-authvchkpw --without-authldap --without->authmysql
--disable-root-check --with-ssl
--with-authchangepwdir=/usr/local/libexec/authlib --with-redhat 
The way to do this is:
CFLAGS=-fPIC ./configure --enable-roaming-users=y --enable-logging=p
--enable-qmaildir=/var/qmail

CFLAGS is an environment variable, not an argument to configure.
Hope that helps,
Nick


Re: [vchkpw] compile "vpopmail" with -fPIC on x86_64

2005-04-04 Thread Marco Prechel
Sorry if i forgot to mention ... 

this is a

Dual Opteron (AMD64 - x86_64)
w/ FC3


--marco

Marco Prechel
Storm Ready Builders, LLC
www.StormReadyBuilders.com

12651 McGregor Blvd.
Suite 1-101
Fort Myers, FL  33919

P.  239.481.0177
C.  239.410.2983
F.  239.481.4844


-
Note:  The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material.  Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited.  The recipient should check this email and
any attachments for the presence of viruses.  Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer.  This e-mail is and any
response to it will be unencrypted and, therefore, potentially insecure.
Thank you.

On Apr 4, 2005, at 4:57 PM, Marco Prechel wrote:

Hello all :)

I'm trying to bring up courier-imap, which requires courier-authlib, however i am unable to compile courier-authlib. it complains about vpopmail. says i should recompile it with -fPIC.



 my configure flags are as followed: 
 for vpopmail: 
 ./configure CFLAGS=-fPIC --enable-roaming-users=y --enable-logging=p --enable-qmaildir=/var/qmail

 for courier-authlib: 
 ./configure CFLAGS=-fPIC --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat


 I am going by the qmailrocks.org latest distro package. 
 vpopmail-5.4.9 
 courier-authlib-0.55 

 The following is the error message i receive from courier-authlib when i try to MAKE 
 --- 
 /usr/bin/ld: /home/vpopmail/lib/libvpopmail.a(vpopmail.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC 
 /home/vpopmail/lib/libvpopmail.a: could not read symbols: Bad value 
 collect2: ld returned 1 exit status 
 make[2]: *** [libauthvchkpw.la] Error 1 
 make[2]: Leaving directory `/downloads/qmailrocks/courier-authlib-0.55' 
 make[1]: *** [all-recursive] Error 1 
 make[1]: Leaving directory `/downloads/qmailrocks/courier-authlib-0.55' 
 make: *** [all] Error 2 





ANY help, pointers, fixes .. support is greatly appreciated. :)

Thanks,

--marco

Marco Prechel
Storm Ready Builders, LLC
www.StormReadyBuilders.com

12651 McGregor Blvd.
Suite 1-101
Fort Myers, FL  33919

P.  239.481.0177
C.  239.410.2983
F.  239.481.4844


-
Note:  The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material.  Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited.  The recipient should check this email and
any attachments for the presence of viruses.  Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer.  This e-mail is and any
response to it will be unencrypted and, therefore, potentially insecure.
Thank you.