mattn / mattn/go-mruby

example compile error

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
85
Forks
7
PR merge metrics
No merged PRs in 30d

Description

update to last commit, compile passed, but example still compile error.

$ go version
go version go1.2 darwin/amd64

 $ cd example/
 $ go build -x .
WORK=/var/folders/8g/k56fj_l17g32bg3fmjqqhgdr0000gp/T/go-build990910672
mkdir -p $WORK/github.com/mattn/go-mruby/_obj/
mkdir -p $WORK/github.com/mattn/
cd /opt/dev_study/study_go/src/github.com/mattn/go-mruby
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/cgo -objdir $WORK/github.com/mattn/go-mruby/_obj/ -- -I $WORK/github.com/mattn/go-mruby/_obj/ -Imruby/include mruby.go
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/6c -F -V -w -I $WORK/github.com/mattn/go-mruby/_obj/ -I /usr/local/Cellar/go/1.2/libexec/pkg/darwin_amd64 -o $WORK/github.com/mattn/go-mruby/_obj/_cgo_defun.6 -D GOOS_darwin -D GOARCH_amd64 $WORK/github.com/mattn/go-mruby/_obj/_cgo_defun.c
clang -I . -g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common -print-libgcc-file-name
clang -I . -g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common -I $WORK/github.com/mattn/go-mruby/_obj/ -Imruby/include -o $WORK/github.com/mattn/go-mruby/_obj/_cgo_main.o -c $WORK/github.com/mattn/go-mruby/_obj/_cgo_main.c
clang -I . -g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common -I $WORK/github.com/mattn/go-mruby/_obj/ -Imruby/include -o $WORK/github.com/mattn/go-mruby/_obj/_cgo_export.o -c $WORK/github.com/mattn/go-mruby/_obj/_cgo_export.c
clang -I . -g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common -I $WORK/github.com/mattn/go-mruby/_obj/ -Imruby/include -o $WORK/github.com/mattn/go-mruby/_obj/mruby.cgo2.o -c $WORK/github.com/mattn/go-mruby/_obj/mruby.cgo2.c
clang -I . -g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common -o $WORK/github.com/mattn/go-mruby/_obj/_cgo_.o $WORK/github.com/mattn/go-mruby/_obj/_cgo_main.o $WORK/github.com/mattn/go-mruby/_obj/_cgo_export.o $WORK/github.com/mattn/go-mruby/_obj/mruby.cgo2.o -L mruby/build/host/lib -lmruby -lm
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/cgo -objdir $WORK/github.com/mattn/go-mruby/_obj/ -dynimport $WORK/github.com/mattn/go-mruby/_obj/_cgo_.o -dynout $WORK/github.com/mattn/go-mruby/_obj/_cgo_import.c
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/6c -F -V -w -I $WORK/github.com/mattn/go-mruby/_obj/ -I /usr/local/Cellar/go/1.2/libexec/pkg/darwin_amd64 -o $WORK/github.com/mattn/go-mruby/_obj/_cgo_import.6 -D GOOS_darwin -D GOARCH_amd64 $WORK/github.com/mattn/go-mruby/_obj/_cgo_import.c
clang -I . -g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common -o $WORK/github.com/mattn/go-mruby/_obj/_all.o $WORK/github.com/mattn/go-mruby/_obj/_cgo_export.o $WORK/github.com/mattn/go-mruby/_obj/mruby.cgo2.o -L mruby/build/host/lib -Wl,-r -nostdlib
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/mattn/go-mruby/_obj/_go_.6 -p github.com/mattn/go-mruby -D _/opt/dev_study/study_go/src/github.com/mattn/go-mruby -I $WORK $WORK/github.com/mattn/go-mruby/_obj/_cgo_gotypes.go $WORK/github.com/mattn/go-mruby/_obj/mruby.cgo1.go
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/pack grcP $WORK $WORK/github.com/mattn/go-mruby.a $WORK/github.com/mattn/go-mruby/_obj/_go_.6 $WORK/github.com/mattn/go-mruby/_obj/_cgo_import.6 $WORK/github.com/mattn/go-mruby/_obj/_cgo_defun.6 $WORK/github.com/mattn/go-mruby/_obj/_all.o
mkdir -p $WORK/github.com/mattn/go-mruby/example/_obj/
mkdir -p $WORK/github.com/mattn/go-mruby/example/_obj/exe/
cd /opt/dev_study/study_go/src/github.com/mattn/go-mruby/example
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/6g -o $WORK/github.com/mattn/go-mruby/example/_obj/_go_.6 -p github.com/mattn/go-mruby/example -complete -D _/opt/dev_study/study_go/src/github.com/mattn/go-mruby/example -I $WORK -I /opt/dev_study/study_go/pkg/darwin_amd64 ./example.go
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/pack grcP $WORK $WORK/github.com/mattn/go-mruby/example.a $WORK/github.com/mattn/go-mruby/example/_obj/_go_.6
cd .
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/6l -o $WORK/github.com/mattn/go-mruby/example/_obj/exe/a.out -L $WORK -L /opt/dev_study/study_go/pkg/darwin_amd64 $WORK/github.com/mattn/go-mruby/example.a
# github.com/mattn/go-mruby/example
ld: warning: directory not found for option '-Lmruby/build/host/lib'
ld: library not found for -lmruby
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64/6l: running gcc failed: unsuccessful exit status 0x100

$ pwd
/opt/dev_study/study_go/src/github.com/mattn/go-mruby/example
$ ll ../mruby/build/host/lib/
total 10632
drwxr-xr-x 5 jason admin 170B 1 6 23:52 ./
drwxr-xr-x 9 jason admin 306B 1 6 23:52 ../
-rw-r--r-- 1 jason admin 2.9M 1 6 23:52 libmruby.a
-rw-r--r-- 1 jason admin 1.6K 1 6 23:52 libmruby.flags.mak
-rw-r--r-- 1 jason admin 2.3M 1 6 23:52 libmruby_core.a

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with example/example.go and the cgo linker output from go build -x .; inspect how the example locates mruby/build/host/lib and libmruby.a. Reproduce the build in the reported environment, then verify that the example links and builds successfully without the missing-library error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, ruby
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.