runtime: gcc_libinit.c _cgo_try_pthread_create 'EAGAIN' undeclared #40617
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Problem
Hi, I'm getting the below error when compiling a CGO project.
The C code compiles successfully. This seems to be an issue in CGO ?
Some basic investigation
I checked the code in
/usr/local/go/src/runtime/cgo/gcc_libinit.c
and it does include#include <errno.h>
. But still the error'EAGAIN' undeclared
appears.https://github.com/golang/go/blob/master/src/runtime/cgo/gcc_libinit.c#L9
Workaround
#define EAGAIN 11
in/usr/local/go/src/runtime/cgo/gcc_libinit.c
solves this.Or,
#include <asm-generic/errno.h>
in/usr/local/go/src/runtime/cgo/gcc_libinit.c
solves this.Other details
The text was updated successfully, but these errors were encountered: