Skip to content
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

Incompatible with gobject 2.62.4 #16

Open
ddevault opened this issue Jan 18, 2020 · 7 comments
Open

Incompatible with gobject 2.62.4 #16

ddevault opened this issue Jan 18, 2020 · 7 comments

Comments

@ddevault
Copy link

lib/glib/v-.go:308:46: could not determine kind of name for C.G_KEY_FILE_DESKTOP_KEY_FULLNAME
lib/glib/v-.go:309:52: could not determine kind of name for C.G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN
lib/glib/v-.go:310:46: could not determine kind of name for C.G_KEY_FILE_DESKTOP_KEY_KEYWORDS
@pekim
Copy link
Owner

pekim commented Jan 19, 2020

Strangely I can see those constants are defined in glib-2.0/glib/gkeyfile.h. I have glib 2.56.4.

However I cannot find any documentation for the constants. So I have blacklisted them from the generation. 33e954c

Can you give branch 16-glib-constants a try please?

@ddevault
Copy link
Author

This gets me a bit further:

# github.com/pekim/gobbi/lib/atk
/usr/bin/ld: $WORK/b036/_x005.o: undefined reference to symbol 'g_object_ref_sink'
/usr/bin/ld: /usr/lib//libgobject-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
# github.com/pekim/gobbi/lib/gio
lib/gio/v-.go:1194:44: undefined: Converter
lib/gio/v-.go:1199:43: undefined: Initable
lib/gio/v-.go:1263:66: undefined: Converter
lib/gio/v-.go:1282:58: undefined: PollableInputStream
lib/gio/v-.go:1346:68: undefined: Converter
lib/gio/v-.go:1365:60: undefined: PollableOutputStream
lib/gio/v-.go:1463:41: undefined: MenuModel
lib/gio/v-.go:4599:55: undefined: PollableInputStream
lib/gio/v-.go:4681:57: undefined: PollableOutputStream
lib/gio/v-.go:6447:51: undefined: ProxyResolver
lib/gio/v-.go:6447:51: too many errors

@pekim
Copy link
Owner

pekim commented Jan 19, 2020

What go build/run command are you running when this happens?

Does the example in the readme work?

@pekim
Copy link
Owner

pekim commented Jan 19, 2020

lib/gobject/package.go contains

// #cgo pkg-config: gobject-2.0
import "C"

Which should result in use of pkg-config --libs gobject-2.0 by go build so that it includes the necessary linker flags for the library. So I'm not sure why the g_object_ref_sink symbol is not found.

I'm quite puzzled by DSO missing from command line.

@ddevault
Copy link
Author

I was trying gtk_application, but the command you gave doesn't work either.

@pekim
Copy link
Owner

pekim commented Jan 20, 2020

I've got a handle on this now.

A function (for example g_converter_output_stream_new) has no version information in the gir file. However it has a parameter with a type (in this case GConverter, introduced in gio 2.24) that does have version information.

I'm generating the function as though it's available in all versions of gio. But it's implicitly new in 2.24.
So unless you're targetting gio 2.24 or later (using a build tag of gio_2.24 or later) the build is going to fail.

I'll look in to fixing the generation code to take this in to account.

@ddevault
Copy link
Author

Thanks, let me know and I'll give it a shot when the time comes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants