On Wed, Apr 17, 2019 at 4:59 AM Nitish Saboo <nitish.sabo...@gmail.com> wrote: > > Made recommended changes to the file main.go.You can see the file in my > repository : https://github.com/nitishsaboo/Testing > > Now 'go build -x' is failing with the following error: > > WORK=/tmp/go-build838755651 > mkdir -p $WORK/b001/ > cd /home/nitish/Documents/goworkspace/src/forgithub > CGO_LDFLAGS='"-g" "-O2"' /usr/local/go/pkg/tool/linux_amd64/cgo -objdir > $WORK/b001/ -importpath forgithub -- -I $WORK/b001/ -g -O2 > -I/tmp/install/syslog-ng-3.6.2/ -I/usr/local/include/syslog-ng/ > -I/usr/local/include/syslog-ng/compat/ > -I/tmp/install/syslog-ng-3.6.2/lib/compat/ > -I/tmp/install/syslog-ng-3.6.2/lib/ivykis/ > -I/usr/local/include/syslog-ng/ivykis/ -I/usr/local/include/eventlog/ > -I/usr/include/glib-2.0/ -I/tmp/install/syslog-ng-3.6.2/modules/ ./main.go > cd $WORK > gcc -fno-caret-diagnostics -c -x c - || true > gcc -Qunused-arguments -c -x c - || true > gcc -fdebug-prefix-map=a=b -c -x c - || true > gcc -gno-record-gcc-switches -c -x c - || true > cd $WORK/b001 > TERM='dumb' gcc -I /home/nitish/Documents/goworkspace/src/forgithub -fPIC > -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build > -gno-record-gcc-switches -I ./ -g -O2 -I/tmp/install/syslog-ng-3.6.2/ > -I/usr/local/include/syslog-ng/ -I/usr/local/include/syslog-ng/compat/ > -I/tmp/install/syslog-ng-3.6.2/lib/compat/ > -I/tmp/install/syslog-ng-3.6.2/lib/ivykis/ > -I/usr/local/include/syslog-ng/ivykis/ -I/usr/local/include/eventlog/ > -I/usr/include/glib-2.0/ -I/tmp/install/syslog-ng-3.6.2/modules/ -o ./_x001.o > -c _cgo_export.c > TERM='dumb' gcc -I /home/nitish/Documents/goworkspace/src/forgithub -fPIC > -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build > -gno-record-gcc-switches -I ./ -g -O2 -I/tmp/install/syslog-ng-3.6.2/ > -I/usr/local/include/syslog-ng/ -I/usr/local/include/syslog-ng/compat/ > -I/tmp/install/syslog-ng-3.6.2/lib/compat/ > -I/tmp/install/syslog-ng-3.6.2/lib/ivykis/ > -I/usr/local/include/syslog-ng/ivykis/ -I/usr/local/include/eventlog/ > -I/usr/include/glib-2.0/ -I/tmp/install/syslog-ng-3.6.2/modules/ -o ./_x002.o > -c main.cgo2.c > cd /home/nitish/Documents/goworkspace/src/forgithub > TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 > -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I > $WORK/b001/ -g -O2 -I/tmp/install/syslog-ng-3.6.2/ > -I/usr/local/include/syslog-ng/ -I/usr/local/include/syslog-ng/compat/ > -I/tmp/install/syslog-ng-3.6.2/lib/compat/ > -I/tmp/install/syslog-ng-3.6.2/lib/ivykis/ > -I/usr/local/include/syslog-ng/ivykis/ -I/usr/local/include/eventlog/ > -I/usr/include/glib-2.0/ -I/tmp/install/syslog-ng-3.6.2/modules/ -o > $WORK/b001/_x003.o -c syslog-node.c > > forgithub > > In file included from /usr/local/include/syslog-ng/apphook.h:28:0, > from syslog-node.c:3: > /usr/local/include/syslog-ng/syslog-ng.h:58:14: error: unknown type name > ‘gchar’ > extern const gchar *module_path; > ^~~~~ > In file included from syslog-node.c:3:0: > /usr/local/include/syslog-ng/apphook.h:40:37: error: unknown type name > ‘gint’; did you mean ‘uint’? > typedef void (*ApplicationHookFunc)(gint type, gpointer user_data); > ^~~~ > uint > /usr/local/include/syslog-ng/apphook.h:40:48: error: unknown type name > ‘gpointer’ > typedef void (*ApplicationHookFunc)(gint type, gpointer user_data); > ^~~~~~~~ > /usr/local/include/syslog-ng/apphook.h:42:32: error: unknown type name > ‘gint’; did you mean ‘uint’? > void register_application_hook(gint type, ApplicationHookFunc func, gpointer > user_data); > ^~~~ > uint > /usr/local/include/syslog-ng/apphook.h:42:43: error: unknown type name > ‘ApplicationHookFunc’ > void register_application_hook(gint type, ApplicationHookFunc func, gpointer > user_data); > ^~~~~~~~~~~~~~~~~~~ > /usr/local/include/syslog-ng/apphook.h:42:69: error: unknown type name > ‘gpointer’ > void register_application_hook(gint type, ApplicationHookFunc func, gpointer > user_data); > ^~~~~~~~ > In file included from syslog-node.c:5:0: > /usr/local/include/syslog-ng/tags.h:30:9: error: unknown type name ‘guint16’ > typedef guint16 LogTagId; > ^~~~~~~ > /usr/local/include/syslog-ng/tags.h:43:37: error: unknown type name ‘gchar’ > LogTagId log_tags_get_by_name(const gchar *name); > ^~~~~ > /usr/local/include/syslog-ng/tags.h:44:7: error: unknown type name ‘gchar’ > const gchar *log_tags_get_by_id(LogTagId id); > ^~~~~ > In file included from /usr/local/include/syslog-ng/gsockaddr.h:29:0, > from /usr/local/include/syslog-ng/logmsg.h:29, > from syslog-node.c:6: > /usr/local/include/syslog-ng/atomic.h:31:3: error: unknown type name ‘gint’ > gint counter; > ^~~~ > /usr/local/include/syslog-ng/atomic.h:40:15: error: unknown type name > ‘gboolean’ > static inline gboolean > ^~~~~~~~ > /usr/local/include/syslog-ng/atomic.h:46:15: error: unknown type name ‘gint’ > static inline gint > .. > .. > > Can you please guide me as in which library I am missing here and what needs > to be done in this case?
These errors are coming from your C compiler while compiling your C file syslog-node.c. You'll need to fix your C file so that it compiles. I have no idea what specifically you need to do. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.