Hi,

Thanks for reporting it.

In <CACiRYOd_o4=AOsmO99fEypTHXOU3qO14XR4zAUg=jmnfy-f...@mail.gmail.com>
  "Typelib file for namespace 'Arrow' not found for go examples" on Wed, 24 Jan 
2018 01:41:58 -0800,
  Mike Sam <mikesam...@gmail.com> wrote:

> % git clone https://github.com/apache/arrow.git ~/arrow
> % cd ~/arrow/c_glib/example/go
> % make generate
> 
> This returns the following error
> 
> $GOPATH/bin/gir-generator \
>   -o $GOPATH/src/gir/arrow-1.0 \
>   -config arrow-1.0/config.json \
>   arrow-1.0/arrow.go.in
> *panic: Typelib file for namespace 'Arrow', version '1.0' not found*
> 
> goroutine 1 [running]:
> main.panic_if_error(0x845f80, 0xc4200a2620)
> /home/ubuntu/workspace/go/src/
> github.com/linuxdeepin/go-gir-generator/src/gir-generator/util.go:21 +0x4a
> main.main()
> /home/ubuntu/workspace/go/src/
> github.com/linuxdeepin/go-gir-generator/src/gir-generator/main.go:218 +0x335
> make: *** [generate] Error 2
> 
> I am on ubuntu 14.04.
> 
> How do I fix this?

There are some problems.

1. gir1.2-arrow-1.0 deb package for Ubuntu 14.04 installs
   .typelib file to wrong directory.
   I'll upload a fixed package in a few days.

   There are no problems on other platforms.

2. We need some patches to go-gir-generator:

   On Ubuntu 14.04:

     export GOPATH=$HOME
     go get github.com/linuxdeepin/go-gir-generator
     cd $GOPATH/src/github.com/linuxdeepin/go-gir-generator
     rm -rf $GOPATH/src/gir/
     rm -rf out
     sed -i'' -e 's/\("unref_to_array"\)/"get_data", \1/g' 
lib.in/glib-2.0/config.json
     rm -f lib.in/gio-2.0/gdk_workaround.go
     make build copyfile
     mkdir -p $GOPATH/bin/
     cp -a out/gir-generator $GOPATH/bin/
     cp -a out/src/gir/ $GOPATH/src/

     cd ~/arrow/c_glib/example/go
     make generate
     make
     ./write-batch
     ./read-batch
     ./write-stream
     ./read-stream

   On Ubuntu 17.10:

     export GOPATH=$HOME
     go get github.com/linuxdeepin/go-gir-generator
     cd $GOPATH/src/github.com/linuxdeepin/go-gir-generator
     rm -rf $GOPATH/src/gir/
     rm -rf out
     rm -f lib.in/gio-2.0/gdk_workaround.go
     sed -i'' -e 's/\("Settings",\)/\/\/ \1/g' -e 
's/\("SettingsBackend",\)/\/\/ \1/g' lib.in/gio-2.0/config.json
     make build copyfile
     mkdir -p $GOPATH/bin/
     cp -a out/gir-generator $GOPATH/bin/
     cp -a out/src/gir/ $GOPATH/src/

     cd ~/arrow/c_glib/example/go
     make generate
     make
     ./write-batch
     ./read-batch
     ./write-stream
     ./read-stream

See also: 
https://github.com/apache/arrow/blob/master/ci/travis_before_script_c_glib.sh#L61-L74

We should send feedback to go-gir-generator project.


Thanks,
--
kou

Reply via email to