Just guessing but it is likely due to environment variables, such as
LD_LIBRARY_PATH, present when you run your binary but not when you run "go
test". Possibly because "go test" doesn't pass the env var to the code
being tested.

On Mon, Feb 10, 2025 at 10:48 AM Ullas HV <ullash...@gmail.com> wrote:

> I recently ran into a problem where go build (with cgo) was successfull
> but go test of a function reported an error stated below.
>
> "error while loading shared libraries: libtcmalloc.so.4: cannot open
> shared object file: No such file or directory
> exit status 127"
>
>
>
>
> --
> 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.
> To view this discussion visit
> https://groups.google.com/d/msgid/golang-nuts/fb54f400-48b3-4a4e-ba25-ae1516dd8308n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/fb54f400-48b3-4a4e-ba25-ae1516dd8308n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD9p9H4D-xVxQGVca1SJOroGkVJQT9MEdxERKxt3UZG41A%40mail.gmail.com.

Reply via email to