Code Monkey home page Code Monkey logo

Comments (6)

algernon avatar algernon commented on June 28, 2024

Can you try adding this line to the top of lib/logsource.c, below all the #include lines?

#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC CLOCK_REALTIME
#endif

from syslog-ng.

lojha avatar lojha commented on June 28, 2024

Thanks a lot for your quick response !!

That fixed the issue related to 'CLOCK_MONOTONIC'. but again it failed with below errors:

CCLD examples/amqp_bind
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_connection.o): In function amqp_d64': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tontohll'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_connection.o): In function amqp_send_frame': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_connection.c:415: undefined reference tosend'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_connection.o): In function amqp_e64': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tohtonll'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_framing.o): In function amqp_d64': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tontohll'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to ntohll' /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tontohll'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to ntohll' /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tontohll'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_framing.o):/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: more undefined references to ntohll' follow librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_framing.o): In functionamqp_e64':
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to htonll' /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tohtonll'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to htonll' /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tohtonll'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to htonll' librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_framing.o):/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: more undefined references tohtonll' follow
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_socket.o): In function amqp_open_socket': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:66: undefined reference togetaddrinfo'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:79: undefined reference to socket' /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:93: undefined reference tosetsockopt'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:107: undefined reference to freeaddrinfo' /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:93: undefined reference toconnect'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_socket.o): In function amqp_send_header': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:121: undefined reference tosend'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_socket.o): In function wait_frame_inner': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:211: undefined reference torecv'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_table.o): In function amqp_d64': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tontohll'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to ntohll' librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_table.o): In functionamqp_e64':
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to hton librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_table.o): In functionamqp_encode_field_value':
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to hton librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_table.o): In functionamqp_e64':
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference to hton /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h:251: undefined reference tohton
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-socket.o): In function amqp_socket_socket': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/unix/socket.c:60: undefined reference tosocket
collect2: ld returned 1 exit status
make[6]: *** [examples/amqp_bind] Error 1
make[6]: Leaving directory `/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c'
make[5]: *** [all] Error 2

To get a workaround related to 'ntohll' added file 'modules/afamqp/rabbitmq-c/librabbitmq/amqp_private.h' as suggested in

http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2012-October/023165.html

#if defined(__sparc)
#define ntohll(x) (x)
#define htonll(x) (x)
#endif

that fixed complaining about 'ntohll' and 'htonll' but again failed with:

CCLD examples/amqp_bind
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_connection.o): In function amqp_send_frame': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_connection.c:415: undefined reference tosend'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_socket.o): In function amqp_open_socket': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:66: undefined reference togetaddrinfo'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:79: undefined reference to socket' /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:93: undefined reference tosetsockopt'
/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:107: undefined reference to freeaddrinfo' /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:93: undefined reference toconnect'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_socket.o): In function amqp_send_header': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:121: undefined reference tosend'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-amqp_socket.o): In function wait_frame_inner': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:211: undefined reference torecv'
librabbitmq/.libs/librabbitmq.a(librabbitmq_librabbitmq_la-socket.o): In function amqp_socket_socket': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/unix/socket.c:60: undefined reference tosocket'
collect2: ld returned 1 exit status
make[6]: *** [examples/amqp_bind] Error 1
make[6]: Leaving directory /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c' make[5]: *** [all] Error 2 make[5]: Leaving directory/export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c'
make[4]: *** [all-recursive] Error 1

from syslog-ng.

algernon avatar algernon commented on June 28, 2024

That can also be fixed with forcing an -lsocket when linking librabbitmq-c, but... if you don't need the amqp destination, you can turn it off entirely with --disable-amqp passed to configure, and all of the above mess could be avoided that way.

If you need the amqp destination... well, the fix is a little bit more involved in that case.

from syslog-ng.

lojha avatar lojha commented on June 28, 2024

what could be the fix......is it just commenting the line of code which has referenced symbol names??

for eg...if I comment line number 121 in amqp_socket.c....it is not complaining about this sysmbol.

amqp_send_header': /export/syslog/syslog-ng-3.4.8/modules/afamqp/rabbitmq-c/librabbitmq/amqp_socket.c:121: undefined reference tosend'

Also is it safe if we do modify the code like this way? will it impact any of syslog functionality ?

from syslog-ng.

algernon avatar algernon commented on June 28, 2024

If you want to be able to send to an AMQP broker, then yes, modifying the code this way would break that functionality. If not, it is easier to use --disable-amqp. The problem is that on Solaris, if you use network functions like socket, you need to link with -lsocket. The rabbitmq-c library syslog-ng bundles does not do that, hence your issues. Fixing that is a little bit problematic, as rabbitmq-c is not under our control.

Disabling AMQP will not impact the normal syslog functionality, though, so that's the easiest way.

Another way is to edit modules/afamqp/rabbitmq-c/Makefile.am, and add a line like AM_LDFLAGS = -lsocket -lnsl to it.

from syslog-ng.

lojha avatar lojha commented on June 28, 2024

Thank you for prompt replies and solution

from syslog-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.