Bug 66681

Summary: Vala app fails to build: undefined reference to `act_user_new'
Product: accountsservice Reporter: Jeremy Bicha <jbicha>
Component: generalAssignee: Matthias Clasen <mclasen>
Severity: major    
Priority: medium CC: marius.vollmer, rstrode, stefw
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 26236    
Attachments: accountsservice-test.vala
working version

Description Jeremy Bicha 2013-07-08 05:33:38 UTC
Created attachment 82162 [details]

Ubuntu 13.10 Alpha with valac 0.20.1 and accountsservice 0.6.34.

I can't get the Vala bindings to work. I'm attaching a minimal test case.

$ valac --pkg accountsservice accountsservice-test.vala

accountsservice-test.vala.c: In function ‘_vala_main’:
accountsservice-test.vala.c:25:9: warning: assignment makes pointer from integer without a cast [enabled by default]
  _tmp0_ = act_user_new ();
accountsservice-test.vala.c: In function ‘main’:
accountsservice-test.vala.c:45:2: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
  g_type_init ();
/tmp/ccVZJNQM.o: In function `_vala_main':
accountsservice-test.vala.c:(.text+0x23): undefined reference to `act_user_new'
collect2: error: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
Comment 1 Jeremy Bicha 2013-07-08 14:16:05 UTC
Created attachment 82187 [details]
working version

Ok, I slept on this and managed to figure it out.

The bug here is that there's not enough documentation or examples.
Comment 2 Ray Strode [halfline] 2013-07-08 15:01:20 UTC
Note you also need to wait for the is-loaded property to toggle to "true" before checking properties on the user
Comment 3 Robert Ancell 2017-12-20 19:44:25 UTC
The Vala bindings were removed:

But this issue is probably out of date anyway.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.