Computing.Net > Forums > Solaris > problem compiling source code in solaris

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

problem compiling source code in solaris

Reply to Message Icon

Name: Eric Cheng
Date: January 10, 2002 at 08:25:32 Pacific
Comment:

Hi, I have a clean solaris 8 installed. I pkgadd the make and gcc on it, but every time i tried to compile source code i got erros, for example apache , when i do a #./configure -->everything is okay
#make --> gives me bunch of errors===> src
===> src/os/unix
src/ap
gcc -c -I../os/unix -I../include -DSOLARIS2=280 -DUSE_EXPAT
-I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_snprintf.c
/usr/ccs/bin/as: "/var/tmp/ccy8hYLb.s", line 3318: error: unknown
opcode
".subsection"
/usr/ccs/bin/as: "/var/tmp/ccy8hYLb.s", line 3318: error: statement
syntax
/usr/ccs/bin/as: "/var/tmp/ccy8hYLb.s", line 3442: error: unknown
opcode
".previous"
/usr/ccs/bin/as: "/var/tmp/ccy8hYLb.s", line 3442: error: statement
syntax
*** Error code 1
make: Fatal error: Command failed for target `ap_snprintf.o'
Current working directory /usr/local/src/apache_1.3.22/src/ap
*** Error code 1
make: Fatal error: Command failed for target `subdirs'
Current working directory /usr/local/src/apache_1.3.22/src
*** Error code 1
make: Fatal error: Command failed for target `build-std'
Current working directory /usr/local/src/apache_1.3.22
*** Error code 1
make: Fatal error: Command failed for target `build'

not only compiling apache, but other as well, is there anything i need to do or configure for compiling? thanks




Sponsored Link
Ads by Google

Response Number 1
Name: Mark M
Date: January 30, 2002 at 13:46:18 Pacific
Reply:

This is a long shot and probably not the answer, but you may have to set your LD_LIBRARY_PATH variable....

eg: for csh

setenv LD_LIBRARY_PATH /usr/local/lib

or wherever else you have libs... I'm sorry if this doesn't help, but a try is better than nothing at all.

Also what version of gcc do you have?


0

Response Number 2
Name: Mark M
Date: January 30, 2002 at 13:47:28 Pacific
Reply:

Also with the programs you're compiling - did you see if they need anything else? a lot of the time just gcc isn't enough, you need things like zlib and son on....

HTH


0

Response Number 3
Name: Chris
Date: April 4, 2002 at 00:06:03 Pacific
Reply:

This SAME exact problem was bugging me all day. Here's the trick:
* no binutils package (/usr/ccs/bin should be in your PATH)
* gcc version 2.95.x!!!! you probably have 3.0.x. Once I backleveled, I was fine.



0

Response Number 4
Name: Brad Homer
Date: April 9, 2002 at 10:50:43 Pacific
Reply:

Thanks Chris! I had the same problem (on Solaris 2.8)... I pkgrm'd gcc 3.0.3 and pkgadd'd gcc 2.95.3 (and already had /usr/ccs/bin in my PATH)... and PRESTO! Problem gone!

Here's a paste of what I was getting

BEFORE:

# make gcc
gcc -I../../include -c -o api.o api.cpp
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 618: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 618: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 619: error: unknown opcode ".sleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 619: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 621: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 621: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 625: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 625: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 626: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 626: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 635: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 635: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 639: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 639: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 642: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 642: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 643: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 643: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 652: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 652: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 656: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 656: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 659: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 659: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 660: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 660: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 669: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 669: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 673: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 673: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 676: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 676: error: statement syntax
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 677: error: unknown opcode ".uleb128"
/usr/ccs/bin/as: "/var/tmp/ccdIWRaV.s", line 677: error: statement syntax
*** Error code 1
make: Fatal error: Command failed for target `api.o'

AFTER:

# make gcc
gcc -I../../include -c -o api.o api.cpp
gcc -G api.o -o libapi.so /usr/lib/libC.so.5 /usr/lib/libCrun.so.1



0

Response Number 5
Name: James Hughbanks
Date: May 27, 2002 at 13:13:15 Pacific
Reply:

For the people that want to use the newer gcc, all you have to do is find where the binutils are for your version of gcc
eg: gcc 3.1 binutils are in /usr/local/sparc-sun-solaris2.8/bin

make sure this path is before the /usr/ccs/bin and everything works fine.

Hint: works if you want SASL compiled in with sendmail using DB3.2 as DB3.2 requires gcc >3


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: problem compiling source code in solaris

compile problems of unpv12e www.computing.net/answers/solaris/compile-problems-of-unpv12e/2676.html

system time changing in solaris 8 ( www.computing.net/answers/solaris/system-time-changing-in-solaris-8-/3451.html

error while compiling in Solaris www.computing.net/answers/solaris/error-while-compiling-in-solaris/4652.html