troubles installing Perl modules with CPAN.pm

yogi

Registered
Hi,
I am trying to install a couple of Perl modules, using the CPAN.pm module. The Version of CPAN.pm provided with OS X 10.1 was a bit older, I got the new one using the same module, no problems. Then installed FTP.pm, no problemo either. Then tried Bundle::LWP, only went well when I did force install LWP.
Neither the DBI, nor DBD::mysql, nor DBD::CSV, nor GD could be installed properly. CPAN went through the moves, but eventually some of its tests failed and it could not terminate the install, not even with force.
Currently I am having problems with the terminal, since I am in a local network and now it seems everything is being referred to that network instead of my Mac's /Library, but it also did not finish correctly when the Terminal was still working oK. Only problem is that now I cannot get the original error message and have to logout soon.
Are those problems with CPAN known, are there workarounds, or do you simply need more data?
Cheerio, yogi
 
CPAN is a really nice tool, but since it automates almost the entire process, it isn't too useful all the time.

If you have a few packages that you want to install, I would suggest getting them off of www.cpan.org yourself, un-tar and install them by hand. Its usually a fairly easy and straight forward process - and if an error does occur, you might have a bit more control over what to do about it.
 
yeah, I also tried it directly, but got the same error messages as through CPAN. Luckily, this time I copied them (a bit largish, though).
This is what I get after "make" for the DBI:

[localhost:~/Documents/DBI-1.21] yogi% make
mkdir blib
mkdir blib/lib
mkdir blib/lib/DBI
cp Changes blib/lib/DBI/Changes.pm
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/DBI
mkdir blib/lib/auto
mkdir blib/lib/auto/DBI
mkdir blib/man1
mkdir blib/man3
cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm
cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm
cp DBIXS.h blib/arch/auto/DBI/DBIXS.h
cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h
cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm
cp dbipport.h blib/arch/auto/DBI/dbipport.h
cp lib/DBI/Format.pm blib/lib/DBI/Format.pm
cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h
cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm
cp DBI.pm blib/lib/DBI.pm
cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm
cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm
cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm
cp Driver.xst blib/arch/auto/DBI/Driver.xst
cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm
cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm
cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
/usr/bin/perl -p -e "s/~DRIVER~/Perl/g" < blib/arch/auto/DBI/Driver.xst > Perl.xsi
/usr/bin/perl -I/System/Library/Perl/darwin -I/System/Library/Perl /System/Library/Perl/ExtUtils/xsubpp -typemap /System/Library/Perl/ExtUtils/typemap Perl.xs > Perl.xsc && mv Perl.xsc Perl.c
cc -c -g -pipe -pipe -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -O3 -DVERSION=\"1.21\" -DXS_VERSION=\"1.21\" -I/System/Library/Perl/darwin/CORE -Wall -Wno-comment -DDBI_NO_THREADS Perl.c
#####I RECKON THIS IS WHERE IT GOES WRONG:#####
cc1obj: Invalid option `-flat_namespace'
Perl.c: In function `XS_DBD__Perl__dr_discon_all_':
Perl.c:32: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__db__login':
Perl.c:49: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__db_commit':
Perl.c:83: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__db_rollback':
Perl.c:100: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__db_disconnect':
Perl.c:117: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__db_STORE':
Perl.c:150: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__db_FETCH':
Perl.c:172: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__db_DESTROY':
Perl.c:191: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st__prepare':
Perl.c:242: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_bind_param':
Perl.c:287: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_bind_param_inout':
Perl.c:329: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_execute':
Perl.c:377: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_fetchrow_arrayref':
Perl.c:427: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_fetchrow_array':
Perl.c:446: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_finish':
Perl.c:514: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_blob_read':
Perl.c:544: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_STORE':
Perl.c:582: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_FETCH_attrib':
Perl.c:604: warning: unused variable `Perl___notused'
Perl.c: In function `XS_DBD__Perl__st_DESTROY':
Perl.c:626: warning: unused variable `Perl___notused'
Perl.c: In function `boot_DBD__Perl':
Perl.c:675: warning: unused variable `Perl___notused'
make: *** [Perl.o] Errors 1

that more suited to suggestions???
 
yeah, and the installation for GD.pm goes bad at exactly the same line; the "cc1obj: Invalid option `-flat_namespace'"
Looks like there is consistency, at least as far as error messages is concerned... So there seems to be something wrong with my cc setup.
Any suggestions there?
 
Are you using the most recent version of the MacOS X developer tools? It might also be worth it to install fink and some of the developer tools that come with that to see if they don't have the same issue. (Actually, I'm not sure that will help, since I'm not sure they have an alternate compiler.) ???
(I'll admit that I'm stretching right now... I had some problems making expat on OS X, so I moved to using a linux box for the development before I realized fink has expat built that I could use. fink also has the DBI.pm module already built, so that might be of some use...)
 
well, I am using Mac OS 10.1, but I only have the developer tools that came with 10.0. That might be one reason for the problems. Whereabouts can I find the latest version of the DevTools?
 
oK, the new DevTools worked. DBI is installed, as well as DBD:mysql, all as far as I can tell, since I have not really done any trickier things with the database. Only the DBD:CSV refuses to be installed (not so bad) and the GD, but I'll have to study the error messages somewhat closer to know what's going on.
 
There's this CPAN command that opens a shell on the offending module dir to let yo do things manually.

Do a 'look <module-name>' on the CPAN prompt.

dani++
 
Back
Top