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/go: doesn't correctly set pkg-config before calling swig. #8566

Closed
OneOfOne opened this issue Aug 21, 2014 · 5 comments
Closed

cmd/go: doesn't correctly set pkg-config before calling swig. #8566

OneOfOne opened this issue Aug 21, 2014 · 5 comments
Milestone

Comments

@OneOfOne
Copy link
Contributor

What does 'go version' print?
go version devel +16bc5182facf Thu Aug 21 15:44:03 2014 -0700 linux/amd64

What steps reproduce the problem?
1. git clone https://github.com/OneOfOne/go-swig-bug-1
2. cd go-swig-bug-1/main && go build

What happened?
The build fails with:
g++ -I . -fPIC -m64 -pthread -fmessage-length=0 -g -O2 -o
$WORK/_/tmp/qt5-go/_obj/test.cxx.o -c ./test.cpp
# _/tmp/qt5-go
In file included from ../test.cpp:1:0:
../test.hpp:1:35: fatal error: QtCore/QCoreApplication: No such file or directory
 #include <QtCore/QCoreApplication>

What should have happened instead?
Die with a different error (still trying to hunt it down, it's swig related).

Please provide any additional information below.

If the package uses pkg-config, cgo doesn't pass C/CXXFLAGS to swig which is needed for
other include paths.
@OneOfOne
Copy link
Contributor Author

Comment 1:

A very simple / naive fix @
https://github.com/OneOfOne/go-swig-bug-1/blob/master/workaround.patch
This fixes the include pathes problem but exposes a new problem where both swig and cgo
compiles the c++ file and go build (6l) dies with `multiple definition of` errors.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Please send in patches via the process described at
http://golang.org/doc/contribute.html.  Thanks.

Labels changed: added repo-main, release-go1.4.

@OneOfOne
Copy link
Contributor Author

Comment 3:

Please check https://golang.org/cl/126210045, I'm not really sure how to add a
test case for it since it depends on having some kind of c++ package installed.

@gopherbot
Copy link

Comment 4:

CL https://golang.org/cl/126210045 mentions this issue.

@ianlancetaylor
Copy link
Contributor

Comment 5:

This issue was closed by revision 4caf377.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
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