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

Comments

@alberts
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Jan 12, 2011

Comment 1:

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

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 9, 2011

Comment 2:

Labels changed: added priority-later.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 29, 2012

Comment 3:

Has this gotten any better?
@alberts

This comment has been minimized.

Copy link
Contributor Author

commented Jun 18, 2012

Comment 4:

Seems fixed.
@rsc

This comment has been minimized.

Copy link
Contributor

commented Jun 19, 2012

Comment 5:

Status changed to Fixed.

@alberts alberts added fixed labels Jun 19, 2012

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.