gcc problem on Solaris


 
Thread Tools Search this Thread
Operating Systems Solaris gcc problem on Solaris
# 1  
Old 10-09-2009
gcc problem on Solaris

I just installed gcc from the latest package at sunfreeware.com using pkgadd. I write a simple 'Hello World!' program to test it. I try to compile it and I get this error:

Code:
rockstar# gcc hello.c -o hello
ld.so.1: gcc: fatal: libiconv.so.2: open failed: No such file or directory
Killed

I set my LD_LIBRARY_PATH variable:

Code:
rockstar# setenv LD_LIBRARY_PATH /usr/lib/

Get the same error. I check /usr/lib/ and libiconv.so.2 isn't there anyway. Is the package I found at sunfreeware.com the official package to install or is there a better one out there? I assume there would be a better package that comes with all the .so files I need to compile a simple file like this.

---------- Post updated at 11:42 AM ---------- Previous update was at 10:59 AM ----------

OK, I'm an idiot. gcc is already installed in /usr/sfw/bin/gcc and is fully functional. Admins can close this post.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Newly Compiled GCC 4.4.4 on Solaris sparc gives problem with -m32/-m64 flags

Hello experts, This issue has kept me busy all day long. It started off with openssl compilation which was giving linking error with following message: /usr/local/bin/ld: target elf32-sparc not found collect2: ld returned 1 exit status I tried every step possible thing that I could think... (2 Replies)
Discussion started by: d_shanke
2 Replies

2. Solaris

Problem compiling Samba 3.5.1 on Solaris 10 with gcc (3.4.6)

I'm getting this error when 'Linking shared library bin/libtalloc.so.2'... anyone know what's up here? Using CFLAGS = -O -I. -I/source/samba-3.5.1/source3 -I/source/samba-3.5.1/source3/../lib/popt -I/source/samba-3.5.1/source3/iniparser/src -Iinclude -I./include -I. -I. -I./../lib/replace... (6 Replies)
Discussion started by: son_t
6 Replies

3. Solaris

Help with installing gcc on Solaris 10

I want to install gcc for Solaris 10 to an alternate location besides /usr/local/bin, so I can't use the pre-compiled package from sunfreeware.com. So I assume I need to compile gcc for myself and specify --prefix. How can I accomplish this? Am I pretty much out of luck trying to compile... (3 Replies)
Discussion started by: srhadden
3 Replies

4. Solaris

gcc not working on Solaris 10

I have a very simple c++ program like: > cat easy_gcc.cc #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <ctype.h> int debugging = 1; int main() { printf ("This is a... (2 Replies)
Discussion started by: miltony123
2 Replies

5. Solaris

Installing gcc 2.8.1 on Solaris 10

Folks - This may sound like a newbee question - and it is. But a project that I'm managing is under a time crunch and I need a quick answer. IS it possible to install gcc 2.8.1 on a Solaris 10 Sun box? We have some old libraries that need that version of the compiler in order to work... (2 Replies)
Discussion started by: peridot
2 Replies

6. Solaris

Need help in building gcc on solaris.

We are moving from old solaris to new version of solaris. I have copied the gcc compiler installed on old server to new solaris server. But just copying didn't work. So I am trying to build it on the new server. The server version is sailfish@st-kvar02 -> uname -a SunOS st-kvar02 5.10... (7 Replies)
Discussion started by: nalina.hv
7 Replies

7. Solaris

Install GCC on Solaris 8

Hi, I tried to install apache web server on solaris 8 and was prompted that i do not have any valid compiler. I tried to install GCC on solaris 8 using the command #pkgadd -d gcc-2.95.2-sol17-sparc-local (hit enter). May I know how I should set the environment variables to make it work... (1 Reply)
Discussion started by: sagolo
1 Replies

8. UNIX for Advanced & Expert Users

gcc installation in solaris 8

Hi, I am having trouble installing gcc 3.4.2-sol8-sparc-local in my sparc machine running solaris 8. It looks like I do not have enough memory in /var , but I have about 3GB free memory in /export/home. I have read some suggestion from previous threads that said it is possible to link /var and... (8 Replies)
Discussion started by: prosper
8 Replies

9. Programming

GCC (solaris)

I packed gcc to /usr/local/ with pkgadd and when I wan't to compile a c code file it says gcc: no file how do I configure gcc on Solaris 8 plz help (1 Reply)
Discussion started by: CreamHarry
1 Replies

10. Programming

gcc for solaris 2.6

Hi Friends, Is there any website that I can download gcc for solaris 2.6? thanks jen (9 Replies)
Discussion started by: jennifer
9 Replies
Login or Register to Ask a Question
cxref-cpp(1)						      General Commands Manual						      cxref-cpp(1)

NAME
cxref-cpp - A modified C preprocessor to use with cxref. SYNOPSIS
cxref-cpp ... DESCRIPTION
To improve the output that is available for the source code for cross-referencing a modified version of the GNU CPP v2.7.2 is supplied (named cxref-cpp). This modified C preprocessor allows for a finer control over some features of the preprocessing that are not important for a compiler. In a standard preprocessor, the preprocessor directives are intended for use only by the preprocessor, so passing the information through is not important. With cxref-cpp, there are some features that are different to the standard GNU CPP: Compared to gcc versions earlier than version 2.8.0 there is an extra option that will output the #include lines from the source file. In version 2.8.0 and later this option is present. Comments trailing a #include or a #define are not preserved by all versions of gcc even if the -C option is used. This is not important while compiling, but is useful for documenting. The cxref-cpp program will take on the personality of the installed version of gcc so that the gcc header files can be parsed. This means that it includes the same default include directory paths and macro definitions. The file that contains these definitions is called cxref-cpp.defines and is installed by the cxref-cpp-configure program or specified by the -cxref-cpp-defines command line option. OPTIONS
The same as for gcc, apart from '-cxref-cpp-defines' described above. SEE ALSO
cxref(1), cxref-cpp-configure(1), gcc(1) May 9, 2004 cxref-cpp(1)