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

Can't link to cgo packages in a package subdirectory after revision 4658 #560

Closed
rsaarelm opened this issue Jan 25, 2010 · 2 comments
Closed

Comments

@rsaarelm
Copy link
Contributor

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Patch the cgo stdio example with the following patch. It changes the
package path from "stdio" to "stdlib/stdio", putting the cgo package
in a
subdirectory.
2. In the stdio example dir, do "make hello"

What is the expected output? What do you see instead?

It should compile. Instead, I get an error about the generated C function
names:

/home/rsaarelm/bin/8l -o hello hello.8
stdlib/stdio.Puts: undefined: stdlib/stdio._C_CString
stdlib/stdio.Puts: undefined: stdlib/stdio._C_puts
stdlib/stdio.Puts: undefined: stdlib/stdio._C_free
stdlib/stdio.Puts: undefined: stdlib/stdio._C_fflushstdout
make: *** [hello] Error 1

What is your $GOOS?  $GOARCH?

linux 386

Which revision are you using?  (hg identify)

b7185292b7c5+ tip

Please provide any additional information below.

Attachments:

  1. subdir.diff (585 bytes)
@rsc
Copy link
Contributor

rsc commented Jan 25, 2010

Comment 1:

Thanks.
I'll look into this once I finish the sequence of changes I'm working on.

Labels changed: added cgo.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Jan 27, 2010

Comment 2:

This issue was closed by revision cb58ed7.

Status changed to Fixed.

Merged into issue #-.

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

3 participants