RedisJSON / RedisJSON

RedisJSON - a JSON data type for Redis
https://redis.io/docs/stack/json/
Other
3.82k stars 323 forks source link

undefined symbol: __aeabi_uldivmod Error #125

Closed dpate117 closed 5 years ago

dpate117 commented 5 years ago

I have cross compiled the redisjson Module and I am loading the rejson.so and redistimeseries.so. Server is failing to load both of the modules and it complains

./redis-server redis.conf

24187:C 14 Aug 2019 14:30:29.397 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 24187:C 14 Aug 2019 14:30:29.399 # Redis version=5.0.5, bits=32, commit=00000000, modified=0, pid=24187, just started 24187:C 14 Aug 2019 14:30:29.399 # Configuration loaded 24187:M 14 Aug 2019 14:30:29.409 * Increased maximum number of open files to 10032 (it was originally set to 1024). 24187:M 14 Aug 2019 14:30:29.412 # Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now. . _.-__ ''-._ _.- .. ''-. Redis 5.0.5 (00000000/0) 32 bit .-.-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.-.|'` .-'| Port: 6379 | -._. / .-' | PID: 24187 -._-. `-./ .-' .-' |`-.-._-..-' .-'.-'| | -._-. .-'.-' | http://redis.io `-. -._-..-'.-' .-' |-._-._ -.__.-' _.-'_.-'| |-.`-. .-'.-' | -._-._-.__.-'_.-' _.-' -._ -.__.-' _.-' -. .-' `-.__.-'

24187:M 14 Aug 2019 14:30:29.422 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 24187:M 14 Aug 2019 14:30:29.423 # Server initialized 24187:M 14 Aug 2019 14:30:29.423 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 24187:M 14 Aug 2019 14:30:29.426 # Module /home/app/CONFIG/redis/Modules/rejson.so failed to load: /home/app/CONFIG/redis/Modules/rejson.so: undefined symbol: __aeabi_uldivmod 24187:M 14 Aug 2019 14:30:29.427 # Can't load module from /home/app/CONFIG/redis/Modules/rejson.so: server aborting

Target Architecture: armv7l GNU/Linux

Is there anything special I have to do? redis.conf.txt

rafie commented 5 years ago

I managed to build and execute properly on an armv7l system. Can you please elaborate on your environment: cross toolchain, host system OS, target system OS.

dpate117 commented 5 years ago

Cross-Compiler Toolchain gcc-linaro-6.2.1-2016.11-i686-mingw32_arm-linux-gnueabihf

Host System OS Windows 10 Pro (64-bit OS), x64-based processor

Target Architecture: armv7l GNU/Linux

I have used nm tool to get more info on rejson.so libray. I have attached the output for to this post. It seems I am missing library to link

nm_rejson.so.txt

dpate117 commented 5 years ago

I was able to fix this issue by adding linking library in to the make file. -lgcc

$(LD) -o $@ module.o tsdb.o rdb.o compaction.o chunk.o parse_policies.o config.o indexer.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lgcc -lrmutil -lc