Click here to get back home

Des::Crypt Will not Compile On Solaris 8 Using GCC

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Des::Crypt Will not Compile On Solaris 8 Using GCC tonyvinson 12-07-2005
Posted by tonyvinson on December 7, 2005, 2:58 pm
Please log in for more thread options


This is the error that I get on Several Machines.


bash-2.05a# perl Makefile.PL
Writing Makefile for Crypt::DES
bash-2.05a# make
cc -c -D_REENTRANT -I/opt/csw/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.00\" -DXS_VERSION=\"2.00\"
-KPIC "-I/opt/csw/lib/perl/5.8.2/CORE" DES.c
cc: unrecognized option `-KPIC'
In file included from DES.xs:18:
des.h:5: error: conflicting types for 'des_crypt'
/usr/include/crypt.h:22: error: previous declaration of 'des_crypt' was
here
des.h:5: error: conflicting types for 'des_crypt'
/usr/include/crypt.h:22: error: previous declaration of 'des_crypt' was
here
make: *** [DES.o] Error 1



Posted by Sisyphus on December 8, 2005, 12:38 pm
Please log in for more thread options



> This is the error that I get on Several Machines.
>
>
> bash-2.05a# perl Makefile.PL
> Writing Makefile for Crypt::DES
> bash-2.05a# make
> cc -c -D_REENTRANT -I/opt/csw/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.00\" -DXS_VERSION=\"2.00\"
> -KPIC "-I/opt/csw/lib/perl/5.8.2/CORE" DES.c
> cc: unrecognized option `-KPIC'
> In file included from DES.xs:18:
> des.h:5: error: conflicting types for 'des_crypt'
> /usr/include/crypt.h:22: error: previous declaration of 'des_crypt' was
> here
> des.h:5: error: conflicting types for 'des_crypt'
> /usr/include/crypt.h:22: error: previous declaration of 'des_crypt' was
> here
> make: *** [DES.o] Error 1
>

Some questions. (I don't know the answers and the questions may be idiotic -
especially given that I've never used Solaris.):

Are you sure that you're using gcc ? The compiler reports 'cc' ,and whilst
that may just be an alias for 'gcc', I would expect that on a Solaris box,
it could really *be* cc. Does /usr/include contain gcc's header files or
does it contain cc's header files ?

make clean
perl Makefile.PL CC=gcc
make

How does 'crypt.h' get #include'd ? And why does crypt.h declare
'des_crypt' ? On my linux box, /usr/include/crypt.h contains no mention of
'des_crypt'. (I don't think 'crypt.h' is even being #include'd, but I'm not
sure. It's certainly not being #include'd on my Win32 box, because there's
no such file.)

I would probably try something ghastly and unrecommended - like
*temporarily* replacing every occurrence of 'des_crypt' in 'crypt.h' with
some other term (eg '__des_crypt'). Then start again with:

make clean
perl Makefile.PL (with 'CC=gcc' if necessary)
make

If 'crypt.h' is not *really* needed, then that would probably work. But if
'crypt.h' really *is* needed, and if 'crypt.h' really *does* need to
declare 'des_crypt', then it may not work :-) In that case I think you'd
have to look at renaming 'des_crypt' to something else within the
Crypt::DES source files.

If you do make changes to 'crypt.h', don't forget to undo them once you've
finished. (Best to save a backup copy of 'crypt.h'.)

Cheers,
Rob




Similar ThreadsPosted
Crypt:DES make problem on Solaris 9 March 10, 2005, 12:39 pm
Crypt:DES make problem on Solaris 9 March 10, 2005, 12:52 pm
Math::Pari doesn't compile with GCC 3.4.2 in Solaris 9 sparc January 17, 2005, 5:24 pm
Crypt::DH Crypt::Random install problem May 9, 2005, 5:25 am
Crypt::Tea becomes Crypt::Tea_JS January 17, 2005, 1:14 pm
Crypt::RC5 128 April 5, 2006, 10:31 am
Crypt::RSA March 10, 2007, 6:43 pm
RFC: Crypt::Skip32 [try 3] September 24, 2007, 12:51 am
(ANNOUNCE) Crypt::FileHandle October 24, 2004, 12:08 am
Crypt::SSLeay + OpenSSL 0.9.8 July 21, 2006, 5:31 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap