[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not compile on Msys2 (20200720) #111

Open
tidawsiwin opened this issue Aug 1, 2020 · 6 comments
Open

Can not compile on Msys2 (20200720) #111

tidawsiwin opened this issue Aug 1, 2020 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@tidawsiwin
Copy link

Hello, I want to compile the last stable version (release 1.2 ) with the last Msys2 but there is some issue about that.
First it do not reconize the ./configure command.
1

but after ranning autoconf it shows me error on configure.ac
2

So !!! Any help !??

@troglobit
Copy link
Collaborator

What was the name of the archive you downloaded? GitHub has this bad habit of automatically creating source code zip/tarballs which are just snapshots from the GIT tag. These do not include files like configure/Makefile.in etc. that are generated and not stored in git. Please download one of the versioned archive files from https://github.com/libnet/libnet/releases/tag/v1.2

@tidawsiwin
Copy link
Author
tidawsiwin commented Aug 2, 2020

Yep, I compiled it thanks, but I do have to change this in libnet-structures.h
`
/* libnet statistics structure /
struct libnet_stats
{
/
this nnot wor /
/
__int64_t packets_sent; /* packets sent /
/
__int64_t packet_errors; /* packets errors /
/
__int64_t bytes_written; /* bytes written /
/
this YES /
int64_t packets_sent; /
packets sent /
int64_t packet_errors; /
packets errors /
int64_t bytes_written; /
bytes written */
};

`

@tidawsiwin tidawsiwin reopened this Aug 2, 2020
@troglobit
Copy link
Collaborator

Could you please attach the full build logs, including config.log. If possible someone else with a working msys2 setup can help reproduce the problem, and only way to do that is to, at the very least, see the full compiler output from the build. For more help it is sometimes required to build with make V=1 to see the full arguments to the compiler.

@tidawsiwin
Copy link
Author
tidawsiwin commented Aug 8, 2020

Hello this is a config.log
config.log

And this is a compiling log by default without changing anything.

BSaidus@UCCEN MINGW32 ~/lnet/libnet-1.2
$ make V=1
Making all in include
make  all-am
Making all in src
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -I../include -I./../include   -O2 -Wall -I/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include -march=i686 -mwin32 -c -o libnet_asn1.lo libnet_asn1.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I./../include -O2 -Wall -I/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include -march=i686 -mwin32 -c libnet_asn1.c  -DDLL_EXPORT -DPIC -o .libs/libnet_asn1.o
In file included from common.h:37,
                 from libnet_asn1.c:56:
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:306:37: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  306 | int pcap_setfilter(pcap_t *, struct bpf_program *);
      |                                     ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:316:35: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  316 | int pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
      |                                   ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:318:42: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  318 | int pcap_compile_nopcap(int, int, struct bpf_program *,
      |                                          ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:320:27: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  320 | void pcap_freecode(struct bpf_program *);
      |                           ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:321:32: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  321 | int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *,
      |                                ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:354:31: warning: 'struct bpf_insn' declared inside parameter list will not be visible outside of this definition or declaration
  354 | u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
      |                               ^~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:355:31: warning: 'struct bpf_insn' declared inside parameter list will not be visible outside of this definition or declaration
  355 | int bpf_validate(const struct bpf_insn *f, int len);
      |                               ^~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:356:30: warning: 'struct bpf_insn' declared inside parameter list will not be visible outside of this definition or declaration
  356 | char *bpf_image(const struct bpf_insn *, int);
      |                              ^~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:357:28: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  357 | void bpf_dump(const struct bpf_program *, int);
      |                            ^~~~~~~~~~~
In file included from ../include/libnet.h:107,
                 from common.h:63,
                 from libnet_asn1.c:56:
../include/./libnet/libnet-structures.h:52:5: error: unknown type name '__int64_t'
   52 |     __int64_t packets_sent;               /* packets sent */
      |     ^~~~~~~~~
../include/./libnet/libnet-structures.h:53:5: error: unknown type name '__int64_t'
   53 |     __int64_t packet_errors;              /* packets errors */
      |     ^~~~~~~~~
../include/./libnet/libnet-structures.h:54:5: error: unknown type name '__int64_t'
   54 |     __int64_t bytes_written;              /* bytes written */
      |     ^~~~~~~~~
make[1]: *** [Makefile:549: libnet_asn1.lo] Error 1
make: *** [Makefile:552: all-recursive] Error 1

and this is a log when change is made ( this is a portion of log not full log )

BSaidus@UCCEN MINGW32 ~/lnet/libnet-1.2
$ make V=1 >> compile.libnet.log
In file included from common.h:37,
                 from libnet_build_802.1x.c:33:
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:306:37: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  306 | int pcap_setfilter(pcap_t *, struct bpf_program *);
      |                                     ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:316:35: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  316 | int pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
      |                                   ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:318:42: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  318 | int pcap_compile_nopcap(int, int, struct bpf_program *,
      |                                          ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:320:27: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  320 | void pcap_freecode(struct bpf_program *);
      |                           ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:321:32: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  321 | int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *,
      |                                ^~~~~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:354:31: warning: 'struct bpf_insn' declared inside parameter list will not be visible outside of this definition or declaration
  354 | u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
      |                               ^~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:355:31: warning: 'struct bpf_insn' declared inside parameter list will not be visible outside of this definition or declaration
  355 | int bpf_validate(const struct bpf_insn *f, int len);
      |                               ^~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:356:30: warning: 'struct bpf_insn' declared inside parameter list will not be visible outside of this definition or declaration
  356 | char *bpf_image(const struct bpf_insn *, int);
      |                              ^~~~~~~~
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:357:28: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  357 | void bpf_dump(const struct bpf_program *, int);
      |                            ^~~~~~~~~~~
In file included from common.h:37,
                 from libnet_build_802.2.c:33:
C:/msys64/home/BSaidus/lnet/libnet-1.2/win32/wpdpack/Include/pcap/pcap.h:306:37: warning: 'struct bpf_program' declared inside parameter list will not be visible outside of this definition or declaration
  306 | int pcap_setfilter(pcap_t *, struct bpf_program *);
      |                                     ^~~~~~~~~~~
....

@tidawsiwin
Copy link
Author

Finally.
Is there any thing to do to exclude the 'libgcc_s_dw2-1.dll' from this dependencies of the DLL

depview

@troglobit
Copy link
Collaborator

See also #119. We need someone with Windows expertise to look at this.

@troglobit troglobit added the help wanted Extra attention is needed label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

2 participants