TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b128=/tmp/go-build -gno-record-gcc-switches -o $WORK/b128/_cgo_.o $WORK/b128/_cgo_main.o $WORK/b128/_x001.o $WORK/b128/_x002.o $WORK/b128/_x003.o $WORK/b128/_x004.o -g -O2 /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so -L/usr/local/lib/ -lsyslog-ng -L/usr/local/lib/syslog-ng -ldbparser -L/usr/local/lib -Wl,--export-dynamic -lgmodule-2.0 -pthread -lgthread-2.0 -pthread -lglib-2.0 -lsyslog-ng -lglib-2.0 -levtlog # PAS/lib /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so: In function `pdbtool_accumulate_fields': syslog-node.c:(.text+0x0): multiple definition of `pdbtool_accumulate_fields' /tmp/go-build218062063/b128/_x004.o:/home/nsaboo/Documents/goworkspace/src/PAS/lib/syslog-node.c:30: first defined here /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so: In function `pdbtool_pdb_emit_accumulate': syslog-node.c:(.text+0x3f): multiple definition of `pdbtool_pdb_emit_accumulate' /tmp/go-build218062063/b128/_x004.o:/home/nsaboo/Documents/goworkspace/src/PAS/lib/syslog-node.c:38: first defined here /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so: In function `match': syslog-node.c:(.text+0x7a): multiple definition of `match' /tmp/go-build218062063/b128/_x004.o:/home/nsaboo/Documents/goworkspace/src/PAS/lib/syslog-node.c:42: first defined here /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so: In function `execute_percustomer_db': syslog-node.c:(.text+0x13b): multiple definition of `execute_percustomer_db' /tmp/go-build218062063/b128/_x004.o:/home/nsaboo/Documents/goworkspace/src/PAS/lib/syslog-node.c:61: first defined here /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so: In function `load_pattern_db_from_string': syslog-node.c:(.text+0x1fc): multiple definition of `load_pattern_db_from_string' /tmp/go-build218062063/b128/_x004.o:/home/nsaboo/Documents/goworkspace/src/PAS/lib/syslog-node.c:73: first defined here /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so: In function `reload_pattern_db': syslog-node.c:(.text+0x24d): multiple definition of `reload_pattern_db' /tmp/go-build218062063/b128/_x004.o:/home/nsaboo/Documents/goworkspace/src/PAS/lib/syslog-node.c:87: first defined here /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so: In function `initialize_engine': syslog-node.c:(.text+0x2c2): multiple definition of `initialize_engine' /tmp/go-build218062063/b128/_x004.o:/home/nsaboo/Documents/goworkspace/src/PAS/lib/syslog-node.c:112: first defined here /home/nsaboo/Documents/goworkspace/src/PAS/syslog-node.so: In function `matcher_shutdown': syslog-node.c:(.text+0x41e): multiple definition of `matcher_shutdown' /tmp/go-build218062063/b128/_x004.o:/home/nsaboo/Documents/goworkspace/src/PAS/lib/syslog-node.c:140: first defined here collect2: error: ld returned 1 exit status
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Nitish Saboo, golang-nuts
On Fri, Jun 7, 2019 at 8:59 PM Nitish Saboo <nitish....@gmail.com> wrote:
>
> I have tried the following three scenarios and one of them compiles successfully that is with -L option.
> Let me know If am I missing something here .
You should use what works, although I don't know why it works. I
would have thought that that -L option would simply be ignored. What
happens if you leave it out entirely?
Ian
Nitish Saboo
unread,
Jun 8, 2019, 2:51:53 AM6/8/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ian Lance Taylor, golang-nuts
Hi Ian,
So I observed a very strange thing.If I leave it out completely then also the project gets compiled.
I thought that linker file is binding my Go code to the C code.Why am I not getting any error ?Â
How the Go code is then getting linked to the C code ?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ian Lance Taylor, golang-nuts
Hi Ian
Nitish Saboo
unread,
Jun 10, 2019, 10:44:32 AM6/10/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ian Lance Taylor, golang-nuts
Hi Ian,
Does the successful compilation makes sure that the Go code is properly linked to the C header files ?
Thanks,
Nitish
Ian Lance Taylor
unread,
Jun 10, 2019, 5:40:39 PM6/10/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Nitish Saboo, golang-nuts
On Mon, Jun 10, 2019 at 7:44 AM Nitish Saboo <nitish....@gmail.com> wrote:
>
> Does the successful compilation makes sure that the Go code is properly linked to the C header files ?
I'm sorry, I don't know how to answer that question.
Does your program run as expected?
The `ldd` program will show the set of dynamic libraries loaded at
program startup time.