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

Can't run on win7 x64 - can't find g_value_get_enum #318

Closed
Sergii-Kirichok opened this Issue Jan 6, 2019 · 6 comments

Comments

Projects
None yet
4 participants
@Sergii-Kirichok
Copy link

Sergii-Kirichok commented Jan 6, 2019

Hi,
Can't run it on win7 x64.
Installed:
msys2-x86_64-20180531
go.1.11.4
all dependencies and paths

But when I run go get gotk i got this error.

go get -u github.com/gotk3/gotk3/gtk
# github.com/gotk3/gotk3/pango
C:\Users\Admin\AppData\Local\Temp\go-build135719158\b035\_x002.o: In function             
`_cgo_d7fe93989068_Cfunc_g_value_get_enum':
/tmp/go-build/cgo-gcc-prolog:56: undefined reference to `g_value_get_enum'
C:\Users\Admin\AppData\Local\Temp\go-build135719158\b035\_x004.o: In function 
`_cgo_d7fe93989068_Cfunc_g_value_get_boxed':
/tmp/go-build/cgo-gcc-prolog:62: undefined reference to `g_value_get_boxed'
collect2.exe: error: ld returned 1 exit status

Could you please help me with it.

@orivej

This comment has been minimized.

Copy link
Contributor

orivej commented Jan 7, 2019

Re. #283 (comment), could you edit github.com/gotk3/gotk3/pango/pango-layout.go and pango-attributes.go and replace #cgo pkg-config: pango with #cgo pkg-config: pango gobject-2.0 (maybe glib-2.0 is needed too)?

@Sergii-Kirichok

This comment has been minimized.

Copy link

Sergii-Kirichok commented Jan 7, 2019

SOLVED !!!
It helps, Thank you very much. I even didn't expected to get result today. Already installed Vbox and ubuntu :).

@Bios-Marcel

This comment has been minimized.

Copy link
Contributor

Bios-Marcel commented Jan 8, 2019

@orivej So, can you imagine why this onlyhappens on some setups? It worked fine on my Arch and Ubuntu installation, but fails on windows. And why hasn't this happened earlier? Is there a apecific commit that caused it?

@orivej

This comment has been minimized.

Copy link
Contributor

orivej commented Jan 8, 2019

@Bios-Marcel It happens if pkg-config --libs pango does not include -lgobject-2.0. The following would help to determine why.

@Sergii-Kirichok and @SamWhited, could you post the output of:

pkg-config --libs pango
cat /usr/lib/pkgconfig/pango.pc
cat /usr/lib/pkgconfig/gobject-2.0.pc
pacman -Qo /usr/lib/pkgconfig/gobject-2.0.pc /usr/lib/pkgconfig/pango.pc `which pkg-config`

Certainly, this was not a change in gotk3, but in packaging pango on the affected systems. However, I think that it is a gotk3 fault of not explicitly listing all direct dependencies. I am going to automatically update cgo pkg-config lines and send a PR.

@SamWhited

This comment has been minimized.

Copy link

SamWhited commented Jan 8, 2019

Yup, good catch.

$ pkg-config --libs pango
-lpango-1.0
@Sergii-Kirichok

This comment has been minimized.

Copy link

Sergii-Kirichok commented Jan 14, 2019

pacman -Qo /usr/lib/pkgconfig/gobject-2.0.pc /usr/lib/pkgconfig/pango.pc which pkg-config

if I run this commands from the running msys.exe

Admin@Star-Office MSYS ~
# pkg-config --libs pango
Package pango was not found in the pkg-config search path.
Perhaps you should add the directory containing `pango.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pango' found

Admin@Star-Office MSYS ~
# cat /usr/lib/pkgconfig/pango.pc
cat: /usr/lib/pkgconfig/pango.pc: No such file or directory

Admin@Star-Office MSYS ~
# cat /usr/lib/pkgconfig/gobject-2.0.pc
cat: /usr/lib/pkgconfig/gobject-2.0.pc: No such file or directory

Admin@Star-Office MSYS ~
# pacman -Qo /usr/lib/pkgconfig/gobject-2.0.pc /usr/lib/pkgconfig/pango.pc `which pkg-config`
ошибка: Ни один пакет не содержит '/usr/lib/pkgconfig/gobject-2.0.pc'
ошибка: Ни один пакет не содержит '/usr/lib/pkgconfig/pango.pc'
ошибка: Ни один пакет не содержит '/usr/bin/pkg-config'

Admin@Star-Office MSYS ~

When I run the saem from the mingw64 it looks like that:

Admin@Star-Office MINGW64 ~
# pkg-config --libs pango
-LC:/msys64/mingw64/lib -lpango-1.0

Admin@Star-Office MINGW64 ~
# cat /usr/lib/pkgconfig/pango.pc
cat: /usr/lib/pkgconfig/pango.pc: No such file or directory

Admin@Star-Office MINGW64 ~
#  cat /usr/lib/pkgconfig/gobject-2.0.pc
cat: /usr/lib/pkgconfig/gobject-2.0.pc: No such file or directory

Admin@Star-Office MINGW64 ~
# pacman -Qo /usr/lib/pkgconfig/gobject-2.0.pc /usr/lib/pkgconfig/pango.pc `which pkg-config`

ошибка: Ни один пакет не содержит '/usr/lib/pkgconfig/gobject-2.0.pc'
ошибка: Ни один пакет не содержит '/usr/lib/pkgconfig/pango.pc'
ошибка: Ни один пакет не содержит '/mingw64/bin/pkg-config'

Admin@Star-Office MINGW64 ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment