libnet does not compile on Solaris 9


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers libnet does not compile on Solaris 9
# 1  
Old 10-28-2005
libnet does not compile on Solaris 9

Hi


I'm trying to compile libnet in Solaris 9, but it seems to have syntax errors. I got it from www.packetfactory.net/libnet/ which is the address the computer suggested me to download it.

I downloaded the 1.1.2.1 version which is supposed to be stable

Anybody knows if the code has errors?? or is it that I'm missing something to compile it??

the output is in the attachment

thanks
# 2  
Old 10-31-2005
There are errors in the header file. The most likely cause is that you have an incorrect version of a header - a version mismatch.

Also be sure you download the stable production version not the newest "alpha-test" version.
# 3  
Old 11-01-2005
Hi I downloaded the 1.1.2.1 version which is stable and it shows the same errors as before...

by looking at one of the libraries (libnet-types.h) I found the following:

#ifndef __LIBNET_TYPES_H
#define __LIBNET_TYPES_H

/* Solaris has messed up POSIX nomenclature for these */
#if (__sun__ && __svr4__)
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
#endif

#endif /* __LIBNET_TYPES_H */


what does the part in bold mean?? what should I do then to fix this for solaris???
# 4  
Old 11-01-2005
I'm guessing based on what you've said.

Code:
/* Solaris has messed up POSIX nomenclature for these */
#if (__sun__ && __svr4__)       <----------  remove this line make it: /* #if (__sun__ && __svr4__) */
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
#endif               <---------remove this line make it: /* #endif */

It looks like the statements inside the if block are not being #defined.

Those changes are called commenting out a line of C code.
If you make those changes and it does not help, then go back in and revert the changes.

What it means is that the typedef statements in a file /usr/include/sys/types.h
are not like they are on other POSIX-compliant systems. Welcome to the wonderful world of porting code in unix. DO NOT change /usr/include/sys/types.h !!

Can you download binaries for Solaris?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Samba compile issue on Solaris 9

Hi all :) I've been given a task to try and upgrade Samba on our legacy Solaris 9 (SunOS 5.9) sparc system. Its currently running samba 3.5.3 but we'd like to try and install 3.6.0 (or 3.6.25) to have minimal protocol smbv2. When trying to install from source, it appears to configure fine,... (4 Replies)
Discussion started by: jimbob01
4 Replies

2. Programming

nss compile on solaris 10

so I am trying to build "directory server 389" on solaris 10. I am using this as i guide: 389 Directory Server (Open Source LDAP) I am using solaria studio as my compiler. I built NSPR with no issues. the problem is NSS (Network Security Services) I simply can't find instruction... (0 Replies)
Discussion started by: robsonde
0 Replies

3. Solaris

Compile php with curl on solaris 10 question

I have curl compiled into /usr/local. I needed to install another version into /usr/local/curl-7.19.5 and compile php using that directory. I believe I had done that but an ldd run against php shows it is using /usr/local/lib. I have my configure script below showing how it was built and php -i... (1 Reply)
Discussion started by: csgonan
1 Replies

4. Solaris

Compile issues on Core Solaris 10

Hello All! I am trying to compile sudo-1.7.2p1 on Solaris 10 (Core Install). I get the follow error when I run "./configure": checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in /usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin:/usr/xpg4/bin I... (5 Replies)
Discussion started by: pingmeback
5 Replies

5. Solaris

Compile errors on Solaris 10 (missing libwrap)

I'm trying to compile tacacs+-F4.0.4.18 on Solaris 10 (sparc based server). It fails during the "./configure" phase with the following error: checking whether to use libwrap... yes configure: error: Could not find libwrap. You must first install tcp_wrappers. I do a have tcpwrappers... (4 Replies)
Discussion started by: pingmeback
4 Replies

6. Programming

Compile c program on Sun Solaris OS

Can anyone tell me how to compile a c programs on SunSolaris OS 5.1 Version as gcc and cc are not working Thanks!!!! (4 Replies)
Discussion started by: shivu
4 Replies

7. Solaris

Compile Scilab 5.0.2 on Solaris 9

Hello, I'm trying to build scilab 5.0.2 on a Solaris 9 Sparc After more than one hour of compiling, this error msg appear, what could be the problem? if you need any more info i'm here. Thanks for your help. Error msg :... (0 Replies)
Discussion started by: wolfhurt
0 Replies

8. Programming

Compile and Run 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. I not getting the answer anywhere. Please....... reply to me. Advance thanks......... (0 Replies)
Discussion started by: selva_ss
0 Replies

9. Programming

How compile a library on solaris(like dll in windows)

Hi all, how do i compile a c program into a library on solaris Thanks in advance Zing (3 Replies)
Discussion started by: zing
3 Replies
Login or Register to Ask a Question