mmcshane / salp Goto Github PK
View Code? Open in Web Editor NEWUSDT probes in Golang on Linux
License: MIT License
USDT probes in Golang on Linux
License: MIT License
I'm not interested in instrumenting on OS X but compiling would be good.
If I see the environment variables CGO_CFLAGS, CGO_LDFLAGS, and LD_LIBRARY_PATH then my program will NOT compile. I get the following error:
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/opc/libstapsdt/out/libstapsdt.a(libstapsdt.o): In function providerLoad': libstapsdt.c:(.text+0x63e): undefined reference to
dlopen'
libstapsdt.c:(.text+0x65b): undefined reference to dlerror' libstapsdt.c:(.text+0x6ae): undefined reference to
dlsym'
libstapsdt.c:(.text+0x6b7): undefined reference to dlerror' /home/opc/libstapsdt/out/libstapsdt.a(libstapsdt.o): In function
providerUnload':
libstapsdt.c:(.text+0x74e): undefined reference to dlclose' libstapsdt.c:(.text+0x757): undefined reference to
dlerror'
/home/opc/libstapsdt/out/libstapsdt.a(shared-lib.o): In function createElf': shared-lib.c:(.text+0x11): undefined reference to
elf_version'
shared-lib.c:(.text+0x30): undefined reference to elf_begin' /home/opc/libstapsdt/out/libstapsdt.a(shared-lib.o): In function
createElfHeader':
shared-lib.c:(.text+0xb8): undefined reference to elf64_newehdr' /home/opc/libstapsdt/out/libstapsdt.a(shared-lib.o): In function
createElfProgramHeaders':
shared-lib.c:(.text+0x122): undefined reference to elf64_newphdr' /home/opc/libstapsdt/out/libstapsdt.a(shared-lib.o): In function
dynElfSave':
shared-lib.c:(.text+0xad9): undefined reference to elf_ndxscn' shared-lib.c:(.text+0xbbe): undefined reference to
elf_ndxscn'
shared-lib.c:(.text+0xf14): undefined reference to elf_ndxscn' shared-lib.c:(.text+0x10ff): undefined reference to
elf_ndxscn'
shared-lib.c:(.text+0x1122): undefined reference to elf_update' shared-lib.c:(.text+0x1402): undefined reference to
elf_update'
shared-lib.c:(.text+0x16ec): undefined reference to elf_ndxscn' shared-lib.c:(.text+0x1763): undefined reference to
elf_ndxscn'
shared-lib.c:(.text+0x17f7): undefined reference to elf_ndxscn' shared-lib.c:(.text+0x186c): undefined reference to
elf_ndxscn'
shared-lib.c:(.text+0x18e1): undefined reference to elf_ndxscn' shared-lib.c:(.text+0x198d): undefined reference to
elf_flagphdr'
shared-lib.c:(.text+0x19a1): undefined reference to elf_update' /home/opc/libstapsdt/out/libstapsdt.a(shared-lib.o): In function
dynElfClose':
shared-lib.c:(.text+0x1bbe): undefined reference to elf_end' /home/opc/libstapsdt/out/libstapsdt.a(section.o): In function
sectionInit':
section.c:(.text+0x4d): undefined reference to elf_newscn' section.c:(.text+0x85): undefined reference to
elf_newdata'
section.c:(.text+0xbf): undefined reference to elf64_getshdr' /home/opc/libstapsdt/out/libstapsdt.a(hash-table.o): In function
hashTableFromSymbolTable':
hash-table.c:(.text+0xae): undefined reference to `elf_hash'
collect2: error: ld returned 1 exit status
When I remove those environment variables then my program will compile. I have to set the environment variables for the program to run. You just can't have them set when compiling the program.
It's a fine library and all but it's an impediment to development and deployment. I'd like to get the dependencies down to just libdl (for dlopen, which is probably unavoidable)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.