Hello,
is it possible to compile/run Redis on cygwin ? I'm on Win7 64 bits. I tried to launch make command but it fails with both Redis versions 3.0.7 & 3.2.4 :
Error for 3.2.4: LINK redis-server cc: erreur : ../deps/hiredis/libhiredis.a: No such file or directory cc: erreur : ../deps/lua/src/liblua.a: No such file or directory cc: erreur : ../deps/geohash-int/geohash.o: No such file or directory cc: erreur : ../deps/geohash-int/geohash_helper.o: No such file or directory make[1]: * [Makefile:175: redis-server] Error 1 make[1] : on quitte le répertoire « /cygdrive/c/Progs/redis-3.2.4/src » make: * [Makefile:6: all] Error 2
thanks for your help.
Comment From: mgravell
For info, Redis-64 is up to 3.0.503: https://www.nuget.org/packages/Redis-64/ or https://chocolatey.org/packages/redis-64
If you were on Windows 10 you cold also try the linux subsystem for windows, although IIRC that has performance issues with Redis. It is more intended for tools rather than servers.
Marc
On 3 October 2016 at 16:58, rcb73 notifications@github.com wrote:
Hello,
is it possible to compile/run Redis on cygwin ? I'm on Win7 64 bits. I tried to launch make command but it fails with both Redis versions 3.0.7 & 3.2.4 :
Error for 3.2.4:
_LINK redis-server cc: erreur : ../deps/hiredis/libhiredis.a: No such file or directory cc: erreur : ../deps/lua/src/liblua.a: No such file or directory cc: erreur : ../deps/geohash-int/geohash.o: No such file or directory cc: erreur : ../deps/geohash-int/geohash_helper.o: No such file or directory make[1]: _* [Makefile:175: redis-server] Error 1 make[1] : on quitte le répertoire « /cygdrive/c/Progs/redis-3.2.4/src » make: *** [Makefile:6: all] Error 2
thanks for your help.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/antirez/redis/issues/3536, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDsNS4H3-xJVXDfKnvYEqBhq-WVdgAks5qwSY9gaJpZM4KMvjE .
Regards,
Marc
Comment From: Caislen
I have encountered the same problem on a number of platforms, including Cygwin and Solaris x86, but have not yet gone into enough details to solve it. Your workaround for now is to go to the dependency folder and build explicitly build them.
cd deps
make hiredis
make lua
make geohash
Comment From: mgravell
For development purposes, on Windows 10 you can also use "Bash on Ubuntu on Windows" (aka the linux subsystem for Windows) - works ok with redis latest. Performance isn't as great as you'd want for production, but fine for feature testing. Plus it actually helps me to have a slow server when developing :)
On 18 November 2016 at 09:51, Gurubashi notifications@github.com wrote:
I have encountered the same problem on a number of platforms, including Cygwin and Solaris x86, but have not yet gone into enough details to solve it. Your workaround for now is to go to the dependency folder and build explicitly build them.
cd deps make hiredis make lua make geohash
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/antirez/redis/issues/3536#issuecomment-261491449, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDsNHlhp0iTtKXjr_bqtWuFmamAsXMks5q_XUpgaJpZM4KMvjE .
Regards,
Marc
Comment From: antirez
Thanks Marc, I was wondering about that indeed. Cool that Redis works well with Windows 10 bash.
On Nov 18, 2016 5:44 PM, "Marc Gravell" notifications@github.com wrote:
For development purposes, on Windows 10 you can also use "Bash on Ubuntu on Windows" (aka the linux subsystem for Windows) - works ok with redis latest. Performance isn't as great as you'd want for production, but fine for feature testing. Plus it actually helps me to have a slow server when developing :)
On 18 November 2016 at 09:51, Gurubashi notifications@github.com wrote:
I have encountered the same problem on a number of platforms, including Cygwin and Solaris x86, but have not yet gone into enough details to solve it. Your workaround for now is to go to the dependency folder and build explicitly build them.
cd deps make hiredis make lua make geohash
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/antirez/redis/issues/3536#issuecomment-261491449, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDsNHlhp0iTtKXjr_ bqtWuFmamAsXMks5q_XUpgaJpZM4KMvjE .
Regards,
Marc
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/antirez/redis/issues/3536#issuecomment-261579502, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEAYFO50kk5okqzWvDUTM-TtpRHPrpeks5q_dYCgaJpZM4KMvjE .
Comment From: kyleus
I was able to get Redis 3.2.8 building in Cygwin 6.1 on Windows 7. I applied the diff on this page to hiredis/net.c and the Makefile. After applying the changes I was able to build the deps, and then redis.
Comment From: MatteoRagni
Just refreshing this issue with an update, in case someone is interested.
I'm testing CygWIN64 (Setup version 2.905 64bit) compiling Redis with the following dependencies installed:
gcc-core10.2.0-1make4.3-1procps-ng3.3.16-1tcl8.6.8-1pkg-config1.6.3-1
The running SW/HW:
- Windwos 10 Pro x64 version 1909 (Build 18363.1139)
- Intel Core i7-8750H 2.20GHz
- RAM 32GB
I'm running tests for
- tag version 6.0.9
- unstable at commit dd1f20e
Compilation and tests are done with the following commands:
make
make test
While tag version compiles and can run the test (even if with some failures), the unstable version has errors in compilation.
Version 6.0.9
Execution time of different units:
5 seconds - unit/printver
6 seconds - unit/type/incr
7 seconds - unit/keyspace
11 seconds - unit/auth
12 seconds - unit/protocol
6 seconds - unit/quit
9 seconds - unit/multi
20 seconds - unit/type/stream-cgroups
29 seconds - unit/type/hash
25 seconds - unit/expire
32 seconds - unit/type/list
25 seconds - unit/other
32 seconds - unit/type/string
36 seconds - unit/type/set
37 seconds - unit/scan
17 seconds - unit/acl
39 seconds - unit/sort
58 seconds - unit/type/list-3
0 seconds - integration/logging
60 seconds - unit/type/zset
17 seconds - integration/convert-zipmap-hash-on-load
61 seconds - unit/type/list-2
38 seconds - integration/block-repl
55 seconds - unit/latency-monitor
7 seconds - unit/pubsub
45 seconds - integration/replication-2
7 seconds - unit/slowlog
25 seconds - integration/redis-cli
7 seconds - unit/introspection
6 seconds - unit/limits
11 seconds - unit/introspection-2
41 seconds - integration/psync2-reg
70 seconds - integration/aof
13 seconds - unit/bitops
115 seconds - unit/type/stream
25 seconds - unit/bitfield
127 seconds - unit/dump
96 seconds - integration/replication-4
20 seconds - unit/memefficiency
100 seconds - integration/replication-3
7 seconds - unit/lazyfree
1 seconds - unit/oom-score-adj
76 seconds - integration/psync2
5 seconds - unit/tls
7 seconds - unit/tracking
81 seconds - integration/psync2-pingoff
67 seconds - unit/scripting
106 seconds - integration/rdb
17 seconds - unit/wait
13 seconds - unit/shutdown
21 seconds - unit/pendingquerybuf
56 seconds - unit/geo
152 seconds - unit/aofrw
59 seconds - unit/hyperloglog
135 seconds - unit/maxmemory
170 seconds - unit/obuf-limits
391 seconds - integration/replication-psync
424 seconds - integration/replication
4 seconds - defrag
!!! WARNING The following tests failed:
*** [err]: Protocol desync regression test #1 in tests/unit/protocol.tcl
Expected '*Protocol error*' to equal or match ''
*** [err]: Protocol desync regression test #2 in tests/unit/protocol.tcl
Expected '*Protocol error*' to equal or match ''
*** [err]: Protocol desync regression test #3 in tests/unit/protocol.tcl
Expected '*Protocol error*' to equal or match ''
*** [err]: BRPOPLPUSH does not affect WATCH while still blocked in tests/unit/type/list.tcl
Expected 'somevalue' to equal or match ''
*** [err]: ACL load and save in tests/unit/acl.tcl
Expected 'error reading "sock800132150": software caused connection abort' to match '*I/O error*' (context: type eval line 8 cmd {assert_match {*I/O error*} $e} proc ::test)
*** [err]: Blocking XREAD waiting new data in tests/unit/type/stream.tcl
Expected [lindex 0 0] eq {s2} (context: type eval line 7 cmd {assert {[lindex $res 0 0] eq {s2}}} proc ::test)
*** [err]: PUBLISH/SUBSCRIBE after UNSUBSCRIBE without arguments in tests/unit/pubsub.tcl
Expected '0' to be equal to '1' (context: type eval line 5 cmd {assert_equal 0 [r publish chan1 hello]} proc ::test)
*** [err]: FLUSHALL should replicate in tests/integration/replication.tcl
Expected '0 0' to equal or match '0 1'
Compilation error on unstable
cd src && make all
make[1]: Entering directory '/cygdrive/c/Users/MatteoRagni/workspace/redis/redis-unstable/src'
CC debug.o
debug.c: In function ‘dumpX86Calls’:
debug.c:1679:5: error: unknown type name ‘Dl_info’
1679 | Dl_info info;
| ^~~~~~~
debug.c:1689:13: warning: implicit declaration of function ‘dladdr’; did you mean ‘s_addr’? [-Wimplicit-function-declaration]
1689 | if (dladdr((void*)target, &info) != 0 && info.dli_sname != NULL) {
| ^~~~~~
| s_addr
debug.c:1689:54: error: request for member ‘dli_sname’ in something not a structure or union
1689 | if (dladdr((void*)target, &info) != 0 && info.dli_sname != NULL) {
| ^
debug.c:1691:63: error: request for member ‘dli_sname’ in something not a structure or union
1691 | printf("Function at 0x%lx is %s\n",target,info.dli_sname);
| ^
debug.c: In function ‘dumpCodeAroundEIP’:
debug.c:1700:5: error: unknown type name ‘Dl_info’
1700 | Dl_info info;
| ^~~~~~~
debug.c:1709:17: error: request for member ‘dli_sname’ in something not a structure or union
1709 | info.dli_sname, info.dli_saddr, info.dli_fname, info.dli_fbase,
| ^
debug.c:1709:33: error: request for member ‘dli_saddr’ in something not a structure or union
1709 | info.dli_sname, info.dli_saddr, info.dli_fname, info.dli_fbase,
| ^
debug.c:1709:49: error: request for member ‘dli_fname’ in something not a structure or union
1709 | info.dli_sname, info.dli_saddr, info.dli_fname, info.dli_fbase,
| ^
debug.c:1709:65: error: request for member ‘dli_fbase’ in something not a structure or union
1709 | info.dli_sname, info.dli_saddr, info.dli_fname, info.dli_fbase,
| ^
debug.c:1710:17: error: request for member ‘dli_saddr’ in something not a structure or union
1710 | info.dli_saddr);
| ^
debug.c:1711:44: error: request for member ‘dli_saddr’ in something not a structure or union
1711 | size_t len = (long)eip - (long)info.dli_saddr;
| ^
debug.c:1717:38: error: request for member ‘dli_saddr’ in something not a structure or union
1717 | void *base = (void *)info.dli_saddr;
| ^
make[1]: *** [Makefile:344: debug.o] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/MatteoRagni/workspace/redis/redis-unstable/src'
make: *** [Makefile:6: all] Error 2
Even if Windows is not a target for the project, I hope this is still helpful for people that need Redis on Windows and cannot use WSL.
Comment From: MatteoRagni
Just an update on redis unstable dd1f20e. To compile it I had to define at the very begin of debug.c:
#define _GNU_SOURCE
to compile it successfully, but one of the test causes a bug report output on test
[exception]: Executing test client: I/O error reading reply.
that I'm reporting
=== REDIS BUG REPORT START: Cut & paste starting from here ===
2662:S 11 Nov 2020 13:47:57.511 # Redis 255.255.255 crashed by signal: 11, si_code: 24
2662:S 11 Nov 2020 13:47:57.511 # Accessing address: 0xffffffffffffffff
2662:S 11 Nov 2020 13:47:57.511 # Killed by PID: 2662, UID: 4096
------ INFO OUTPUT ------
# Server
redis_version:255.255.255
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:e266b88914786a20
redis_mode:standalone
os:CYGWIN_NT-10.0-18363 3.1.7-340.x86_64 x86_64
arch_bits:64
multiplexing_api:select
atomicvar_api:atomic-builtin
gcc_version:10.2.0
process_id:2662
run_id:412f0c4870afc2e10d7b96085b36797a33c02832
tcp_port:27614
uptime_in_seconds:2
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:11263357
executable:/cygdrive/c/Users/MatteoRagni/workspace/redis/redis-unstable/src/redis-server
config_file:/cygdrive/c/Users/MatteoRagni/workspace/redis/redis-unstable/./tests/tmp/redis.conf.1397.8
io_threads_active:0
# Clients
connected_clients:1
cluster_connections:0
maxclients:3168
client_recent_max_input_buffer:10
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
clients_in_timeout_table:0
# Memory
used_memory:576881
used_memory_human:563.36K
used_memory_rss:539176
used_memory_rss_human:526.54K
used_memory_peak:11026482
used_memory_peak_human:10.52M
used_memory_peak_perc:5.23%
used_memory_overhead:500325
used_memory_startup:480873
used_memory_dataset:76556
used_memory_dataset_perc:79.74%
allocator_allocated:539176
allocator_active:494120
allocator_resident:494120
total_system_memory:0
total_system_memory_human:0B
used_memory_lua:45056
used_memory_lua_human:44.00K
used_memory_scripts:2322
used_memory_scripts_human:2.27K
number_of_cached_scripts:16
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:0.92
allocator_frag_bytes:18446744073709506560
allocator_rss_ratio:1.00
allocator_rss_bytes:0
rss_overhead_ratio:1.09
rss_overhead_bytes:45056
mem_fragmentation_ratio:1.00
mem_fragmentation_bytes:0
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:17058
mem_aof_buffer:0
mem_allocator:libc
active_defrag_running:0
lazyfree_pending_objects:0
# Persistence
loading:1
rdb_changes_since_last_save:10093
rdb_bgsave_in_progress:0
rdb_last_save_time:1605098877
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:0
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0
aof_current_size:285
aof_base_size:285
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0
loading_start_time:1605098877
loading_total_bytes:285
loading_rdb_used_mem:537365
loading_loaded_bytes:98
loading_loaded_perc:34.39
loading_eta_seconds:1
# Stats
total_connections_received:3
total_commands_processed:20148
instantaneous_ops_per_sec:12576
total_net_input_bytes:690845
total_net_output_bytes:84124
instantaneous_input_kbps:421.06
instantaneous_output_kbps:48.61
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:0
evicted_keys:0
keyspace_hits:21
keyspace_misses:4
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:16123
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_reads_processed:890
total_writes_processed:887
io_threaded_reads_processed:0
io_threaded_writes_processed:0
# Replication
role:slave
master_host:127.0.0.1
master_port:0
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_repl_offset:0
master_link_down_since_seconds:1605098877
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:86517805494394bd6366021c06610ba4b8050e12
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
# CPU
used_cpu_sys:0.218000
used_cpu_user:0.234000
used_cpu_sys_children:0.031000
used_cpu_user_children:0.000000
# Modules
# Commandstats
cmdstat_slaveof:calls=1,usec=743,usec_per_call=743.00
cmdstat_xgroup:calls=1,usec=29,usec_per_call=29.00
cmdstat_info:calls=3,usec=44966,usec_per_call=14988.67
cmdstat_flushall:calls=1,usec=11412,usec_per_call=11412.00
cmdstat_decr:calls=3,usec=40,usec_per_call=13.33
cmdstat_incr:calls=10004,usec=63892,usec_per_call=6.39
cmdstat_get:calls=16,usec=29,usec_per_call=1.81
cmdstat_randomkey:calls=1,usec=3,usec_per_call=3.00
cmdstat_select:calls=5,usec=11,usec_per_call=2.20
cmdstat_xreadgroup:calls=2,usec=12,usec_per_call=6.00
cmdstat_evalsha:calls=7,usec=67,usec_per_call=9.57
cmdstat_del:calls=7,usec=66,usec_per_call=9.43
cmdstat_config:calls=3,usec=17891,usec_per_call=5963.67
cmdstat_debug:calls=4,usec=31,usec_per_call=7.75
cmdstat_ping:calls=1,usec=4,usec_per_call=4.00
cmdstat_lrange:calls=1,usec=16,usec_per_call=16.00
cmdstat_script:calls=3,usec=662,usec_per_call=220.67
cmdstat_set:calls=13,usec=151,usec_per_call=11.62
cmdstat_sadd:calls=4,usec=79,usec_per_call=19.75
cmdstat_sort:calls=3,usec=70,usec_per_call=23.33
cmdstat_xread:calls=2,usec=9,usec_per_call=4.50
cmdstat_rpush:calls=3,usec=39,usec_per_call=13.00
cmdstat_eval:calls=10058,usec=181119,usec_per_call=18.01
cmdstat_smembers:calls=1,usec=24,usec_per_call=24.00
cmdstat_lpush:calls=1,usec=3,usec_per_call=3.00
# Cluster
cluster_enabled:0
# Keyspace
db9:keys=1,expires=0,avg_ttl=0
------ CLIENT LIST OUTPUT ------
id=4 addr=127.0.0.1:3529 laddr=127.0.0.1:27614 fd=7 name= age=2 idle=0 flags=N db=9 sub=0 psub=0 multi=-1 qbuf=28 qbuf-free=32740 argv-mem=12 obl=0 oll=0 omem=0 tot-mem=49850 events= cmd=debug user=default redir=-1
------ CURRENT CLIENT INFO ------
id=4 addr=127.0.0.1:3529 laddr=127.0.0.1:27614 fd=7 name= age=2 idle=0 flags=N db=9 sub=0 psub=0 multi=-1 qbuf=28 qbuf-free=32740 argv-mem=12 obl=0 oll=0 omem=0 tot-mem=49850 events= cmd=debug user=default redir=-1
argv[0]: 'debug'
argv[1]: 'loadaof'
------ MODULES INFO OUTPUT ------
=== REDIS BUG REPORT END. Make sure to include from START to END. ===