LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 07-22-2010, 11:44 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
How to compile tun driver


Hi!

I'm trying to compile tun driver for Solaris 5.10 (http://vtun.sourceforge.net/tun/tun-1.1.tar.gz)

I'm getting a ton of errors, but this error is being repeated hundreds of times so I think If I solve it I'll correct most of them so I can see what's left to solve:

Code:
tun.c: At top level:
tun.c:922: error: parse error before '*' token
tun.c: In function `tun_dlpi':
tun.c:924: error: `mp' undeclared (first use in this function)
tun.c:929: error: `wq' undeclared (first use in this function)
tun.c: At top level:
tun.c:968: error: parse error before '*' token
tun.c: In function `tunwput':
tun.c:978: error: `mp' undeclared (first use in this function)
tun.c:980: error: `wq' undeclared (first use in this function)
tun.c: At top level:
tun.c:1023: error: parse error before '*' token
tun.c: In function `tunwsrv':
tun.c:1025: error: `mp' undeclared (first use in this function)
tun.c:1032: error: `wq' undeclared (first use in this function)
tun.c: At top level:/usr/include/vm/page.h:822: warning: array `hw_page_array' assumed to have one element
tun.c:54: error: storage size of `tunminfo' isn't known
How can I solve it?
 
Old 07-22-2010, 02:51 PM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I came into the solaris directory and tried to compile whatever is in there.... here's the first error:

Code:
gcc -DTUN_VER=\"\"  -O2 -Wall -D_KERNEL -I. -c tun.c
In file included from /usr/include/sys/signal.h:34,
                 from /usr/include/sys/klwp.h:14,
                 from /usr/include/sys/thread.h:13,
                 from /usr/include/sys/semaphore.h:18,
                 from /usr/include/sys/t_lock.h:22,
                 from /usr/include/sys/conf.h:21,
                 from tun.c:22:
/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: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
What's going on?
 
Old 07-22-2010, 02:53 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
Code:
# gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
Old 07-22-2010, 08:13 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,490

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
This code just compiles just fine here with both Solaris 10 update 8 and OpenSolaris.
Code:
s10u8:/tmp # gunzip tun-1.1.tar.gz
s10u8:/tmp # tar xf tun-1.1.tar
s10u8:/tmp # cd tun-1.1
s10u8:/tmp/tun-1.1 # ./configure
creating cache ./config.cache
checking host system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking target system type... i386-pc-solaris2.10
checking build system type... i386-pc-solaris2.10
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for a BSD compatible install... ./install-sh -c
updating cache ./config.cache
creating ./config.status
creating Makefile
configuring in solaris
running /bin/sh ./configure  --cache-file=.././config.cache --srcdir=.
loading cache .././config.cache
checking for a BSD compatible install... ./../install-sh -c
creating ./config.status
creating Makefile
s10u8:/tmp/tun-1.1 # gcc --version
gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

s10u8:/tmp/tun-1.1 # make
cd solaris; make all
gcc -DTUN_VER=\"1.1\ 07/23/2010\" -O2 -Wall -D_KERNEL -I. -c tun.c
ld -r -o tun tun.o
s10u8:/tmp/tun-1.1 # ls -l */tun
-rw-r--r--   1 root     root        8956 Jul 23 03:07 solaris/tun
 
  


Reply

Tags
compile, solaris, tun


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tun/Tap driver - IPv4 in IPv6 the_ionic Linux - Networking 3 04-17-2010 07:48 PM
vnuml tun device /dev/net/tun not found. asalford Linux - Networking 1 01-30-2007 10:11 PM
Unable to install a Tun/Tap driver on a 2.6.18 kernel Slackware 11 Exterminator34 Slackware 4 12-01-2006 02:40 PM
adding tun to kernel and kernel compile gv_rajasekhar Linux - Kernel 2 09-10-2006 11:39 PM
Universal tun/tap device driver support giddyupman Linux - Networking 4 05-14-2004 10:04 AM


All times are GMT -5. The time now is 12:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration