Problem installing the DBI or DBD module - gcc package installation

Hi,

I faced a problem here. When I tried to make the DBI module or DBD module it showed me the error:

/usr/ucb/cc: language optional software package not installed.

I am thinking of installing the gcc package.
Can somebody tell me how to install the gcc in Unix box? Which version of gcc should I use? Currently I have a box with Solaris 8. Please help.

Thanks,
chewlf
chewlfAsked:
Who is Participating?
 
Kim RyanIT ConsultantCommented:
Looks like you are without the Sun compiler, so you will need to intall the gcc binaries. You can get the latest version at:
ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/gcc-3.0.3-sol8-sparc-local.gz
0
 
chewlfAuthor Commented:
Hi,

What should I do after I got the gcc-3.0.3-sol8-sparc-local.gz?

Please advice.

Thanks,
Chewlf
0
 
Kim RyanIT ConsultantCommented:
First, its a big file, 22MB. Not sure how familair you are with UNIX, but the first step is to unzip the file:
gunzip gcc-3.0.3-sol8-sparc-local.gz
This assumes that you have gunzip installed on your box. The distribution is unzipped into a collection of many files, which should include README, with instructions on how to install. Normally, you run the 'make' program (you will have to check that that is installed too!)
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
chewlfAuthor Commented:
Hi,

What should I do after I got the gcc-3.0.3-sol8-sparc-local.gz?

Please advice.

Thanks,
Chewlf
0
 
chewlfAuthor Commented:
Hi,

I will try it out after the downloading of the installation file.

regards,
Chewlf
0
 
chewlfAuthor Commented:
I have already unzipped the file to

gcc-3.0.3-sol8-sparc-local

what should I do next? I didn't see any README file at this moment.

Which command should I run?

tar vxf gcc-3.0.3-sol8-sparc-local
     or
pkgadd -d gcc-3.0.3-sol8-sparc-local

Please advice.

Thanks,
Chewlf
0
 
chewlfAuthor Commented:
I found the installation guide at this website:

http://gcc.gnu.org/install/

However, at the configuration level, I am not too sure what to do. Especially the below command:

% mkdir objdir --What value should I put for objdir?
% cd objdir
% srcdir/configure [option] [target] --What value should I put for each of them.

Please help.

Thanks,
Chewlf
0
 
Kim RyanIT ConsultantCommented:
you can but anything for objdir, like gcctemp, its just the name of the tmeporary area from which to build the compiler. After unzipping you should use the tar command. then you should see a README file somewhere in the gcctemp area.
0
 
chewlfAuthor Commented:

After I have installed the gcc, I ran the command:

gcc -v

This is what I got:

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-local-solaris2.8/3.0.3/specs
Configured with: ../configure --with-as=/usr/local/bin/as
--with-ld=/usr/local/bin/ld --enable-libgcj
Thread model: posix
gcc version 3.0.3

Am I doing the correct installation? Please advice.

Thanks,
Chewlf
0
 
Kim RyanIT ConsultantCommented:
Well it looks OK. You should check it by comoiling some C code. This will happen when you try to install the DBI & DBD modules
0
 
chewlfAuthor Commented:
Hi,
 I am now starting to install the DBI modules.

I ran the following command:

perl Makefile.PL
make

When I ran this command, I got the below error:

cp Changes blib/lib/DBI/Changes.pm
gcc -c  -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"1.21\"  -DXS_VERSION=\"1.21\" -fPIC -I/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE -Wall -Wno-comment -DDBI_NO_THREADS DBI.c
DBI.xs: In function `dbih_clearcom':
DBI.xs:971: warning: unused variable `Perl___notused'
DBI.xs: In function `dbih_get_fbav':
DBI.xs:1109: warning: unused variable `Perl___notused'
DBI.xs: In function `dbih_set_attr_k':
DBI.xs:1201: warning: unused variable `Perl___notused'
DBI.xs: In function `log_where':
DBI.xs:1743: warning: unused variable `Perl___notused'
DBI.xs: In function `XS_DBI_dispatch':
DBI.xs:2275: warning: unused variable `Perl___notused'
DBI.xs: In function `XS_DBD_____st_bind_col':
DBI.xs:3054: warning: operation on `PL_na' may be undefined
DBI.xs: In function `XS_DBD_____st_bind_columns':
DBI.xs:3075: warning: operation on `PL_na' may be undefined
/usr/ccs/bin/as: "/var/tmp/cc2Oznn2.s", line 3428: error: unknown opcode ".subsection"
/usr/ccs/bin/as: "/var/tmp/cc2Oznn2.s", line 3428: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/cc2Oznn2.s", line 3446: error: unknown opcode ".previous"
/usr/ccs/bin/as: "/var/tmp/cc2Oznn2.s", line 3446: error: statement syntax
*** Error code 1
make: Fatal error: Command failed for target `DBI.o'

Please advice what should I do.

Thanks,
Chewlf
0
 
Kim RyanIT ConsultantCommented:
This is starting to get tricky. Are you sure you got the correct binary for your version of Solaris. I would first try to compile a trivial C program such as

#include <stdio.h>
main()
{
   printf ("Hello World!\n");
}

If you still have problems suggest you raise your question in the Solaris topic area (http://www.experts-exchange.com/solaris/) as it is really no longer mainly a Perl issue.

Would also be nice to get some points for my effort so far, if you think it has helped you

Kim
0
 
chewlfAuthor Commented:
Hi,
Can you please tell me where to compile the trivial C program?

#include <stdio.h>
main()
{
  printf ("Hello World!\n");
}

Thanks,
Chewlf
0
 
Kim RyanIT ConsultantCommented:
save the code above to file hello.c
gcc hello.c -o hello
chmod +x hello
hello
(should printHello World)
0
 
chewlfAuthor Commented:
Hi Kim,

Yes, it print exactly the "Hello World". Was that mean I have C compiler with the correct version in my Solaris?


Thanks,
Chewlf
0
 
Kim RyanIT ConsultantCommented:
It means you can correctly compile a C program. I would suggest now, in the DBI or DBD area, trying

perl Makefile.PL
make test
0
 
chewlfAuthor Commented:
Hi Kim,

When I tried to run the command:

perl Makefile.PL
make

It gave me the error that I mentioned earlier.
I am now stuck in there and do not know what to do. I am thinking maybe the setting of PATH was wrong. I am not too sure. Please advice.

Thanks,
Chewlf
0
 
Kim RyanIT ConsultantCommented:
That's why i suggested 'make test' instead of make, as it will give you more reports.

I don't think I can offer anymore advice beyond what I have given. If any other experts want to take over here that is fine. I think it has really become a C/Solaris problem. Suggest you post this question and the compiler error messages in the Solaris area.
0
 
inq123Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept a comment by teraplane for the effort put in that helped chewlf get through an important part of the question. Grade could be lower than A, but I feel it's important that expert's effective effort be rewarded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

inq123
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.