Comments (20)
Did you notice the > link.tmp'
at the end? Look inside it for a clue.
from wsock-trace.
I think I got hit by the same issue; the %WSOCK_TRACE_LEVEL%
must be below 2.
Try this patch:
--- a/src/Makefile.vc6
+++ b/src/Makefile.vc6
@@ -134,10 +134,10 @@ geoip2.exe: geoip.c common.c in_addr.c init.c getopt.c geoip-gen4.c geoip-gen6.c
del common.obj geoip.obj getopt.obj init.obj in_addr.obj
geoip-gen4.c: geoip.exe
- geoip.exe -g4 > $@
+ (set WSOCK_TRACE_LEVEL=0 & geoip.exe -g4) > $@
geoip-gen6.c: geoip.exe
- geoip.exe -g6 > $@
+ (set WSOCK_TRACE_LEVEL=0 & geoip.exe -g6) > $@
run_test: test.exe
test.exe -dd
until I figure out a better fix.
from wsock-trace.
hmm let me try. Out of curiosity, what does this option do?
-DUSE_GEOIP_GENERATED
from wsock-trace.
still nothing...
here is the content of link.tmp:
C:\Users\Ali\projects\wsock-trace\src>cat link.tmp
geoip.c
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(1): error C2143: syntax error: missing '{' before '->'
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(1): error C2059: syntax error: '->'
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(4): warning C4129: 'A': unrecognized character escape sequence
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(4): warning C4129: 'g': unrecognized character escape sequence
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(5): warning C4129: 'A': unrecognized character escape sequence
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(5): warning C4129: 'g': unrecognized character escape sequence
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(108666): error C2065: 'ipv4_gen_array': undeclared identifier
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(108666): error C2109: subscript requires array or pointer type
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(108666): error C2198: 'smartlist_new_fixed': too few arguments for call
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(1): error C2143: syntax error: missing '{' before '->'
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(1): error C2059: syntax error: '->'
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(4): warning C4129: 'A': unrecognized character escape sequence
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(4): warning C4129: 'g': unrecognized character escape sequence
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(5): warning C4129: 'A': unrecognized character escape sequence
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(5): warning C4129: 'g': unrecognized character escape sequence
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(63316): error C2065: 'ipv6_gen_array': undeclared identifier
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(63316): error C2109: subscript requires array or pointer type
c:\users\ali\projects\wsock-trace\src\geoip-gen6.c(63316): error C2198: 'smartlist_new_fixed': too few arguments for call
geoip.c(1753): warning C4996: 'isatty': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _isatty. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\corecrt_io.h(489): note: see declaration of 'isatty'
common.c
in_addr.c
init.c
getopt.c
Generating Code...
from wsock-trace.
It should improve the speed for looking up an address->country. But I'm not sure it's worth it.
See:
#if defined(USE_GEOIP_GENERATED)
#include "geoip-gen4.c"
#include "geoip-gen6.c"
#endif
The above files contains generated fixed arrays of addresses and are included for building geoip2.exe
only.
from wsock-trace.
c:\users\ali\projects\wsock-trace\src\geoip-gen4.c(1): error C2143: syntax error: missing '{' before '->'
The same issue I had. Apply the above patch or do set WSOCK_TRACE_LEVEL=1
.
from wsock-trace.
can I revert the changes to the makefile back before applying the fix?
from wsock-trace.
No sure what changes you mean. Anyway, I've pushed the above change. Just do a git pull
.
from wsock-trace.
I did. But still no luck. Is it working for you? link.tmp gives the same output
from wsock-trace.
Did you delete the geoip-gen*.c
first?
from wsock-trace.
yes i did
from wsock-trace.
Ok. In your ~/wsock_trace
set this:
[core]
trace_level = 2
Or as I do can be more handy:
[core]
trace_level = %WSOCK_TRACE_LEVEL%
E.g. if you call wsock_trace
programs from .bat
-files. Like curl.bat
:
@setlocal
@set WSOCK_TRACE_LEVEL=0
@c:\net\cURL\src\curl.exe %*
from wsock-trace.
the tracelevel is set to 2 by default.
I just went ahead and tried to build it again using a fresh git clone. But I am getting the same error.
from wsock-trace.
Then what does the start of geoip-gen*.c
look like? Must be the trace_level > 1
.
I think I'll add an option to handle --outfile=geoip-gen4.c
instead.
from wsock-trace.
geoip-gen4.c:
opt->MajorLinkerVersion: 14, opt->MinorLinkerVersion: 0
opt->MajorLinkerVersion: 14, opt->MinorLinkerVersion: 0
opt->MajorLinkerVersion: 14, opt->MinorLinkerVersion: 0, wild_tstamp: 0
Parsed 108646 IPv4 records from "C:\Users\Ali\geoip".
Parsed 31648 IPv6 records from "C:\Users\Ali\geoip6".
g_cfg.screen_width: 9999, g_cfg.screen_heigth: 0, g_cfg.stdout_redirected: 1
g_cfg.trace_file_okay: 0, g_cfg.trace_file_device: 1
CPU speed: 1.169 MHz
/*
* This file was generated at Fri Nov 25 01:37:49 2016.
* by the Makefile command: "geoip.exe -g4 > geoip-gen4.c"
* DO NOT EDIT!
*/
from wsock-trace.
if these lines in geoip-gen*.c
are treated as comments, the build suceeds:
opt->MajorLinkerVersion: 14, opt->MinorLinkerVersion: 0
opt->MajorLinkerVersion: 14, opt->MinorLinkerVersion: 0
opt->MajorLinkerVersion: 14, opt->MinorLinkerVersion: 0, wild_tstamp: 0
from wsock-trace.
But those trace-lines are printed at trace_level >= 2
. E.g.
TRACE (2, "CPU speed: %.3f MHz\n", (double)rc.QuadPart / 1E6);
As I wrote earlier, the default trace_level = 1
in [core]
now.
But I'm writing a patch to generate the geoip-gen*.c
files using geoip.exe -4g <file>
instead.
from wsock-trace.
But I'm writing a patch to generate the geoip-gen*.c files using geoip.exe -4g instead.
Now I've done that. Please try after another git pull
.
from wsock-trace.
yes! works perfectly
from wsock-trace.
Close issue since this patch fixed it: 7dc07f1
from wsock-trace.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wsock-trace.