Thanks Ian! But that does not seem to be the issue, I changed libcolor.go 
to color.go and still get the same error.

However, I did made tiny progress, I can specifically pass the parameters 
in the CLI and get it build, for example

CGO_CXXFLAGS="-I$GOPATH/src/kflow/libcolor/include" 
CGO_LDFLAGS="-L$GOPATH/src/kflow/libcolor/lib -l:libCOLOR.a 
-l:libboost_system.a -l:libboost_regex.a -l:libboost_program_options.a 
-l:libboost_filesystem.a -l:libxml2.a -lz" go build -x

but, the installed libcolor.a in the pkg directory looks suspiciously 
small, only 55k, while libCOLOR.a itself is roughly 300MB. I wrote a simple 
main file, the application is around 140MB. The numbers do not seem to 
agree with each other. 

I do notice though, the 
GOGCCFLAGS="-fPIC -m64 -pthread 
-fmessage-length=0 -fdebug-prefix-map=/tmp/go-build471211808=/tmp/go-build 
-gno-record-gcc-switches"
in the `go env` output has the -fdebug-prefix-map changed each and 
everytime, is that expected?

go version go1.7.1 linux/amd64

Best Regards,
Chun



On Wednesday, March 1, 2017 at 1:01:45 PM UTC-5, Ian Lance Taylor wrote:
>
> On Wed, Mar 1, 2017 at 8:13 AM, Chun Zhang <czh...@gmail.com <javascript:>> 
> wrote: 
> > Just wondering, is there any chance that I didn't place some file in the 
> > correct place? The directory tree is as follows, 
> > ├── bin 
> > ├── example 
> > │   └── COLOR_test 
> > │       ├── COLOR_test.cpp 
> > │       └── SessionKey.hpp 
> > ├── include 
> > │   └── COLOR.h 
> > ├── lib 
> > │   ├── libboost_filesystem.a 
> > │   ├── libCOLOR.a 
> > │   └── libxml2.a 
> > ├── libcolor 
> > ├── libcolor.go 
> > ├── libcolor.swigcxx 
> > ├── README 
> > 
> > When I issue `go build -x`, go and swig insists to generate another 
> > libcolor.go file in the tmp $WORK directory, thus none of the directives 
> > defined in above libcolor.go file is picked up. 
>
> It's possible that there is a bug such that it won't work to have both 
> x.swigcxx and x.go in the same package.  Maybe you should rename 
> libcolor.go. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to