Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cgo: "gcc produced unexpected output" error should print more lines #1407

Closed
alberts opened this issue Jan 12, 2011 · 5 comments
Closed

Comments

@alberts
Copy link
Contributor

alberts commented Jan 12, 2011

What steps will reproduce the problem?

When writing small wrapper functions for cgo directly in the comment above import
"C", it's useful if cgo could produce all the output from gcc in case of an
error. For this code:

/*
#include <stdio.h>
#include <infiniband/verbs.h>
struct ibv_device **my_ibv_get_device_list(int *num_devices) {
  struct ibv_device** devs = ibv_get_device_list(num_devices);
  printf("devs=%p\n", devs);
  printf("devs[0].node_type=%d\n", *devs[0].node_type);
  return devs;
}
*/
import "C"

I get:

gcc produced unexpected output:
<stdin>: In function 'my_ibv_get_device_list':

so I know something is wrong in my little wrapper, but I don't know what.

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

linux

Which revision are you using?  (hg identify)

tip
@robpike
Copy link
Contributor

robpike commented Jan 12, 2011

Comment 1:

Owner changed to r...@golang.org.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 9, 2011

Comment 2:

Labels changed: added priority-later.

@rsc
Copy link
Contributor

rsc commented Jan 29, 2012

Comment 3:

Has this gotten any better?

@alberts
Copy link
Contributor Author

alberts commented Jun 18, 2012

Comment 4:

Seems fixed.

@rsc
Copy link
Contributor

rsc commented Jun 19, 2012

Comment 5:

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants