GCC On Solaris 2.4

Hello Gents,
I'm trying to use the gnu c compiler in a Box with Solaris 2.4 but I've got this message when I try to compile something, also I've got a error message when I'm tryin' to generate the make files for specific program, in this case I'm talking about sudo, but this happens with any kind of software that I need to compile.
Can anyone tell me if I'd need to install another kind of patch or library to fix it?
# pkginfo | grep -i gcc
utility GNUgcc GNU gcc 2.95.2 SPARC Solaris 2.4
application SMClibgcc lgcc
# pkginfo | grep -v SUNW
utility GNUaconf GNU autoconf 2.13 SPARC Solaris 2.4
utility GNUamake GNU automake 1.4 SPARC Solaris 2.4
utility GNUgcc GNU gcc 2.95.2 SPARC Solaris 2.4
utility GNUgdb GNU gdb 4.17 SPARC Solaris 2.4
utility GNUgdbm GNU gdbm 1.8.0 SPARC Solaris 2.4
utility GNUmake GNU make 3.78.1 SPARC Solaris 2.4
application SMClibgcc lgcc
# cat nada.c
"nada.c" 11 lines, 97 characters
#include <stdio.h>
main()
for(;;)
printf ("Hello World!\n");
# /usr/local/bin/gcc nada.c -o nada
In file included from nada.c:1:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.4/2.95.2/include/stdio.h:17: sys/featu
# cd /sudo-1.6.9p16
# ./configure
configure: Configuring Sudo version 1.6.9
checking whether to lecture users the first time they run sudo... yes
checking whether sudo should log via syslog or to a file by default... syslog
checking which syslog facility sudo should log with... local2
checking at which syslog priority to log commands... notice
checking at which syslog priority to log failures... alert
checking how long a line in the log file should be... 80
checking whether sudo should ignore '.' or '' in $PATH... no
checking whether to send mail when a user is not in sudoers... yes
checking whether to send mail when user listed but not for this host... no
checking whether to send mail when a user tries a disallowed command... no
checking who should get the mail that sudo sends... root
checking for bad password prompt... Password:
checking for bad password message... Sorry, try again.
checking whether to expect fully qualified hosts in sudoers... no
checking for umask programs should be run with... 0022
checking for default user to run commands as... root
checking for editor that visudo should use... vi
checking whether to obey EDITOR and VISUAL environment variables... no
checking number of tries a user gets to enter their password... 3
checking time in minutes after which sudo will ask for a password again... 5
checking time in minutes after the password prompt will time out... 5
checking whether to use per-tty ticket files... no
checking whether to include insults... no
checking whether to override the user's path... no
checking whether to get ip addresses from the network interfaces... yes
checking whether stow should be used... no
checking whether to do user authentication by default... yes
checking whether to disable running the mailer as root... no
checking whether to disable shadow password support... no
checking whether root should be allowed to use sudo... yes
checking whether to log the hostname in the log file... no
checking whether to invoke a shell if sudo is given no arguments... no
checking whether to set $HOME to target user in shell mode... no
checking whether to disable 'command not found' messages... no
checking for egrep... egrep
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
#

I found the solution myself and will shortly summarize it here to complete the thread.
(1) Use GNU as and non-GNU ld, so add "--with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld" to the configure command line. After I worked this out I found it noted on the build instruction website, RTFM proved to be useful again. :-)
(2) At some point the compilation aborted because directory stage3-gcc could not be found, so I had to do "ln -s stage3-i386-pc-solaris2.10 stage3-gcc". Maybe this can be avoided with some other configure options, but this workaround was fine for me.
(3) In order to use my own versions of gmp and mpfr, I had to add their library directory to the LD_LIBRARY_PATH environment variable (--with-gmp= and --with-mpfr= are not sufficient).
Kind regards,
Christian

Similar Messages

  • Help!Apache compiling with gcc in Solaris 10

    Greetings
    I am having problems with Apache 1.3.
    When I am running the script ./src/Configure my output is:
    #./Configure
    Using config file: Configuration
    Creating Makefile
    + configured for Solaris 2100 platform
    + setting C pre-processor to gcc -E
    + using "tr [a-z] [A-Z]" to uppercase
    + checking for system header files
    + adding selected modules
    ./helpers/TestCompile: make: not found
    + using builtin Expat
    ./Configure: make: not found
    + checking sizeof various data types
    ./helpers/TestCompile: make: not found
    ./helpers/TestCompile: make: not found
    ./helpers/TestCompile: make: not found
    ./helpers/TestCompile: make: not found
    ./helpers/TestCompile: make: not found
    ./helpers/TestCompile: make: not found
    ./helpers/TestCompile: make: not found
    ./helpers/TestCompile: make: not found
    ./helpers/TestCompile: make: not found
    + doing sanity check on compiler and options
    ./helpers/TestCompile: make: not found
    ** A test compilation with your Makefile configuration
    ** failed. The below error output from the compilation
    ** test will give you an idea what is failing. Note that
    ** Apache requires an ANSI C Compiler, such as gcc.
    ======== Error Output for sanity check ========
    ./helpers/TestCompile: make: not found
    ============= End of Error Report =============
    Aborting!
    I am root, my PATH is
    /usr/bin:/usr/ucb:/etc:/usr/local/bin:/opt/netscape:/usr/css/bin/:/bin:/usr/openwin/bin:/usr/sbin:/
    I am missing something stupid, I know but I can't find it!!!!Help please I am a newbie.
    I am curious. Has anyone been able to compile succesfully apache server with gcc in Solaris 10?
    Thanks,

    Thanks,
    It was only that.!!!
    But now I have the following problem, I can't create executables when I type make. The output is:
    when I am in the src/folder
    #make
    ===> regex
    <=== regex
    ===> os/unix
    gcc -c -I../../os/unix -I../../include -DSOLARIS2=2100 -DUSE_HSREGEX -DUSE_EXPAT -I../../lib/expat-lite -DNO_DL_NEEDED os.c
    In file included from /usr/include/sys/wait.h:24,
    from ../../include/ap_config.h:1079,
    from os.c:21:
    /usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
    /usr/include/sys/siginfo.h:292: error: parse error before '}' token
    /usr/include/sys/siginfo.h:294: error: parse error before '}' token
    /usr/include/sys/siginfo.h:390: error: parse error before "ctid_t"
    /usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
    /usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'
    /usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
    /usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'
    /usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
    /usr/include/sys/siginfo.h:273: error: previous declaration of `__file'
    /usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
    /usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'
    /usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
    /usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'
    /usr/include/sys/siginfo.h:426: error: parse error before '}' token
    /usr/include/sys/siginfo.h:428: error: parse error before '}' token
    /usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t"
    /usr/include/sys/siginfo.h:437: error: parse error before '}' token
    In file included from /usr/include/sys/procset.h:24,
    from /usr/include/sys/wait.h:25,
    from ../../include/ap_config.h:1079,
    from os.c:21:
    /usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
    In file included from ../../include/ap_config.h:1079,
    from os.c:21:
    /usr/include/sys/wait.h:86: error: parse error before "siginfo_t"
    In file included from ../../include/ap_config.h:1096,
    from os.c:21:
    /usr/include/signal.h:111: error: parse error before "siginfo_t"
    /usr/include/signal.h:113: error: parse error before "siginfo_t"
    *** Error code 1
    make: Fatal error: Command failed for target `os.o'
    Current working directory /web-download/apache_1.3.33/src/os/unix
    *** Error code 1
    The following command caused the error:
    for i in regex os/unix ap main lib modules; do \
    echo "===> $i"; \
    case ".Solaris 2100" in \
    .OS390 | .TPF) ( cd $i && make SDP='' OPTIM='') || exit 1;; \
    *) ( cd $i && make SDP='' CC='gcc' AUX_CFLAGS=' -DSOLARIS2=2100 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED ' RANLIB='ranlib' OPTIM='') || exit 1;; \
    esac; \
    echo "<=== $i"; \
    done
    make: Fatal error: Command failed for target `subdirs'
    but when I am typing one step up is.
    ===> src
    ===> src/regex
    <=== src/regex
    ===> src/os/unix
    gcc -c -I../../os/unix -I../../include -DSOLARIS2=2100 -DUSE_HSREGEX -DUSE_EXPAT -I../../lib/expat-lite -DNO_DL_NEEDED os.c
    In file included from /usr/include/sys/wait.h:24,
    from ../../include/ap_config.h:1079,
    from os.c:21:
    /usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
    /usr/include/sys/siginfo.h:292: error: parse error before '}' token
    /usr/include/sys/siginfo.h:294: error: parse error before '}' token
    /usr/include/sys/siginfo.h:390: error: parse error before "ctid_t"
    /usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
    /usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'
    /usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
    /usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'
    /usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
    /usr/include/sys/siginfo.h:273: error: previous declaration of `__file'
    /usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
    /usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'
    /usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
    /usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'
    /usr/include/sys/siginfo.h:426: error: parse error before '}' token
    /usr/include/sys/siginfo.h:428: error: parse error before '}' token
    /usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t"
    /usr/include/sys/siginfo.h:437: error: parse error before '}' token
    In file included from /usr/include/sys/procset.h:24,
    from /usr/include/sys/wait.h:25,
    from ../../include/ap_config.h:1079,
    from os.c:21:
    /usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
    In file included from ../../include/ap_config.h:1079,
    from os.c:21:
    /usr/include/sys/wait.h:86: error: parse error before "siginfo_t"
    In file included from ../../include/ap_config.h:1096,
    from os.c:21:
    /usr/include/signal.h:111: error: parse error before "siginfo_t"
    /usr/include/signal.h:113: error: parse error before "siginfo_t"
    *** Error code 1
    make: Fatal error: Command failed for target `os.o'
    Current working directory /web-download/apache_1.3.33/src/os/unix
    *** Error code 1
    The following command caused the error:
    for i in regex os/unix ap main lib modules; do \
    echo "===> src/$i"; \
    case ".Solaris 2100" in \
    .OS390 | .TPF) ( cd $i && make SDP='src/' OPTIM='') || exit 1;; \
    *) ( cd $i && make SDP='src/' CC='gcc' AUX_CFLAGS=' -DSOLARIS2=2100 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED ' RANLIB='ranlib' OPTIM='') || exit 1;; \
    esac; \
    echo "<=== src/$i"; \
    done
    make: Fatal error: Command failed for target `subdirs'
    Current working directory /web-download/apache_1.3.33/src
    *** Error code 1
    The following command caused the error:
    case "xi86pc-sun-solaris2.2100" in \
    x*390*) C89STEPS="0xffffffff"; export C89STEPS;; \
    esac; \
    cd ./src; make SDP=src/ all
    make: Fatal error: Command failed for target `build-std'
    Current working directory /web-download/apache_1.3.33
    *** Error code 1
    The following command caused the error:
    make -f ./Makefile root= build-std
    make: Fatal error: Command failed for target `build'
    I am newbie with Solaris and gcc so I have no so much idea what is missing there.
    Thanks,
    Juan

  • Installing gcc on solaris 10

    hi,
    i have a problem when trying to install gcc on solaris 10.
    my path:
    PATH=/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/sfw/lib:/usr/sfw/libexec
    # gcc test.c
    gcc: installation problem, cannot exec `as': No such file or directory
    i don't know what the problem is, please help
    thks

    i have a problem when trying to install gcc on solaris 10.Solaris 10's bundled gcc in /usr/sfw/bin/gcc?
    my path:
    PATH=/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/sfw/lib:/usr/sfw/libexec/usr/sfw/lib and /usr/sfw/libexec can probably be deleted from
    $PATH, the executables are in /usr/sfw/bin.
    # gcc test.c
    gcc: installation problem, cannot exec `as': No such
    file or directory/usr/sfw/bin/gcc needs the GNU assembler, and it should be
    install as /usr/sfw/bin/gas. Do you have the Solaris 10 package
    SUNWbinutils installed?
    % pkgchk -l -p /usr/sfw/bin/gas
    Pathname: /usr/sfw/bin/gas
    Type: regular file
    Expected mode: 0555
    Expected owner: root
    Expected group: bin
    Expected file size (bytes): 613844
    Expected sum(1) of contents: 49903
    Expected last modification: Jan 23 02:53:41 2005
    Referenced by the following packages:
    SUNWbinutils
    Current status: installed

  • Gcc for Solaris 10

    where do I get the gcc for solaris 10 for x86 version?

    One should be available in /usr/sfw/bin , if you are not happy with that version you could check out blastwave.org or sunfreeware.com for other versions.
    7/M.

  • Building Net-SNMP with gcc and Solaris 10's Forte-built Perl

    The 5.0.9 Net-SNMP that come with Solaris SPARC is too old for our users. Building the latest version appears to be basically impossible and I'm just about to bail and just build yet another version of Perl for Solaris 10 so it will work. But on the chance that someone has done this:
    I am trying to build Net-SNMP 5.4.1.2 with the Sunfreeware gcc. The configure script seems to ignore the --disable-perl-cc-checks flag:
    ./configure with-perl-modules disable-perl-cc-checks
    configure: error: This build is using a GNU C compiler (gcc) while Perl has been compiled with a non-GNU (or non-working) compiler (cc). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules).
    Has anyone successfully done this? I was hoping to get a successful configure run, then build the binaries, and then further tweak the perl makefiles with "GCC=/usr/perl5/5.8.4/bin/perlgcc" or something.

    configure: error: This build is using a GNU C compiler (gcc) while Perl has been compiled with a non-GNU (or non-working) compiler (cc). This likely won't work for building with Perl support. Either specify a different compiler (--with-cc=PATH), disable this check (--disable-perl-cc-checks) or build without Perl (--without-perl-modules).The perl supplied by Sun should be compiled with Sun Studio and the error mentioned above seems to reflect this.
    So, either build perl first with sunfreeware's gcc and then move on to net-snmp or install and use Sun Studio instead of gcc so perl is happy.
    alan

  • Problems with make/gcc on Solaris

    I'm working on building a binary on several different platforms, but the only one giving me trouble is Solaris 10 (64-bit -- though apparently this is building a 32-bit binary). The binary relies on the following project:
    https://projects.coin-or.org/Cbc
    I can checkout their code from SVN and build it without a problem. However, we then have a small cpp file that links to those libraries. I cannot get this cpp file to build. In fact, Solaris chokes on the makefile itself complaining that one of the lines ends with the '$' (which it does). The strange thing is, this makefile works correctly on Linux. It also works just fine on Windows in the MinGW environment (I do have to add a few flags on Windows but they are completely unrelated and the line ending with '$' still still present and works).
    Since the makefile failed, I tried to run the 2 commands that it does manually. The first one succeeds but the second command fails to locate the dynamic libraries -- even though the directory they reside in is specified in the -L argument. What gives??
    I put /usr/ccs/bin and /usr/sfw/bin in my PATH variable so that I can use make and gcc. I had to add /usr/sfw/lib to the LIBDIR variable, otherwise I was getting even more errors. Here is the makefile and the error that I get when I try to run make:
    -bash-3.2$ cat makefile
    CPP = gcc
    COINPATH = /export/home/locuser/cbc_source/coin-cbc
    CPATH += -I$(COINPATH)/include/coin
    LIBDIR = -L$(COINPATH)/lib:/usr/sfw/lib
    COINLIBS = -lCbcSolver -lCbc -lCgl -lOsiClp -lClp -lOsi -lCoinUtils -lm
    CFLAGS += -DUSE_SNAPSHOT=1 -DNEW_SIMULATOR=1 -g $(CPATH)
    DATASTORE=$(PSASRC)/datastore.a
    .c.o:
    $(CC) $(CFLAGS) -c -o $@ $<
    .cpp.o:
    $(CPP) $(CFLAGS) -c -o $@ $<
    OBJSx = cbc.o
    cbc: $(OBJSx) $
    $(CPP) $(CFLAGS) -o cbc $+ $(LIBDIR) $(COINLIBS)
    -bash-3.2$ make
    mksh: Fatal error in reader: '$' at end of line
    Current working directory /export/home/locuser/cbc_source/solver
    Then this is what happened when I tried to run the 2 commands manually:
    -bash-3.2$ gcc -DUSE_SNAPSHOT=1 -DNEW_SIMULATOR=1 -g -I/export/home/locuser/cbc_source/coin-cbc/include/coin -c -o cbc.o cbc.cpp
    -bash-3.2$ gcc -DUSE_SNAPSHOT=1 -DNEW_SIMULATOR=1 -g -I/export/home/locuser/cbc_source/coin-cbc/include/coin -o cbc cbc.o -L/export/home/locuser/cbc_source/coin-cbc/lib:/usr/sfw/lib -lCbcSolver -lCbc -lCgl -lOsiClp -lClp -lOsi -lCoinUtils -lm
    ld: fatal: library -lCbcSolver: not found
    ld: fatal: library -lCbc: not found
    ld: fatal: library -lCgl: not found
    ld: fatal: library -lOsiClp: not found
    ld: fatal: library -lClp: not found
    ld: fatal: library -lOsi: not found
    ld: fatal: library -lCoinUtils: not found
    ld: fatal: file processing errors. No output written to cbc
    collect2: ld returned 1 exit status
    However, if I cd into the directory /export/home/locuser/cbc_source/coin-cbc/lib then the libraries do indeed exist there:
    -bash-3.2$ cd /export/home/locuser/cbc_source/coin-cbc/lib
    -bash-3.2$ ls lib*.so.0
    libCbc.so.0 libClp.so.0 libOsiCbc.so.0
    libCbcSolver.so.0 libCoinUtils.so.0 libOsiClp.so.0
    libCgl.so.0 libOsi.so.0 libOsiCommonTests.so.0
    Any ideas on what I am doing wrong here? It seems like there is something non-standard about make on Solaris?

    Woo hoo! I was able to finally get past this. Thank you both for you assistance. I tried the LD_DEBUG=files option and it didn't seem to help me much. I got some additional output but it appeared unrelated. So then I separated out my -L argument into 2 separate arguments. This changed the error messages and led to some errors about operator new and delete not being found as well as some gz and BZ2 functions not being found:
    Undefined first referenced
    symbol in file
    operator new[](unsigned int) cbc.o (symbol belongs to implicit dependency /usr/sfw/lib/libstdc++.so.6)
    operator new(unsigned int) cbc.o (symbol belongs to implicit dependency /usr/sfw/lib/libstdc++.so.6)
    std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) constcbc.o (symbol belongs to implicit dependency /usr/sfw/lib/libstdc++.so.6)
    std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))cbc.o (symbol belongs to implicit dependency /usr/sfw/lib/libstdc++.so.6)
    vtable for __cxxabiv1::__si_class_type_infocbc.o (symbol belongs to implicit dependency /usr/sfw/lib/libstdc++.so.6)
    std::basic_ostream<char, std::char_traits<char> >::operator<<(int)cbc.o (symbol belongs to implicit dependency /usr/sfw/lib/libstdc++.so.6)
    BZ2_bzRead /export/home/locuser/cbc_source/coin-cbc/lib/libCoinUtils.so
    operator delete[](void*) cbc.o (symbol belongs to implicit dependency /usr/sfw/lib/libstdc++.so.6)
    operator delete(void*) cbc.o (symbol belongs to implicit dependency /usr/sfw/lib/libstdc++.so.6)
    gzopen /export/home/locuser/cbc_source/coin-cbc/lib/libCoinUtils.so
    gzread /export/home/locuser/cbc_source/coin-cbc/lib/libCoinUtils.so
    BZ2_bzReadOpen /export/home/locuser/cbc_source/coin-cbc/lib/libCoinUtils.so
    BZ2_bzWriteOpen /export/home/locuser/cbc_source/coin-cbc/lib/libCoinUtils.so
    This led me to two conclusions:
    1. I needed to change the makefile to use g++ instead of gcc (due to the messages about the operators existing in libstd*c++*.so.6).
    2. I needed to include the libz and libbz2 libraries (by adding -lz and -lbz2) to COINLIBS.
    I made those 2 changes to the makefile and it built successfully with gmake! So now I'm off to go document this information on our wiki. Thanks for the suggestions -- they pointed me in the right direction and ultimately helped me resolve this issue. :)

  • Install and Configure GCC on Solaris 10 X86

    Hi All,
    I did get gcc from sunfreeware and I install it in my Solaris 10:
    it is installed in:
    /usr/local
    and I have this structure in local:
    bin doc include info lib libexec man share
    but when I try use gcc shell report this:
    # cat > test.c
    #include <stdio.h>
    int main()
    printf("HI!!\n");
    return 0;
    # cat test.c
    #include <stdio.h>
    int main()
    printf("HI!!\n");
    return 0;
    # gcc test.c
    gcc: not found
    then I did try put : /usr/local/bin in $PATH
    tha contains:
    c++ gcov
    cpp i386-pc-solaris2.10-c++
    g++ i386-pc-solaris2.10-g++
    g77 i386-pc-solaris2.10-gcc
    gcc i386-pc-solaris2.10-gcc-3.4.6
    gccbug iconv
    # $PATH=/usr/local/bin:$PATH; export PATH
    /usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb=/usr/local/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb: not found
    # gcc
    gcc: not found
    but I din't have success...
    How I configure it to work.
    Other thing, I should put /usr/local/include
    in PATH?
    Thanks to all.

    Hi I have one more doubt, if you can help-me.
    I set PATH like this:
    #PATH=/usr/local/bin:$PATH; export PATH
    and work, but if I restar the machine I need do set PATH again: #PATH=/usr/local/bin:$PATH; export PATH.
    Have any way to save this?
    And I have the same problem with:
    #BOOST_ROOT=/xtras/boost_1_34_1
    Thanks#

  • 64bit GCC on Solaris 10 x86????

    Hi, I have googled high and low, in search on how to get 64bit GCC compiler to work on Solaris x86. I got Solaris 10 x86 installed on a Dell PE2950. Any help you can provide is greatly appreciated. Thanks, -ken

    Here's the build script. The sources were downloaded from ftp.gnu.org.
    Note, you need to build
    gmp
    mpfr
    mpc
    before building gcc.
    #!/bin/sh
    CC="/usr/sfw/bin/gcc"
    PATH="/usr/devtools/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/bin:/usr/ucb"
    CPPFLAGS="-I/usr/devtools/include"
    LDFLAGS="-L/usr/devtools/lib -R/usr/devtools/lib"
    LD_LIBRARY_PATH="/usr/devtools/lib"
    export CC CPPFLAGS LDFLAGS LD_LIBRARY_PATH PATH
    if [ -d  ./objdir ]; then
    /bin/rm -fr ./objdir
    fi
    make distclean
    mkdir ./objdir
    cd ./objdir
    ../configure --prefix=/usr/devtools \
    --with-gmp=/usr/devtools \
    --with-mpfr=/usr/devtools \
    --with-mpc=/usr/devtools \
    --with-gnu-as \
    --with-as=/usr/sfw/bin/gas \
    --without-gnu-ld \
    --with-ld=/usr/ccs/bin/ld \
    --enable-shared \
    --enable-languages=c,c++,fortran
    make

  • Creating simple shared library using gcc under Solaris 10

    Hi All:
    I apologize if this is too newbie a question but have seen nothing that works for me yet.
    I'm trying to create a shared library that contains a single object file using gcc (as installed on Solaris 10). I compiled the source code as follows:
    gcc -c -fPIC x.cpp -o x.o
    and got the x.o object file created and readable.
    I then tried (from sample code on line):
    gcc -shared -Wl,-soname,libMyLib.so.1 -o libMyLib.so.1.0.1 x.o
    and get the following errors:
    ld: warning: option -o appears more than once, first setting taken
    ld: fatal: file libMyLib.so.1: open failed: No such file or directory
    ld: fatal: File processing errors. No output written to x.o
    collect2: ld returned 1 exit status

    -soname is a GNU ld option. Use -h instead.
    NB:
    - you should use g++ not gcc to compile C++ code
    - this forum is about the Oracle C++ compiler, not gcc. With it, you would do:
    CC -c -KPIC x.cpp
    CC -G -h libMyLib.so.1 -o libMyLib.so.1.0.1 x.o

  • How can remove gcc from solaris 10

    HI All,
    how can i remove gcc pkg from solaris 10
    thanks

    pkgrm SUNWgcc
    If you are uncertain which package a file belongs to you can always run pkgchk:
    $ pkgchk -l -p /usr/sfw/bin/gcc
    NOTE: Couldn't lock the package database. <-- since i didn't run the command as someone with root privileges.
    Pathname: /usr/sfw/bin/gcc
    Type: linked file
    Source of link: ../../../usr/sfw/bin/i386-pc-solaris2.10-gcc-3.4.3
    Referenced by the following packages:
    SUNWgcc
    Current status: installed
    $
    .7/M.

  • Gcc on solaris

    gcc,make,gmake all correctly installed.i want to install conky.so ./configure.
    ok.he see gcc and continues.but make tells me: make: *** No targets specified and no makefile found. Stop.
    i have make & gcc but i cant do make,make install!!!!what i suppose to do to compile sources with
    ./configure
    make
    make install????

    This is what I get:
    checking pkg-config is at least version 0.19... yes
    Your operating system SunOS isn't supported
    Feel free to help. :P
    If you can wait for Solaris 11 or move on to OpenSolaris then there is something similar which sits on the desktop and provides similar functionality and it's already included.
    alan

  • How to install gcc on solaris 7

    Hi everybody
    I downloaded "gcc-2.95.2-sol7-intel-local.gz" from sunfreeware.com site. I unzipped it but i don't know how can i install it on my solaris intel 7. please help me.
    Thanks
    Behrad

    Seeing as how this is an old post I assume you already figured it out, and unless I'm way off it's a simple matter of using the pkgadd utility. Something like this I believe (while your in the directory):
    pkgadd -d gcc-2.95.2-sol7-intel-local .
    If you don't have enough room in your /usr/local or /opt directories, you might need to use the -R <root-path> to redirect the install to a different location. You must be root when installing.
    Good Luck,
    -Mel

  • Cannot compile GCC in Solaris Express

    Hi everyone,
    Im trying to compile GCC and other GNU tools in Solaris. Im trying to do this to compile my driver for OpenChrome (video). I'm getting some errors, but I could not paste it because im using Linux right now.
    Anybody got an idea on how to install GCC correctly?
    Many thanks in advance.
    Gerard

    darkstar87 wrote:
    Hi everyone,
    Im trying to compile GCC and other GNU tools in Solaris. Im trying to do this to compile my driver for OpenChrome (video). I'm getting some errors, but I could not paste it because im using Linux right now.Without the errors, there's no way to suggest a remedy.
    Perhaps you have permission problems, or disk full, or you don't have a working compiler, or your path is wrong, or the download is corrupt, or...
    Anybody got an idea on how to install GCC correctly?If the version that comes with Solaris is not sufficient, there are packages that can be installed from sunfreeware or blastwave, or you can follow the INSTALL instructions from gcc.
    Darren

  • Core dump in __mutex_alloc_int with 4.7.25 on Solaris 10

    I'm a newbie to the forum and to BDB. I'm not a database person either.
    I build BDB 4.7.25 and run the test suite (run_all) - it passes a large portion but fails in Env007 after echoing "Env007.h: -create -thread".
    I have not yet applied 3 patches for this version but before I go do that please tell me if I'm likely wasting my time or not - I see a number of seemingly disparaging remarks in the source code about Solaris. I see a number of threads close to my issue but nothing on target so far - pardon me if I missed an obvious, on-target thread.
    I'm using gcc-3.4.6 from www.sunfreeware.com.
    I used this configure command
    CC=gcc \
    ../dist/configure \
    --enable-compat185 \
    --enable-pthread_api \
    --enable-rpc \
    --enable-tcl \
    --enable-test
    Then I start tclsh8.4, source ../test/test.tcl, and execute a test. Here is the stack backtrace from just running Env007:
    (gdb) bt
    #0 0xfee4e774 in __mutex_alloc_int () from /spadmin/build/db-4.7.25.NC/build_unix/.libs/libdb_tcl-4.7.so
    #1 0xfee4f2f4 in __mutex_open () from /spadmin/build/db-4.7.25.NC/build_unix/.libs/libdb_tcl-4.7.so
    #2 0xfee9934c in __env_open () from /spadmin/build/db-4.7.25.NC/build_unix/.libs/libdb_tcl-4.7.so
    #3 0xfee5fc44 in __env_setup () from /spadmin/build/db-4.7.25.NC/build_unix/.libs/libdb_tcl-4.7.so
    #4 0xfee7f1fc in __db_open () from /spadmin/build/db-4.7.25.NC/build_unix/.libs/libdb_tcl-4.7.so
    #5 0xfee79f70 in __db_open_pp () from /spadmin/build/db-4.7.25.NC/build_unix/.libs/libdb_tcl-4.7.so
    #6 0xfedafb6c in bdb_DbOpen () from /spadmin/build/db-4.7.25.NC/build_unix/.libs/libdb_tcl-4.7.so
    #7 0xfedb1950 in berkdb_Cmd () from /spadmin/build/db-4.7.25.NC/build_unix/.libs/libdb_tcl-4.7.so
    #8 0xff2a73b8 in TclEvalObjvInternal () from /usr/local/lib/libtcl8.4.so
    #9 0xff2a7c74 in Tcl_EvalEx () from /usr/local/lib/libtcl8.4.so
    #10 0xff2a811c in Tcl_EvalObjEx () from /usr/local/lib/libtcl8.4.so
    #11 0xff2ac988 in Tcl_EvalObjCmd () from /usr/local/lib/libtcl8.4.so
    #12 0xff2a73b8 in TclEvalObjvInternal () from /usr/local/lib/libtcl8.4.so
    #13 0xff2ccc90 in TclExecuteByteCode () from /usr/local/lib/libtcl8.4.so
    #14 0xff2cc270 in TclCompEvalObj () from /usr/local/lib/libtcl8.4.so
    #15 0xff2fdbd4 in TclObjInterpProc () from /usr/local/lib/libtcl8.4.so
    #16 0xff2a73b8 in TclEvalObjvInternal () from /usr/local/lib/libtcl8.4.so
    #17 0xff2a7c74 in Tcl_EvalEx () from /usr/local/lib/libtcl8.4.so
    #18 0xff2a811c in Tcl_EvalObjEx () from /usr/local/lib/libtcl8.4.so
    #19 0xff2ac988 in Tcl_EvalObjCmd () from /usr/local/lib/libtcl8.4.so
    #20 0xff2a73b8 in TclEvalObjvInternal () from /usr/local/lib/libtcl8.4.so
    #21 0xff2ccc90 in TclExecuteByteCode () from /usr/local/lib/libtcl8.4.so
    #22 0xff2cc270 in TclCompEvalObj () from /usr/local/lib/libtcl8.4.so
    #23 0xff2fdbd4 in TclObjInterpProc () from /usr/local/lib/libtcl8.4.so
    #24 0xff2a73b8 in TclEvalObjvInternal () from /usr/local/lib/libtcl8.4.so
    #25 0xff2ccc90 in TclExecuteByteCode () from /usr/local/lib/libtcl8.4.so
    #26 0xff2cc270 in TclCompEvalObj () from /usr/local/lib/libtcl8.4.so
    #27 0xff2a8140 in Tcl_EvalObjEx () from /usr/local/lib/libtcl8.4.so
    #28 0xff2d9fcc in Tcl_RecordAndEvalObj () from /usr/local/lib/libtcl8.4.so
    #29 0xff2eee04 in Tcl_Main () from /usr/local/lib/libtcl8.4.so
    #30 0x000107e0 in main ()
    (gdb)
    Looking at what the patches do I am inclined to think they are not going to address this. But while awaiting a reply I will start that.
    Can anyone say for certain that 4.7.25 can be built and be enterprise class quality with gcc on Solaris 10 [08/07 right now]?
    Do I need different configure options?
    What else do I need to know?
    Many Thanks in Advance

    The test has gotten as far as rep036 with zero FAILures but it appears to be deadlocked:
    [160]} ptree 26166
    3818 /usr/local/sbin/sshd
    23791 /usr/local/sbin/sshd -R
    23793 /usr/local/sbin/sshd -R
    23795 -ksh
    26166 tclsh
    7627 /usr/local/bin/tclsh8.4
    11898 /usr/local/bin/tclsh8.4 ../dist/../test/wrap.tcl rep036script
    11900 /usr/local/bin/tclsh8.4
    11899 /usr/local/bin/tclsh8.4 ../dist/../test/wrap.tcl rep036script
    11901 /usr/local/bin/tclsh8.4
    [161]} truss -aefl -rall -vall -wall -p 7627
    7627/1: psargs: /usr/local/bin/tclsh8.4
    7627/1: lwp_cond_wait(0xFE902AD0, 0xFE902AB8, 0x00000000, 0) (sleeping...)
    7627/1: condvar type: USYNC_PROCESS
    7627/1: mutex type: USYNC_PROCESS
    [162]} truss -aefl -rall -vall -wall -p 11898
    11898/1: psargs: /usr/local/bin/tclsh8.4 ../dist/../test/wrap.tcl rep036script.tc
    11898/1: waitid(P_PID, 11900, 0xFFBFEA30, WEXITED|WTRAPPED) (sleeping...)
    [163]} truss -aefl -rall -vall -wall -p 11900
    11900/1: psargs: /usr/local/bin/tclsh8.4
    11900/1: pollsys(0xFFBFE480, 0, 0xFFBFE4E8, 0x00000000) = 0
    11900/1: timeout: 1.000500000 sec
    11900/1: pollsys(0xFFBFE480, 0, 0xFFBFE4E8, 0x00000000) = 0
    11900/1: timeout: 1.000500000 sec
    11900/1: pollsys(0xFFBFE480, 0, 0xFFBFE4E8, 0x00000000) = 0
    11900/1: timeout: 1.000500000 sec
    11900/1: pollsys(0xFFBFE480, 0, 0xFFBFE4E8, 0x00000000) = 0
    11900/1: timeout: 1.000500000 sec
    11900/1: pollsys(0xFFBFE480, 0, 0xFFBFE4E8, 0x00000000) (sleeping...)
    11900/1: timeout: 1.000500000 sec
    11900/1: pollsys(0xFFBFE480, 0, 0xFFBFE4E8, 0x00000000) = 0
    11900/1: timeout: 1.000500000 sec
    11900/1: pollsys(0xFFBFE480, 0, 0xFFBFE4E8, 0x00000000) = 0
    11900/1: timeout: 1.000500000 sec
    [164]} truss -aefl -rall -vall -wall -p 11899
    11899/1: psargs: /usr/local/bin/tclsh8.4 ../dist/../test/wrap.tcl rep036script.tc
    11899/1: waitid(P_PID, 11901, 0xFFBFEA30, WEXITED|WTRAPPED) (sleeping...)
    [165]} truss -aefl -rall -vall -wall -p 11901
    11901/1: psargs: /usr/local/bin/tclsh8.4
    11901/1: lwp_cond_wait(0xFE902C60, 0xFE902C48, 0x00000000, 0) (sleeping...)
    11901/1: condvar type: USYNC_PROCESS
    11901/1: mutex type: USYNC_PROCESS
    ^C[166]}
    as it has not produced any further output in the last 2 hours. Off to reconfigure as recommended now - I guess my experience suggests this mutex mechanism isn't quite ready for prime time.

  • Solaris 10 - Changing default screen color depth

    Hello,
    I just upgraded a Sun Blade from Solaris 8 to 10. I have a rather old image display application (ftp://east.la.asu.edu/pub/software/pw-5.23.tar.gz) that is absolutely essential for my work, and it will not run under Solaris 10, either on the CDE or jave/gnome desktops.
    The executable for this application was compiled using gcc on Solaris 8, and ran fine on Solaris 8 CDE (v1.4.3?) with the "Most colors for applications" color setting in Desktop Color prefs. With that setup, the application allocated 216 colors when starting up, which was sufficient. If the application could not allocate enough colors, it would use its own private color map, which caused window "flashing," but that was OK.
    Under Solaris 10 CDE (v1.6.3) and gnome, the application cannot allocate enough colors, and cannot even start with its own color map.
    I re-complied the application on Solaris 10 using Sun Studio 11, and the same problem occurs with the new executable.
    I think that the problem may be related to default color depth. Right now, with xwininfo, my Solaris 10 CDE xterms are 24-bit true color. Unfortunately, I think that I may need to set my default color depth to 8-bit pseudocolor for the application to run. How can I change the default color depth of the CDE and gnome desktops to pseudocolor? I know that the application works on HP-UX CDE with the default depth as pseudocolor.
    I cannot remember if I had somehow changed the settings for color depth on Solaris 8 to get the application to run. I do know that the xwininfo results for a Firefox browser window running on my Solaris 8 CDE desktop was 24-bit true color. I hope very much that this will be the case if I change my default depth to 8-bit on Solaris 10.
    Any help that anyone can provide would be GREATLY appreciated. I am dead in the water without this imaging application. I am a member of the Sun Developer Network, and I don't know if I should post this message somewhere on the Developer Forums. Please let me know if I should.
    Thank you in advance!!!!!

    Hi,
    In my first post there is a link to the code I am talking about. The code is public and available. It was created by Noel Gorelick at ASU. It is based on having an 8-bit Xserver running. There are few users of this code, but I completely agree with you that a new generation of unix-based imaging code needs to be developed that is system and Xserver independent. Optimal code should detect screen depth and open windows with desired color depth automatically, without "flashing.". That way, it could even run under Gnome, which allocates all but 18 8-bit colors for the desktop. Under CDE, the code allocates 224 colors for itself, which is great. The above code will create its own colormap if it cannot allocate enough colors, but there is flashing in that case. Have at it if you wish.
    Best regards,
    Sparcmaster

Maybe you are looking for