chewlf
asked on
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!)
gunzip gcc-3.0.3-sol8-sparc-local
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!)
ASKER
Hi,
What should I do after I got the gcc-3.0.3-sol8-sparc-local .gz?
Please advice.
Thanks,
Chewlf
What should I do after I got the gcc-3.0.3-sol8-sparc-local
Please advice.
Thanks,
Chewlf
ASKER
Hi,
I will try it out after the downloading of the installation file.
regards,
Chewlf
I will try it out after the downloading of the installation file.
regards,
Chewlf
ASKER
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
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
ASKER
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
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
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.
ASKER
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/spa
Configured with: ../configure --with-as=/usr/local/bin/a
--with-ld=/usr/local/bin/l
Thread model: posix
gcc version 3.0.3
Am I doing the correct installation? Please advice.
Thanks,
Chewlf
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
ASKER
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-so laris/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_column s':
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
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
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_column
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
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 (https://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
#include <stdio.h>
main()
{
printf ("Hello World!\n");
}
If you still have problems suggest you raise your question in the Solaris topic area (https://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
ASKER
Hi,
Can you please tell me where to compile the trivial C program?
#include <stdio.h>
main()
{
printf ("Hello World!\n");
}
Thanks,
Chewlf
Can you please tell me where to compile the trivial C program?
#include <stdio.h>
main()
{
printf ("Hello World!\n");
}
Thanks,
Chewlf
save the code above to file hello.c
gcc hello.c -o hello
chmod +x hello
hello
(should printHello World)
gcc hello.c -o hello
chmod +x hello
hello
(should printHello World)
ASKER
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
Yes, it print exactly the "Hello World". Was that mean I have C compiler with the correct version in my Solaris?
Thanks,
Chewlf
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
perl Makefile.PL
make test
ASKER
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
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
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.
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.
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
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
ASKER
What should I do after I got the gcc-3.0.3-sol8-sparc-local
Please advice.
Thanks,
Chewlf