On Thu, 8 Feb 2007, Israel G. Lugo wrote:

> I was unable to reproduce the problem on Ubuntu Edgy, using libc6-dev
> 2.4-1ubuntu12.3 and linux-libc-dev 2.6.17.1-10.34. I downloaded the
> tar.gz from the URL you specified, and was able to successfully compile
> tun.c:
>
> ~/jnos2$ gcc --version
> gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
> Copyright (C) 2006 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.
>
> ~/jnos2$ gcc -DUNIX -g3 -DDEVELOPMENT -DDEBUG -W -Wimplicit -Wreturn-type 
> -Wswitch -Wpointer-arith -Wcast-qual -Wcast-align -Waggregate-return 
> -Wparentheses -I/usr/include/ncurses -DLCURSES=\"-lncurses\" -c -o tun.o tun.c
> ~/jnos2$ ls tun.o
> tun.o
> ~/jnos2$
>
> Looking at my /usr/include/linux/if.h file, it does not include
> <sys/socket.h>. In fact, it includes <linux/socket.h>, which does
> practically nothing because almost all the inclusions and definitions
> are inside the following #if block:
>
> #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
>
> None of those conditions are true when building the program, so the #if
> is never entered, so <linux/socket.h> does nothing (so there are no
> problems with redefining what JNOS already defined).
>
> Your file /usr/include/linux/if.h seems to differ from mine. Which
> version of linux-libc-dev do you have? (that is the package which owns
> the headers from the Linux kernel, including the files located inside
> /usr/include/linux).
>
  I don't have linux-libc-dev installed, and I do have libc6-dev version 
2.3.6-0ubuntu20.4 on the dapper system that is giving me the problem.

I've experienced this on sevetral dapper systems, but just for jollies, I 
started over on another dapper system, freshly updated with apt-get 
update;apt-get upgrade;apt-get dist-upgrade,then installing gcc4, 
build-essentials, and ncurses-dev.  I downloaded the latest tarball of 
jnos, and my first compile also failed with the multiple declaration 
error.
   Then I ran `mv /etc/apt/sources.list /etc/apt/sources.dapper; sed 
s/dapper/edgy/g /etc/apt/sources/dapper /etc/apt/sources.list`,
followed by `apt-get update; apt-get upgrade; apt-get dist-upgrade ; 
apt-get dist-upgrade`  Six hours later I was able to reboot into edgy, 
re-attempt the compile, and see it complete successfully!
   So apparently the problem was fixed sometime during the edgy development 
cycle. Hooray!

> I would recommend you file this bug to the creators of the program. This
> seems to be a problem with their code; they probably did not test it
> against the particular version of linux headers you are using, and/or
> glibc.
>
   According to the author:
Platforms successfully compiled, linked, and run on (so far) ...
Slackware 9.1 (my primary development environment) and Slackware 10.1 
(reported by Gaston, LU5AGQ)
Red Hat 9, Enterprise Linux WS and AS, Fedora Core 1, 2, 3, and 4
Debian 3.0r3 (reported by Michel, VE2BCW) and Debian 3.1 (reported by 
Rubn, EB5ESX)
Suse 9.2 (reported by Ian, G6VEY)
Mandrake 10.1 (reported by Larry, W5CQU)

Now compiles up to GCC versions 3.4.3 and 4.0.1

I have reported to him my problems with Ubuntu 5.10 and 6.06.  I'll also 
report my success with 6.10

-- 
Rick Green

"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."
                                   -Benjamin Franklin

-- 
Multiple definition of 'struct sockaddr'
https://launchpad.net/bugs/69838

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to