Solved

Problem installing the DBI or DBD module - gcc package installation

Posted on 2002-04-09
19
272 Views
Last Modified: 2010-03-05
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
0
Comment
Question by:chewlf
  • 10
  • 8
19 Comments
 
LVL 19

Accepted Solution

by:
Kim Ryan earned 150 total points
ID: 6927557
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
 

Author Comment

by:chewlf
ID: 6927566
Hi,

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

Please advice.

Thanks,
Chewlf
0
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 6927579
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
 

Author Comment

by:chewlf
ID: 6927586
Hi,

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

Please advice.

Thanks,
Chewlf
0
 

Author Comment

by:chewlf
ID: 6927591
Hi,

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

regards,
Chewlf
0
 

Author Comment

by:chewlf
ID: 6930533
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
 

Author Comment

by:chewlf
ID: 6930698
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
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 6932557
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
 

Author Comment

by:chewlf
ID: 6932737

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 19

Expert Comment

by:Kim Ryan
ID: 6932903
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
 

Author Comment

by:chewlf
ID: 6932964
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
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 6932978
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
 

Author Comment

by:chewlf
ID: 6932993
Hi,
Can you please tell me where to compile the trivial C program?

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

Thanks,
Chewlf
0
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 6935503
save the code above to file hello.c
gcc hello.c -o hello
chmod +x hello
hello
(should printHello World)
0
 

Author Comment

by:chewlf
ID: 6935554
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
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 6935580
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
 

Author Comment

by:chewlf
ID: 6935614
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
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 6935709
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
 
LVL 8

Expert Comment

by:inq123
ID: 9490916
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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now