Compiling in Solaris


 
Thread Tools Search this Thread
Top Forums Programming Compiling in Solaris
# 1  
Old 03-20-2007
Compiling in Solaris

Hi,

I'm new to Unix. I'm trying to compile a shared library in Solaris running on x86. I get "void value not ignored as it ought to be" error when trying "make". But it compiles fine in Fedora. How can this happen? I think both are using the same type of compiler. What can I do to get around this?

Thanks

I think its due to differences in the compilers. However I was able to resolve some of the errors by modifying the source. Now I get the following errors:

In file included from lm-socket.c:26:
/usr/include/arpa/nameser.h:124: error: syntax error before '*' token
/usr/include/arpa/nameser.h:126: error: syntax error before '*' token
/usr/include/arpa/nameser.h:129: error: syntax error before '*' token
/usr/include/arpa/nameser.h:130: error: syntax error before '}' token
/usr/include/arpa/nameser.h:148: error: syntax error before "uint16_t"
/usr/include/arpa/nameser.h:150: error: syntax error before "ttl"
/usr/include/arpa/nameser.h:151: error: syntax error before "rdlength"
/usr/include/arpa/nameser.h:152: error: syntax error before '*' token
/usr/include/arpa/nameser.h:153: error: syntax error before '}' token
/usr/include/arpa/nameser.h:233: error: syntax error before "uint8_t"
/usr/include/arpa/nameser.h:235: error: syntax error before "r_class"
/usr/include/arpa/nameser.h:236: error: syntax error before "r_type"
/usr/include/arpa/nameser.h:237: error: syntax error before "r_ttl"
/usr/include/arpa/nameser.h:238: error: syntax error before '*' token
/usr/include/arpa/nameser.h:239: error: syntax error before "r_size"
.
.
.

Is there a way to avoid the above errors?

Thanks

Last edited by runnerb; 03-22-2007 at 03:04 AM.. Reason: New errors
# 2  
Old 03-22-2007
Does anyone know how to resolve this?
# 3  
Old 03-22-2007
Quote:
modifying the source.
that's usually a clue!
unless you know what you are doing Smilie

I suggest cut back to the original and start again.
# 4  
Old 03-22-2007
Actually i just removed some assignment operations so the above mentioned error wouldn't come up. Cos the compiler says the code haven't ignored a void. So i don't think thats the problem. Here, the compiler generates a syntax error which is part of a common library API. Some say for some versions of glibc this error occurs when trying to compile network related libraries. I cannot download the latest version of glibc right now cos our network doesn't allow downloads larger than 5MB. But i can find a way to do that if there's some hope in doing it. Is there anyone who had a similar experience?
# 5  
Old 03-22-2007
As a guess, you have header problems - with the "void" thing. The other errors are just from program changes.

Semantics of some calls change - grep for "XOPEN_SOURCE" and "GNU_SOURCE" and "POSIX_SOURCE". Then consult the gcc info page on the solaris box to see what you have set if any of the above are in a "#define" statement.

It would also help A LOT if you posted a few lines of code where the error occurs.
gcc will point on the line number and module name with the problem.
# 6  
Old 03-22-2007
Oh. And UNIX is not Windows. Each "flavor" has differences, though not usually in POSIX (POSIX 1b is the IEEE's version of what UNIX base standard ought to be) system calls or in standard library calls. And Linux (FC 5, e.g.) is not always POSIX compliant. You can't just assume code that compiles on UNIX flavor A will automatically compile on UNIX flavor B. GNU extensions to C are definitely not
POSIX-compliant.
# 7  
Old 03-23-2007
Ok thanks for the info. I did grep for it. It doesn't contain anything for those words. The line that gives the error is given as:

#include <arpa/nameser.h>

Here are the lines in arpa/nameser.h:

typedef struct __ns_msg {
const uchar_t *_msg, *_eom; //line 124 where the first error occurs
uint16_t _id, _flags, _counts[ns_s_max];
const uchar_t *_sections[ns_s_max];
ns_sect _sect;
int _rrnum;
const uchar_t *_msg_ptr;
} ns_msg;
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Compiling automake-1.15 in Solaris 10 SPARC

Hi there. I have unzipped automake-1.15.tar.gz into a directory on my HDD that has Solaris 10 SPARC OS installed inside a SUN/Oracle SPARC server. I can configure automake-1.15 successfully but when I try to compile automake-1.15 using 'make command, I have the following error message.. ... (4 Replies)
Discussion started by: alphatron150
4 Replies

2. UNIX Benchmarks

error compiling bm software under Solaris 10

anyone tried it , under Solaris 10 using make (part of SUNWsprot) and gcc 4.6 compiler.. got an error complaining about the Makefile script syntax... I don't think that's compatible at all... (2 Replies)
Discussion started by: ppchu99
2 Replies

3. Solaris

Compiling Error in Samba 3.4.1 on Solaris 10

Hi all, I am getting the following error While installing Samba 3.4.1 on Solaris 10. #./autogen.sh ./autogen.sh : autoheader : not found ./autogen.sh : test : argument expected Please help me as I am in a critical state of the project. Warm regards, Sathya (10 Replies)
Discussion started by: sathya47
10 Replies

4. Programming

Sun Solaris C++ Compiling Error

Hello. I'm using SunStudio 12 Update 1. When compiling for x86, everything works fine. When compiling for SPARC, I get the following errors. I linked libCstd.so.1 explicitly, but I get the same errors. Would anyone be kind enough to step me through resolving this? Thank you very much. **... (2 Replies)
Discussion started by: acheong87
2 Replies

5. Solaris

problem compiling apache on solaris

Hi I'm trying to install apache 2.2.14 on Solaris with Openssl. I'm using following configure options: ./configure --prefix=/usr/local/apache2 --enable-ssl --enable-module=so --enable-proxy=shared --enable-proxy-http=shared --enable-proxy-ajp=shared --with-ssl=/usr/local/openssl ... (3 Replies)
Discussion started by: Aelfric
3 Replies

6. Infrastructure Monitoring

compiling netsnmp on solaris 8

Hello all Currently I am trying to install net-snmp-5.5 on a V480 Solaris 8 machine however things are hardly going smooth. I'm running configure will the following options. ./configure --prefix=/usr/local --with-mib-modules="smux ucd-snmp/diskio ucd-snmp/lmSensors host"... (2 Replies)
Discussion started by: krabu
2 Replies

7. Solaris

Compiling IRSSI on Solaris 10

How does one go aout compiling irssi locally on a fresh installation of Solaris 10, Out put from ./configure m command /download/1rss1-0.8.12 checking for a BSD-compatible install... ./install-sh -c checking whether build environment is sane... yes checking for gawk... no checking... (2 Replies)
Discussion started by: FloridaBSD
2 Replies

8. Solaris

Compiling and Running C Program on Solaris

Hello Guys, I am using Solaris Developer Express Edition 9/07, I am a beginner. Please tell me how to compile and execute a C program. Please give me your answers clearly, for the compilers cc,c89,c99. please....... reply to me. I not getting the answer anywhere.. Advance... (2 Replies)
Discussion started by: selva_ss
2 Replies

9. UNIX for Advanced & Expert Users

compiling php5 on solaris 9. please help.

I'm trying to compile PHP5. I've installed mysql5 successfully and apache1.3 is working great, but I get the message below when I compile PHP5. I double checked if I have libxml2 installed and I do. I installed libxml2 binary from sunfreeware. Please see below for details: ./configure... (5 Replies)
Discussion started by: xnightcrawl
5 Replies

10. Solaris

Error on compiling php for GD on SOLARIS 10

Hi everyone, I have SUn E250 server running solaris 10. I have installed apache 2 + MySQL + PHP-5.1.4 following the guidelines on this website http://meljr.com/~meljr/AMPSolaris10.html Excellent document for first time installation. Now, because I wanted to use Coppermine Photo Gallery, I... (9 Replies)
Discussion started by: callingrohit
9 Replies
Login or Register to Ask a Question