public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Redefinition of `struct in6_addr'?
@ 2013-04-24 15:34 Max Balduino
  2013-04-24 15:44 ` Corinna Vinschen
  0 siblings, 1 reply; 5+ messages in thread
From: Max Balduino @ 2013-04-24 15:34 UTC (permalink / raw)
  To: cygwin-apps

Dear all,

Looks like there's something wrong here:

userwinemt@ioxp /usr/src/vpnc-0.5.2
$ make install
LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h
gcc -O3 -g -W -Wall -Wmissing-declarations -Wwrite-strings
-DVERSION=\"0.5.2\"   -c -o sysdep.o sysdep.c
In file included from /usr/include/cygwin/in.h:267,
                 from /usr/include/netinet/in.h:14,
                 from sysdep.h:23,
                 from sysdep.c:71:
/usr/include/cygwin/in6.h:76: error: redefinition of `struct in6_addr'

I'm compiling vpnc-0.5.2 on a fresh cygwin environment, just
downloaded from stable distribution. I'm using gcc version 3.4.4
(cygming special, gdc 0.12, using dmd 0.125). I've googled for it and
found a post reading "Problems with latest cygwin + latest sources"
that claims for the same error.

Anybody has seen this before or has a quick workaround, please?

Best Regards,
Max.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Redefinition of `struct in6_addr'?
  2013-04-24 15:34 Redefinition of `struct in6_addr'? Max Balduino
@ 2013-04-24 15:44 ` Corinna Vinschen
  2013-04-24 16:15   ` Max Balduino
  0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2013-04-24 15:44 UTC (permalink / raw)
  To: cygwin-apps

On Apr 24 17:34, Max Balduino wrote:
> Dear all,
> 
> Looks like there's something wrong here:
> 
> userwinemt@ioxp /usr/src/vpnc-0.5.2
> $ make install
> LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h
> gcc -O3 -g -W -Wall -Wmissing-declarations -Wwrite-strings
> -DVERSION=\"0.5.2\"   -c -o sysdep.o sysdep.c
> In file included from /usr/include/cygwin/in.h:267,
>                  from /usr/include/netinet/in.h:14,
>                  from sysdep.h:23,
>                  from sysdep.c:71:
> /usr/include/cygwin/in6.h:76: error: redefinition of `struct in6_addr'
> 
> I'm compiling vpnc-0.5.2 on a fresh cygwin environment, just
> downloaded from stable distribution. I'm using gcc version 3.4.4
> (cygming special, gdc 0.12, using dmd 0.125). I've googled for it and
> found a post reading "Problems with latest cygwin + latest sources"
> that claims for the same error.
> 
> Anybody has seen this before or has a quick workaround, please?

- You are not using the right mailing list for this kind of question.
  Use the cygwin AT cygwin DOT com list instead.

- You're using an old and outdated compiler.  Install the gcc4 package
  instead.

- You're missing to paste the entire error message.  Gcc usually prints
  where the clashing definition is defined, too.  But maybe that's just
  in gcc 4.x.

- Last but not least, a simple testcase would be helpful.

Without that I can only guess: The file includes winsock.h because
it wrongly treats Cygwin as Windows environment.  Don't do that.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Redefinition of `struct in6_addr'?
  2013-04-24 15:44 ` Corinna Vinschen
@ 2013-04-24 16:15   ` Max Balduino
  2013-04-24 16:35     ` Adam Dinwoodie
  0 siblings, 1 reply; 5+ messages in thread
From: Max Balduino @ 2013-04-24 16:15 UTC (permalink / raw)
  To: cygwin-apps

> On Apr 24 17:34, Max Balduino wrote:
>> Dear all,
>>
>> Looks like there's something wrong here:
>>
>> userwinemt@ioxp /usr/src/vpnc-0.5.2
>> $ make install
>> LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h
>> gcc -O3 -g -W -Wall -Wmissing-declarations -Wwrite-strings
>> -DVERSION=\"0.5.2\"   -c -o sysdep.o sysdep.c
>> In file included from /usr/include/cygwin/in.h:267,
>>                  from /usr/include/netinet/in.h:14,
>>                  from sysdep.h:23,
>>                  from sysdep.c:71:
>> /usr/include/cygwin/in6.h:76: error: redefinition of `struct in6_addr'
>>
>> I'm compiling vpnc-0.5.2 on a fresh cygwin environment, just
>> downloaded from stable distribution. I'm using gcc version 3.4.4
>> (cygming special, gdc 0.12, using dmd 0.125). I've googled for it and
>> found a post reading "Problems with latest cygwin + latest sources"
>> that claims for the same error.
>>
>> Anybody has seen this before or has a quick workaround, please?
>
> - You are not using the right mailing list for this kind of question.
>   Use the cygwin AT cygwin DOT com list instead.
>
> - You're using an old and outdated compiler.  Install the gcc4 package
>   instead.
>
> - You're missing to paste the entire error message.  Gcc usually prints
>   where the clashing definition is defined, too.  But maybe that's just
>   in gcc 4.x.
>
> - Last but not least, a simple testcase would be helpful.
>
> Without that I can only guess: The file includes winsock.h because
> it wrongly treats Cygwin as Windows environment.  Don't do that.
>
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Maintainer                 cygwin AT cygwin DOT com
> Red Hat

First of all thanks a *LOT* for your quick answer!

OK, sorry for having used the wrong mail-list! I re-compiled under gcc
version 4.5.3 (GCC) getting same result.

I'm trying to compile an app, that's why I was posting on cygwin-apps
AT cygwin DOT com. You can find it at
http://www.unix-ag.uni-kl.de/~massar/vpnc/ it's a cisco-compatible vpn
client.

I'm not sure what did you mean "a simple testcase would be helpful"?
If it's the piece of code, then Here it is:

from sysdep.h:

<code>
#ifndef __SYSDEP_H__
#define __SYSDEP_H__

/*
 * Different systems define different macros.
 * For vpnc, this list should be used as
 * reference:
 *
 * __linux__
 * __NetBSD__
 * __OpenBSD__
 * __FreeBSD__
 * __DragonFly__
 * __APPLE__      Darwin / MacOS X
 * __sun__        SunOS / Solaris
 * __CYGWIN__
 * __SKYOS__
 *
 */

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

#if !defined(__CYGWIN__)
#include <net/if.h>
#include <net/if_arp.h>
#include <netinet/if_ether.h>
#endif

#include "config.h"

int tun_open(char *dev, enum if_mode_enum mode);
int tun_close(int fd, char *dev);
int tun_write(int fd, unsigned char *buf, int len);
int tun_read(int fd, unsigned char *buf, int len);
int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);

/***************************************************************************/
#if defined(__linux__) || defined(__GLIBC__)
#include <error.h>

#define HAVE_VASPRINTF 1
#define HAVE_ASPRINTF  1
#define HAVE_ERROR     1
#define HAVE_GETLINE   1
#define HAVE_UNSETENV  1
#define HAVE_SETENV    1
#endif
...
</code>

As of the complete gcc error dump, here it also is:

userwinemt@ioxp /usr/src/vpnc-0.5.3
$ make install
gcc -O3 -g -W -Wall -Wmissing-declarations -Wwrite-strings
-DVERSION=\"0.5.3\"   -c -o sysdep.o sysdep.c
In file included from /usr/include/cygwin/in.h:267:0,
                 from /usr/include/netinet/in.h:14,
                 from sysdep.h:23,
                 from sysdep.c:71:
/usr/include/cygwin/in6.h:75:8: error: redefinition of ‘struct in6_addr’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/in6addr.h:17:16:
note: originally defined here
In file included from sysdep.h:31:0,
                 from sysdep.c:71:
config.h:131:83: warning: ‘struct debug_strings’ declared inside parameter list
config.h:131:83: warning: its scope is only this definition or
declaration, which is probably not what you want
sysdep.c: In function ‘search_if’:
sysdep.c:216:4: warning: pointer targets in passing argument 5 of
‘RegQueryValueExA’ differ in signedness
/usr/include/w32api/winreg.h:183:25: note: expected ‘LPBYTE’ but
argument is of type ‘char *’
sysdep.c: In function ‘tun_open’:
sysdep.c:392:4: warning: pointer targets in passing argument 5 of
‘RegQueryValueExA’ differ in signedness
/usr/include/w32api/winreg.h:183:25: note: expected ‘LPBYTE’ but
argument is of type ‘char *’
sysdep.c:400:4: warning: pointer targets in passing argument 5 of
‘RegQueryValueExA’ differ in signedness
/usr/include/w32api/winreg.h:183:25: note: expected ‘LPBYTE’ but
argument is of type ‘char *’
<builtin>: recipe for target `sysdep.o' failed
make: *** [sysdep.o] Error 1

As I told, this is not my own code. I could check if it compiles on
debian Wheezy, if you think it's worth...

BR,
Max.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Redefinition of `struct in6_addr'?
  2013-04-24 16:15   ` Max Balduino
@ 2013-04-24 16:35     ` Adam Dinwoodie
  2013-04-24 18:59       ` Christopher Faylor
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Dinwoodie @ 2013-04-24 16:35 UTC (permalink / raw)
  To: cygwin-apps

Max Balduino wrote:
> OK, sorry for having used the wrong mail-list!

If you're sorry, don't do it again!

> I'm trying to compile an app, that's why I was posting on cygwin-apps
> AT cygwin DOT com.

From <http://cygwin.com/lists.html>: cygwin-apps is "for discussing packaging
issues regarding applications that are distributed with the Cygwin DLL."

Take this to the main Cygwin mailing list, where this belongs.

-- 
Adam Dinwoodie

Messages posted to this list are made in a personal capacity.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Redefinition of `struct in6_addr'?
  2013-04-24 16:35     ` Adam Dinwoodie
@ 2013-04-24 18:59       ` Christopher Faylor
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2013-04-24 18:59 UTC (permalink / raw)
  To: cygwin-apps

On Wed, Apr 24, 2013 at 04:35:15PM +0000, Adam Dinwoodie wrote:
>Max Balduino wrote:
>> OK, sorry for having used the wrong mail-list!
>
>If you're sorry, don't do it again!
>
>> I'm trying to compile an app, that's why I was posting on cygwin-apps
>> AT cygwin DOT com.
>
From <http://cygwin.com/lists.html>: cygwin-apps is "for discussing packaging
>issues regarding applications that are distributed with the Cygwin DLL."
>
>Take this to the main Cygwin mailing list, where this belongs.

F Everyone's I, I usually unsubscribe people who post here incorrectly.  I've
just done that for the OP to remove his temptation.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-24 18:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-24 15:34 Redefinition of `struct in6_addr'? Max Balduino
2013-04-24 15:44 ` Corinna Vinschen
2013-04-24 16:15   ` Max Balduino
2013-04-24 16:35     ` Adam Dinwoodie
2013-04-24 18:59       ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).