> It doesn't look like the -ldflags option is getting through to the linker. 
>  Try 
>     go build "-ldflags=all=-w -extldflags=-lmabain -v" 
>
> Ian 
>

I tried the new format however it still can't link mabain lib and I get the 
same errors

Step 25/26 : RUN cd ${MABAIN_SRC}/; go build -x -i "-ldflags=all=-w 
-extldflags=-lmabain -v"

 ---> Running in 90e992e27f6b

WORK=/tmp/go-build678792509

mkdir -p $WORK/b001/

swig -version

cd $WORK

/usr/local/go/pkg/tool/linux_amd64/compile -o ./b001/_go_.o -trimpath 
"$WORK/b001=>" -p main -complete -goversion go1.13 -D _$WORK -c=4 
./swig_intsize.go

cd /mabain_src

swig -go -cgo -intgosize 64 -module mabain -o $WORK/b001/mabain_wrap.cxx 
-outdir $WORK/b001/ -c++ mabain.swigcxx

CGO_LDFLAGS='"-g" "-O2"' /usr/local/go/pkg/tool/linux_amd64/cgo -objdir 
$WORK/b001/ -importpath _/mabain_src -- -I $WORK/b001/ -g -O2 
$WORK/b001/_mabain_swig.go

cd $WORK

gcc -fno-caret-diagnostics -c -x c - -o /dev/null || true

gcc -Qunused-arguments -c -x c - -o /dev/null || true

gcc -fdebug-prefix-map=a=b -c -x c - -o /dev/null || true

gcc -gno-record-gcc-switches -c -x c - -o /dev/null || true

cd $WORK/b001

TERM='dumb' gcc -I /mabain_src -fPIC -m64 -pthread -fmessage-length=0 
-fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I ./ 
-g -O2 -o ./_x001.o -c _cgo_export.c

TERM='dumb' gcc -I /mabain_src -fPIC -m64 -pthread -fmessage-length=0 
-fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I ./ 
-g -O2 -o ./_x002.o -c _mabain_swig.cgo2.c

cd $WORK

g++ -fno-caret-diagnostics -c -x c - -o /dev/null || true

g++ -Qunused-arguments -c -x c - -o /dev/null || true

g++ -fdebug-prefix-map=a=b -c -x c - -o /dev/null || true

g++ -gno-record-gcc-switches -c -x c - -o /dev/null || true

cd /mabain_src

TERM='dumb' g++ -I . -fPIC -m64 -pthread -fmessage-length=0 
-fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I 
$WORK/b001/ -g -O2 -o $WORK/b001/_x003.o -c mabain_c_interface.cpp

cd $WORK/b001

TERM='dumb' g++ -I /mabain_src -fPIC -m64 -pthread -fmessage-length=0 
-fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I ./ 
-g -O2 -o ./_x004.o -c mabain_wrap.cxx

TERM='dumb' gcc -I /mabain_src -fPIC -m64 -pthread -fmessage-length=0 
-fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I ./ 
-g -O2 -o ./_cgo_main.o -c _cgo_main.c

cd /mabain_src

TERM='dumb' g++ -I . -fPIC -m64 -pthread -fmessage-length=0 
-fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -o 
$WORK/b001/_cgo_.o $WORK/b001/_cgo_main.o $WORK/b001/_x001.o 
$WORK/b001/_x002.o $WORK/b001/_x003.o $WORK/b001/_x004.o -g -O2

# _/mabain_src

/tmp/go-build678792509/b001/_x003.o: In function `mbOpen':
./mabain_c_interface.cpp:10: undefined reference to 
`mabain::CONSTS::ReaderOptions()' 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/4284daf5-63d4-4742-9664-8f184a5a695e%40googlegroups.com.

Reply via email to