You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using pebbe [zmq4] go zeroMQ library which is written on the top of libzmq.
I was trying to link static library of library: CGO_LDFLAGS+='-lstdc++ -lm ' CGO_ENABLED=1 GOOS=linux go build -a --ldflags '-extldflags "-static" -v' sample.go
But, i got the following error in libzmq:
# command-line-arguments
HEADER = -H4 -T0x8049000 -D0x0 -R0x1000
searching for runtime.a in $WORK/runtime.a
0.00 deadcode
0.06 pclntab=927798 bytes, funcdata total 202599 bytes
0.06 dodata
0.08 dwarf
0.10 symsize = 0
0.15 reloc
0.17 asmb
0.18 datblk
0.19 sym
0.19 elfsym
0.19 symsize = 132464
0.20 symsize = 133744
0.21 headr
0.31 host link: "gcc" "-m32" "-gdwarf-2" "-o" "/tmp/go-build291054915/command-line-arguments/_obj/exe/a.out" "-static" "/tmp/go-link-468758464/go.o" "/tmp/go-link-468758464/000000.o" "/tmp/go-link-468758464/000001.o" "/tmp/go-link-468758464/000002.o" "-lstdc++" "-lm" "-L/usr/local/lib" "-lzmq" "-lstdc++" "-lm" "-lpthread" "-lstdc++" "-lm" "-no-pie" "-static"
/usr/local/lib/libzmq.a(src_libzmq_la-ipc_listener.o): In function `zmq::ipc_listener_t::filter(int)':
/home/jay/2017/edgeX_foundry/EMF/static_shared_go/dependencies/libzmq/src/ipc_listener.cpp:350: warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/jay/2017/edgeX_foundry/EMF/static_shared_go/dependencies/libzmq/src/ipc_listener.cpp:346: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-468758464/000002.o: In function `_cgo_b0c710f30cfd_C2func_getaddrinfo':
/tmp/go-build/net/_obj/cgo-gcc-prolog:45: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
2.52 cpu time
98591 symbols
128260 liveness data
Please help me if any body has tried or is have saw such kind of error.
The text was updated successfully, but these errors were encountered:
Hello @bluca ,
I am not sure whether it is pebbe library issue or in libzmq building I missed some flags.
Can you please help me in this.
Thanks in advance.
Hello @bluca ,
Can you please let me know, Are there some flags those needs to be add to libzmq building ?
Because in this case glibc needs to be statically linked..
You cannot statically link to glibc - it uses runtime plugins for things like DNS resolution.
Also it's licensed under the LGPL, which means you can do dynamic linking, but static linking means your program's source code also has to be released under the LGPL.
Besides that, it looks like a problem with Golang, by searching for that error on google this is the second result:
I am using pebbe [zmq4] go zeroMQ library which is written on the top of libzmq.
I was trying to link static library of library:
CGO_LDFLAGS+='-lstdc++ -lm ' CGO_ENABLED=1 GOOS=linux go build -a --ldflags '-extldflags "-static" -v' sample.go
But, i got the following error in libzmq:
Please help me if any body has tried or is have saw such kind of error.
The text was updated successfully, but these errors were encountered: