Thank you for your answer. You must be right when you say that my "crash" is a C compilation failure. The problem is that I am not experienced in C language, and I don't really know how to resolve the compilation error.
I looked on the web to find information about the GCC compiler, I downloaded the latest version and read the installation guide, but I would prefer avoiding to reinstall a new version of the compiler if possible, since it would suppose that I also reinstall the compiler on the production server :-/ I attached the shell output with the glibc and gcc versions. I also tried to test another module (HTML-Tidy) using C, and I have a compilation failure similar to the DBI compilation failure (the shell output is attached). So you also may be right when you say that I am probably not able to build any module with C. I don't think my libraries are too old, since they came with the linux distribution, which is from 2007. Maybe the problem comes from a wrong path or something ? So I don't know which way I should search now... if you have any clue it would be great ! Thanks again for the time you spend on my problem. Raphael 2008/11/4 Jonathan Leffler <[EMAIL PROTECTED]> > > On Mon, Nov 3, 2008 at 8:06 AM, Raphael Morlec <[EMAIL PROTECTED]>wrote: > >> Hello everybody, >> >> I'm trying without success to install DBI for nearly two days now. >> >> I use a x86_64-linux Mandriva 2007 distribution, with perl 5.8.8 (the >> shell 'perl -V' output is attached). >> >> I tried several ways to install DBI : >> >> 1. With the CPAN : >> I tried 'perl -MCPAN -e shell', then 'install DBI' >> CPAN gets the DBI module, writes the makefile, then... crashes ! >> I attached the output of the CPAN on the shell (auto_CPAN_crash.txt). >> It crashes when gcc compiling is beginning (near line 376), so I guess >> the problem comes from... gcc compilation. >> I check the C libraries, and I think I have the right libraries : >> gcc-4.1.1-3mdk.x86_64 >> libstdc++5-3.3.6-3mdk.x86_64 >> libstdc++6-devel-4.1.1-3mdk.x86_64 >> > > I'm not sure how you define 'crash', but to me, a 'crash' is different from > a compilation failure. > > The first sign I see of trouble is: > > gcc -shared -L/usr/local/lib64 DBI.o -o blib/arch/auto/DBI/DBI.so \ > \ > > /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc > /usr/bin/ld: cannot find -lc > > > > collect2: ld returned 1 exit status > > > You probably need to resolve that before going any further. > > > > > >> >> 2. By downloading sources from CPAN : >> Error is almost the same : I get the DBI-1.607.tar.gz file. >> ( http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.607.tar.gz ) >> Then I build the makefile with 'perl Makefile.PL' >> Then I do 'make'. >> Then... crash. >> It seems to crash at the same moment than with CPAN automatic installation >> (shell output attached => manual_CPAN_crash.txt) > > > Same failure. > > > > > RPM information deleted > > DBI::Shell is not DBI. > And DBI 1.54 is quite a bit older than the current releases. > > > Thanks for including the information about versions, etc. It helps. > > I note that Perl was built with a pre-release of the C compiler: > > Compiler: > cc='gcc', ccflags ='-fno-strict-aliasing -pipe > -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', > > > > optimize='-O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions', > cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement > -I/usr/local/include -I/usr/include/gdbm' > ccversion='', gccversion='4.1.1 20060724 (prerelease) (4.1.1-3mdk)', > gccosandvers='' > > > > I doubt that has anything to do with the issue. though. You need to ensure > that you can find an appropriate C library. > Have you managed to build any other C modules in Perl? Somehow, I doubt > it. > > > -- > Jonathan Leffler <[EMAIL PROTECTED]> #include <disclaimer.h> > Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org > "Blessed are we who can laugh at ourselves, for we shall never cease to be > amused." >
[EMAIL PROTECTED] lib]# gcc -v Using built-in specs. Target: x86_64-mandriva-linux-gnu Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib64 --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --host=x86_64-mandriva-linux-gnu --with-cpu=generic --with-system-zlib --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo --enable-ssp --disable-libssp Thread model: posix gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk)
[EMAIL PROTECTED] lib]# ll /lib/libc.* lrwxrwxrwx 1 root root 11 avr 3 2007 /lib/libc.so.6 -> libc-2.4.so* [EMAIL PROTECTED] lib]# /lib/libc.so.6 GNU C Library development release version 2.4, by Roland McGrath et al. Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.1.1 20060724 (prerelease) (4.1.1-3mdk). Compiled on a Linux 2.6.17 system on 2007-01-18. Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU libio by Per Bothner NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B Thread-local storage support included. For bug reporting instructions, please see: <http://www.gnu.org/software/libc/bugs.html>.
[EMAIL PROTECTED] lib]# perl -MCPAN -e shell CPAN: File::HomeDir loaded ok (v0.64) cpan shell -- CPAN exploration and modules installation (v1.9205) ReadLine support enabled cpan[1]> install HTML::Tidy CPAN: Storable loaded ok (v2.15) Going to read /root/.cpan/Metadata Database was generated on Wed, 29 Oct 2008 23:26:51 GMT Running install for module 'HTML::Tidy' Running make for P/PE/PETDANCE/HTML-Tidy-1.08.tar.gz CPAN: Digest::SHA loaded ok (v5.44) CPAN: Compress::Zlib loaded ok (v2.004) Checksum for /root/.cpan/sources/authors/id/P/PE/PETDANCE/HTML-Tidy-1.08.tar.gz ok Scanning cache /root/.cpan/build for sizes ............................................................................DONE HTML-Tidy-1.08/ HTML-Tidy-1.08/lib/ HTML-Tidy-1.08/lib/HTML/ HTML-Tidy-1.08/lib/HTML/Tidy/ HTML-Tidy-1.08/lib/HTML/Tidy/Message.pm HTML-Tidy-1.08/lib/HTML/Tidy.pm HTML-Tidy-1.08/t/ HTML-Tidy-1.08/t/opt-00.t HTML-Tidy-1.08/t/cfg-for-parse.cfg HTML-Tidy-1.08/t/simple.t HTML-Tidy-1.08/t/segfault-form.t HTML-Tidy-1.08/t/wordwrap.cfg HTML-Tidy-1.08/t/roundtrip.t HTML-Tidy-1.08/t/too-many-titles.t HTML-Tidy-1.08/t/cfg-for-parse.t HTML-Tidy-1.08/t/wordwrap.t HTML-Tidy-1.08/t/venus.cfg HTML-Tidy-1.08/t/unicode.html HTML-Tidy-1.08/t/pod-coverage.t HTML-Tidy-1.08/t/00-load.t HTML-Tidy-1.08/t/levels.t HTML-Tidy-1.08/t/unicode.t HTML-Tidy-1.08/t/pod.t HTML-Tidy-1.08/t/extra-quote.t HTML-Tidy-1.08/t/ignore-text.t HTML-Tidy-1.08/t/ignore.t HTML-Tidy-1.08/t/venus.t HTML-Tidy-1.08/t/version.t HTML-Tidy-1.08/t/clean-crash.t HTML-Tidy-1.08/t/perfect.t HTML-Tidy-1.08/t/venus.html HTML-Tidy-1.08/t/message.t HTML-Tidy-1.08/Changes HTML-Tidy-1.08/Tidy.xs HTML-Tidy-1.08/MANIFEST HTML-Tidy-1.08/bin/ HTML-Tidy-1.08/bin/webtidy HTML-Tidy-1.08/perlcriticrc HTML-Tidy-1.08/ppport.h HTML-Tidy-1.08/README HTML-Tidy-1.08/Makefile.PL HTML-Tidy-1.08/META.yml CPAN: File::Temp loaded ok (v0.18) CPAN: YAML loaded ok (v0.62) CPAN.pm: Going to build P/PE/PETDANCE/HTML-Tidy-1.08.tar.gz Note (probably harmless): No library found for -ltidy It seems that you don't have libtidy installed. HTML::Tidy does no real work on its own. See the section "INSTALLING LIBTIDY" in Tidy.pm for a step-by-step walkthrough of building the lib. You can also refer to http://tidy.sourceforge.net/. If you do have libtidy installed, and I just haven't detected it, go ahead and try building. If HTML::Tidy builds and tests correctly, then please let Andy Lester know at [EMAIL PROTECTED] so that he can fix the library detection code. Checking if your kit is complete... Looks good Note (probably harmless): No library found for -ltidy Writing Makefile for HTML::Tidy cp lib/HTML/Tidy/Message.pm blib/lib/HTML/Tidy/Message.pm cp lib/HTML/Tidy.pm blib/lib/HTML/Tidy.pm /usr/bin/perl5.8.8 /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap Tidy.xs > Tidy.xsc && mv Tidy.xsc Tidy.c gcc -c -I. -I/usr/include/tidy -I/usr/local/include/tidy -I/sw/include/tidy -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -DVERSION=\"1.08\" -DXS_VERSION=\"1.08\" -fPIC "-I/usr/lib/perl5/5.8.8/x86_64-linux/CORE" Tidy.c Running Mkbootstrap for HTML::Tidy () chmod 644 Tidy.bs rm -f blib/arch/auto/HTML/Tidy/Tidy.so gcc -shared -L/usr/local/lib64 Tidy.o -o blib/arch/auto/HTML/Tidy/Tidy.so \ \ /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit status make: *** [blib/arch/auto/HTML/Tidy/Tidy.so] Erreur 1 PETDANCE/HTML-Tidy-1.08.tar.gz /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: PETDANCE/HTML-Tidy-1.08.tar.gz : make NO cpan[2]> *** glibc detected *** perl: double free or corruption (!prev): 0x0000000001084bf0 *** ======= Backtrace: ========= /lib64/libc.so.6[0x2b046ee823a3] /lib64/libc.so.6[0x2b046ee83c58] /lib64/libc.so.6(__libc_realloc+0x125)[0x2b046ee84885] /lib64/libc.so.6[0x2b046ee473b1] /lib64/libreadline.so.5(sh_set_lines_and_columns+0x5a)[0x2b046f8ddf2a] /lib64/libreadline.so.5(_rl_get_screen_size+0xad)[0x2b046f8d709d] /lib64/libreadline.so.5(rl_resize_terminal+0x33)[0x2b046f8d77c3] /lib64/libreadline.so.5(readline_internal_char+0x1e)[0x2b046f8c4b9e] /lib64/libreadline.so.5(readline+0x7b)[0x2b046f8c4d9b] /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux/auto/Term/ReadLine/Gnu/Gnu.so(XS_Term__ReadLine__Gnu__XS_rl_readline+0x89)[0x2b046f7a88c9] /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so(Perl_pp_entersub+0x3fa)[0x2b046e6ba43a] /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so(Perl_runops_standard+0x1a)[0x2b046e6b3bba] /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so(perl_run+0x12c)[0x2b046e6672bc] perl(main+0xbc)[0x40164c] /lib64/libc.so.6(__libc_start_main+0xf4)[0x2b046ee32e64] perl[0x4014f9] ======= Memory map: ======== 00400000-00403000 r-xp 00000000 08:05 67109052 /usr/bin/perl5.8.8 00502000-00503000 rw-p 00002000 08:05 67109052 /usr/bin/perl5.8.8 00503000-069b9000 rw-p 00503000 00:00 0 [heap] 2b046e516000-2b046e530000 r-xp 00000000 08:05 17704376 /lib64/ld-2.4.so 2b046e530000-2b046e532000 rw-p 2b046e530000 00:00 0 2b046e62f000-2b046e630000 r--p 00019000 08:05 17704376 /lib64/ld-2.4.so 2b046e630000-2b046e631000 rw-p 0001a000 08:05 17704376 /lib64/ld-2.4.so 2b046e631000-2b046e745000 r-xp 00000000 08:05 118090053 /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so 2b046e745000-2b046e844000 ---p 00114000 08:05 118090053 /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so 2b046e844000-2b046e84d000 rw-p 00113000 08:05 118090053 /usr/lib/perl5/5.8.8/x86_64-linux/CORE/libperl.so 2b046e84d000-2b046e850000 rw-p 2b046e84d000 00:00 0 2b046e850000-2b046e851000 r--p 00000000 08:05 67169123 /usr/share/locale/fr_FR.UTF-8/LC_IDENTIFICATION 2b046e851000-2b046e858000 r--s 00000000 08:05 53743410 /usr/lib64/gconv/gconv-modules.cache 2b046e858000-2b046e859000 r--p 00000000 08:05 201332197 /usr/share/locale/fr_FR.UTF-8/LC_MEASUREMENT 2b046e859000-2b046e85a000 r--p 00000000 08:05 67169124 /usr/share/locale/fr_FR.UTF-8/LC_TELEPHONE 2b046e85a000-2b046e85b000 r--p 00000000 08:05 67169125 /usr/share/locale/fr_FR.UTF-8/LC_ADDRESS 2b046e85b000-2b046e85c000 r--p 00000000 08:05 201332195 /usr/share/locale/fr_FR.UTF-8/LC_NAME 2b046e85c000-2b046e85d000 r--p 00000000 08:05 201332193 /usr/share/locale/fr_FR.UTF-8/LC_PAPER 2b046e85d000-2b046e85e000 r--p 00000000 08:05 218103941 /usr/share/locale/fr_FR.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES 2b046e85e000-2b046e85f000 r--p 00000000 08:05 201332187 /usr/share/locale/fr_FR.UTF-8/LC_MONETARY 2b046e86d000-2b046e880000 r-xp 00000000 08:05 16777369 /lib64/libnsl-2.4.so 2b046e880000-2b046e980000 ---p 00013000 08:05 16777369 /lib64/libnsl-2.4.so 2b046e980000-2b046e982000 rw-p 00013000 08:05 16777369 /lib64/libnsl-2.4.so 2b046e982000-2b046e984000 rw-p 2b046e982000 00:00 0 2b046e984000-2b046e986000 r-xp 00000000 08:05 16777365 /lib64/libdl-2.4.so 2b046e986000-2b046ea86000 ---p 00002000 08:05 16777365 /lib64/libdl-2.4.so 2b046ea86000-2b046ea88000 rw-p 00002000 08:05 16777365 /lib64/libdl-2.4.so 2b046ea88000-2b046eadd000 r-xp 00000000 08:05 16777367 /lib64/libm-2.4.so 2b046eadd000-2b046ebdc000 ---p 00055000 08:05 16777367 /lib64/libm-2.4.so 2b046ebdc000-2b046ebde000 rw-pAbandon