When you use 'sudo', your PATH is changed.  Try: sudo sh -c 'echo $PATH'

(a) Don't compile as 'root' (install as root if you must, but personally, I
leave the system's Perl strictly untouched and create my own copy of Perl
every time).
(b) If you must compile as 'root', you'll have to reset root's path to
include /usr/vac/bin.

Good luck.



On Thu, Apr 11, 2013 at 4:56 PM, Manimegalai Visvanathan <
mvisvanat...@wsgc.com> wrote:

> Dear Team,
>
> I need your help installing DBI on AIX Server. It's may be a compiler
> issue. But, am able to find cc and cc_r installed under /usr/vac/bin path.
> GCC -4 is also installed on this server. Eventhough, am unable to install
> dbi. Kindly help me to fix this issue.
>
>
> $ cd DBI-1.625
> $ sudo perl Makefile.PL
> Creating test wrappers for DBD::Gofer:
> t/zvg_01basics.t
> t/zvg_02dbidrv.t
> [...]



> t/zvxgnp_85gofer.t
>
> I see you're using perl 5.008008 on aix-thread-multi, okay.
>     Remember to actually *read* the README file!
>     Use  'make' to build the software (dmake or nmake on Windows).
>     Then 'make test' to execute self tests.
>     Then 'make install' to install the DBI and then delete this working
>     directory before unpacking and building any DBD::* drivers.
>
>

Another reason for building your own Perl is that you could use a less
archaic version — like 5.16.2 instead of 5.8.8!



> Writing Makefile for DBI
>
>
> $ sudo make
>         cc_r -c    -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
> -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
> -D_LARGE_FILES -qlonglong -O    -DVERSION=\"1.625\"  -DXS_VERSION=\"1.625\"
>  "-I/usr/opt/perl5/lib/5.8.8/aix-thread-multi/CORE"   Perl.c
> /bin/sh: cc_r:  not found
> make: The error code from the last command is 127.
>
>
> Stop.
> $
>
> $ perl -v
>
> This is perl, v5.8.8 built for aix-thread-multi
>
> Copyright 1987-2006, Larry Wall
>
> Perl may be copied only under the terms of either the Artistic License or
> the
> GNU General Public License, which may be found in the Perl 5 source kit.
>
> Complete documentation for Perl, including FAQ lists, should be found on
> this system using "man perl" or "perldoc perl".  If you have access to the
> Internet, point your browser at http://www.perl.org/, the Perl Home Page.
>
> $ uname -a
> AIX abidevrk2p 1 6 00F694884C00
>
> $ cd /usr/vac/bin
> $ ls
> CreateExportList  c89_r7            c99_r7            cc_r7             xlc
> c89               c99               cc                cleanpdf
>  xlc128
> c89_128           c99_128           cc128             fixpkg_vacndi
> xlc128_r
> c89_128_r         c99_128_r         cc128_r           gxlc
>  xlc128_r4
> c89_128_r4        c99_128_r4        cc128_r4          mergepdf
>  xlc128_r7
> c89_128_r7        c99_128_r7        cc128_r7          resetpdf
>  xlc_r
> c89_r             c99_r             cc_r              showpdf
> xlc_r4
> c89_r4            c99_r4            cc_r4             vacndi
>  xlc_r7
>
> $ gcc -v
> Using built-in specs.
> Target: powerpc-ibm-aix5.3.0.0
> Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld
> --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware
> --enable-threads --enable-version-specific-runtime-libs
> --host=powerpc-ibm-aix5.3.0.0
> Thread model: aix
> gcc version 4.0.0
>

Don't try using GCC unless you build your own Perl with it.  You will be in
for a world of pain.


> Please consider the impact to the environment before printing this email
>


-- 
Jonathan Leffler <jonathan.leff...@gmail.com>  #include <disclaimer.h>
Guardian of DBD::Informix - v2013.0118 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply via email to