Bug 66681 - Vala app fails to build: undefined reference to `act_user_new'
Summary: Vala app fails to build: undefined reference to `act_user_new'
Status: RESOLVED INVALID
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 26236
  Show dependency treegraph
 
Reported: 2013-07-08 05:33 UTC by Jeremy Bicha
Modified: 2017-12-20 19:44 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
accountsservice-test.vala (237 bytes, text/plain)
2013-07-08 05:33 UTC, Jeremy Bicha
Details
working version (288 bytes, text/plain)
2013-07-08 14:16 UTC, Jeremy Bicha
Details

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

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:
https://cgit.freedesktop.org/accountsservice/commit/?id=17af4612e877c3a5c6bff67064d648f0eb2ea0cc

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.