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

ibus-keymagic couldn't be compiled on fedora 16 #22

Open
GoogleCodeExporter opened this issue Jul 18, 2015 · 4 comments
Open

ibus-keymagic couldn't be compiled on fedora 16 #22

GoogleCodeExporter opened this issue Jul 18, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. git clone https://code.google.com/p/keymagic/
2. cd keymagic/ibus
3. ./autogen.sh --prefix=/usr
4. make

What is the expected output? What do you see instead?

Should compile without error.
Instead, got following error-

CXX    ibus_engine_keymagic-main.o
In file included from main.cpp:8:0:
engine.h:7:22: fatal error: keymagic.h: No such file or directory
compilation terminated.

After fixing a.m. and invoke make again, got following error-

CXX    ibus_engine_keymagic-engine.o
engine.cpp: In function ‘gboolean 
ibus_keymagic_engine_process_key_event(IBusEngine*, guint, guint, guint)’:
engine.cpp:421:80: error: too few arguments to function ‘void 
ibus_engine_get_surrounding_text(IBusEngine*, IBusText**, guint*, guint*)’
/usr/include/ibus-1.0/ibusengine.h:424:6: note: declared here
make[2]: *** [ibus_engine_keymagic-engine.o] Error 1

What version of the product are you using? On what operating system?

ibus-keymagic 1.5
fedora 16
ibus-1.4.0

Please provide any additional information below.

Checked on online IBus reference manual, this function is still as follows-

void                ibus_engine_get_surrounding_text    (IBusEngine *engine,
                                                         IBusText **text,
                                                         guint *cursor_pos);
engine : An IBusEngine.
text :Location to store surrounding text.
cursor_pos :Cursor position in characters in text.

But on source repository and local /usr/include/ibus-1.0/ibusengine.h header 
file, declared with extra argument as-

void ibus_engine_get_surrounding_text(IBusEngine *engine,
                                      IBusText **text,
                                      guint *cursor_pos,
                                      guint *anchor_pos);
engine: An IBusEngine.
text: (allow-none): Location to store surrounding text.
cursor_pos: (allow-none): Cursor position in characters in @text.
anchor_pos: (allow-none): Anchor position of selection in @text.

Original issue reported on code.google.com by tmh...@gmail.com on 23 Jan 2012 at 8:01

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Error#1 Solved by adding CPPFLAGS to autogen.sh-

export CPPFLAGS="-I../../cross-platform/libkeymagic"

Original comment by tmh...@gmail.com on 23 Jan 2012 at 8:09

@GoogleCodeExporter
Copy link
Author

Error#2 solved temporarily by passing same cursor postion as anchor position to 
the function as-

IBusText *text;
guint pos = 0;
ibus_engine_get_surrounding_text((IBusEngine*)ibusKeymagic, &text, &pos, &pos);

Compile ok and ibus-engine seems working :) but may need to review the code.

Original comment by tmh...@gmail.com on 23 Jan 2012 at 8:20

Attachments:

@GoogleCodeExporter
Copy link
Author

yes. please just comment out "ibus_engine_get_surrounding_text". there won't be 
effect for now. 

Original comment by bashr...@gmail.com on 23 Jan 2012 at 10:23

  • Changed state: Accepted

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

No branches or pull requests

1 participant