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

compiling with redis support on FreeBSD fails #414

Closed
czanik opened this issue Mar 10, 2015 · 10 comments
Closed

compiling with redis support on FreeBSD fails #414

czanik opened this issue Mar 10, 2015 · 10 comments

Comments

@czanik
Copy link
Contributor

czanik commented Mar 10, 2015

tested on FreeBSD 10.1 amd64 with syslog-ng 3.6.2

If support for redis is enabled, compilation fails with the following error message:

CC modules/redis/modules_redis_libredis_la-redis-grammar.lo
CC modules/redis/modules_redis_libredis_la-redis.lo
CC modules/redis/modules_redis_libredis_la-redis-parser.lo
CCLD modules/redis/libredis.la
libtool: link: require no space between -L' and-lhiredis'
Makefile:5165: recipe for target 'modules/redis/libredis.la' failed
gmake[4]: *** [modules/redis/libredis.la] Error 1
Makefile:9846: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
Makefile:4042: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/sysutils/syslog-ng/work/syslog-ng-3.6.2'
*** Error code 1

@ihrwein
Copy link
Contributor

ihrwein commented Mar 10, 2015

What are your configure options?

@czanik
Copy link
Contributor Author

czanik commented Mar 10, 2015

It's generated by FreeBSD ports (/usr/ports/sysutils/syslog-ng):
'''
--sysconfdir=/usr/local/etc --localstatedir=/var/db --enable-dynamic-linking --enable-debug --datadir=/usr/local/share/syslog-ng/ --enable-ssl --enable-tcp-wrapper --enable-spoof-source --with-libnet=/usr/local/bin --enable-ipv6 --enable-geoip --enable-redis --with-libesmtp=/usr/local/ --enable-sql --enable-json --disable-linux-caps --prefix=/usr/local
'''

@algernon
Copy link
Contributor

Better yet, the tail of make output with make V=1 would be even more useful, so we see the commandline that fails, not just a prettier CCLD text.

@czanik
Copy link
Contributor Author

czanik commented Mar 10, 2015

libtool: link: ( cd "modules/afstomp/.libs" && rm -f "libafstomp.la" && ln -s "../libafstomp.la" "libafstomp.la" )
/bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN -I/usr/local/include/dbi -I/usr/local/include/dbi/dbi -I./lib/ivykis/src/include -I./lib/ivykis/src/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I -D_FILE_OFFSET_BITS=64 -I./modules/redis -I./modules/redis -O2 -pipe -I/usr/local/include/libnet11 -I/usr/local/include -fstack-protector -fno-strict-aliasing -Wall -g -pthread -MT modules/redis/modules_redis_libredis_la-redis-grammar.lo -MD -MP -MF modules/redis/.deps/modules_redis_libredis_la-redis-grammar.Tpo -c -o modules/redis/modules_redis_libredis_la-redis-grammar.lo test -f 'modules/redis/redis-grammar.c' || echo './'modules/redis/redis-grammar.c
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN -I/usr/local/include/dbi -I/usr/local/include/dbi/dbi -I./lib/ivykis/src/include -I./lib/ivykis/src/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I -D_FILE_OFFSET_BITS=64 -I./modules/redis -I./modules/redis -O2 -pipe -I/usr/local/include/libnet11 -I/usr/local/include -fstack-protector -fno-strict-aliasing -Wall -g -pthread -MT modules/redis/modules_redis_libredis_la-redis-grammar.lo -MD -MP -MF modules/redis/.deps/modules_redis_libredis_la-redis-grammar.Tpo -c modules/redis/redis-grammar.c -fPIC -DPIC -o modules/redis/.libs/modules_redis_libredis_la-redis-grammar.o
mv -f modules/redis/.deps/modules_redis_libredis_la-redis-grammar.Tpo modules/redis/.deps/modules_redis_libredis_la-redis-grammar.Plo
/bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN -I/usr/local/include/dbi -I/usr/local/include/dbi/dbi -I./lib/ivykis/src/include -I./lib/ivykis/src/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I -D_FILE_OFFSET_BITS=64 -I./modules/redis -I./modules/redis -O2 -pipe -I/usr/local/include/libnet11 -I/usr/local/include -fstack-protector -fno-strict-aliasing -Wall -g -pthread -MT modules/redis/modules_redis_libredis_la-redis.lo -MD -MP -MF modules/redis/.deps/modules_redis_libredis_la-redis.Tpo -c -o modules/redis/modules_redis_libredis_la-redis.lo test -f 'modules/redis/redis.c' || echo './'modules/redis/redis.c
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN -I/usr/local/include/dbi -I/usr/local/include/dbi/dbi -I./lib/ivykis/src/include -I./lib/ivykis/src/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I -D_FILE_OFFSET_BITS=64 -I./modules/redis -I./modules/redis -O2 -pipe -I/usr/local/include/libnet11 -I/usr/local/include -fstack-protector -fno-strict-aliasing -Wall -g -pthread -MT modules/redis/modules_redis_libredis_la-redis.lo -MD -MP -MF modules/redis/.deps/modules_redis_libredis_la-redis.Tpo -c modules/redis/redis.c -fPIC -DPIC -o modules/redis/.libs/modules_redis_libredis_la-redis.o
mv -f modules/redis/.deps/modules_redis_libredis_la-redis.Tpo modules/redis/.deps/modules_redis_libredis_la-redis.Plo
/bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN -I/usr/local/include/dbi -I/usr/local/include/dbi/dbi -I./lib/ivykis/src/include -I./lib/ivykis/src/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I -D_FILE_OFFSET_BITS=64 -I./modules/redis -I./modules/redis -O2 -pipe -I/usr/local/include/libnet11 -I/usr/local/include -fstack-protector -fno-strict-aliasing -Wall -g -pthread -MT modules/redis/modules_redis_libredis_la-redis-parser.lo -MD -MP -MF modules/redis/.deps/modules_redis_libredis_la-redis-parser.Tpo -c -o modules/redis/modules_redis_libredis_la-redis-parser.lo test -f 'modules/redis/redis-parser.c' || echo './'modules/redis/redis-parser.c
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/eventlog -I/usr/local/include -I/usr/local/include -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN -I/usr/local/include/dbi -I/usr/local/include/dbi/dbi -I./lib/ivykis/src/include -I./lib/ivykis/src/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I -D_FILE_OFFSET_BITS=64 -I./modules/redis -I./modules/redis -O2 -pipe -I/usr/local/include/libnet11 -I/usr/local/include -fstack-protector -fno-strict-aliasing -Wall -g -pthread -MT modules/redis/modules_redis_libredis_la-redis-parser.lo -MD -MP -MF modules/redis/.deps/modules_redis_libredis_la-redis-parser.Tpo -c modules/redis/redis-parser.c -fPIC -DPIC -o modules/redis/.libs/modules_redis_libredis_la-redis-parser.o
mv -f modules/redis/.deps/modules_redis_libredis_la-redis-parser.Tpo modules/redis/.deps/modules_redis_libredis_la-redis-parser.Plo
/bin/sh ./libtool --tag=CC --mode=link cc -I -D_FILE_OFFSET_BITS=64 -I./modules/redis -I./modules/redis -O2 -pipe -I/usr/local/include/libnet11 -I/usr/local/include -fstack-protector -fno-strict-aliasing -Wall -g -pthread -avoid-version -module -no-undefined -L/usr/local/lib/libnet11 -lnet -L/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector -o modules/redis/libredis.la -rpath /usr/local/lib/syslog-ng modules/redis/modules_redis_libredis_la-redis-grammar.lo modules/redis/modules_redis_libredis_la-redis.lo modules/redis/modules_redis_libredis_la-redis-parser.lo -L -lhiredis ./lib/libsyslog-ng.la
libtool: link: require no space between -L' and-lhiredis'
Makefile:5165: recipe for target 'modules/redis/libredis.la' failed
gmake[4]: *** [modules/redis/libredis.la] Error 1
Makefile:9846: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
Makefile:4042: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/sysutils/syslog-ng/work/syslog-ng-3.6.2'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/syslog-ng
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/syslog-ng

@algernon
Copy link
Contributor

There's a stray -L there, and that upsets the compiler. Can you check the output of pkg-config --libs hiredis? (And if that fails, then pkg-config --libs libhiredis)

@czanik
Copy link
Contributor Author

czanik commented Mar 10, 2015

root@fb101r:/usr/ports/sysutils/syslog-ng # pkg-config --libs hiredis
-L -lhiredis

@algernon
Copy link
Contributor

That's the problem then. The pkg-config file of hiredis has an empty -L. The issue is best fixed there, I believe, rather than adding hackish workarounds to our configure script.

@cschuber
Copy link

A patch has been committed.

@ihrwein
Copy link
Contributor

ihrwein commented Jun 8, 2015

@czanik @cschuber: Please verify and close this issue.

@czanik
Copy link
Contributor Author

czanik commented Jun 8, 2015

@cschuber commited a workaround to FreeBSD ports and now it works fine.

@czanik czanik closed this as completed Jun 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants