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

"py-compile: Missing argument to --destdir." #2

Closed
infokiller opened this issue Aug 19, 2016 · 17 comments
Closed

"py-compile: Missing argument to --destdir." #2

infokiller opened this issue Aug 19, 2016 · 17 comments
Assignees

Comments

@infokiller
Copy link

I tried installing it by running:

./autogen.sh
./configure
make
sudo make install

However, I get the following error:

../py-compile: Missing argument to --destdir.

Am I doing something wrong?

Thanks!

@mike-fabian
Copy link
Owner

You should use

./configure --prefix=/usr
make
make install

(That autogen.sh is in the tarball is a mistake, I’ll remove it, it should only used when building from git.
But that does not make a difference for you. you used ./configure without the --prefix=/usr argument,
then it defaults to the /usr/local prefix and you would need to add DESTDIR to the make install as well.
I.e.:

./configure --prefix=/usr/local
make
make install DESTDIR=/usr/local

Then you don’t get that error message. So there is some bug in the build system with the handling of DESTDIR.
Apparently there are some more bugs when trying to install in a different location then /usr, I’ll check later.

But installing to a different location than /usr will probably not work for you anyway.
The “make install” installs a file /usr/share/ibus/component/typing-booster.xml,
if that is in a different location, the ibus you have installed will most likely not find it.

So use

./configure --prefix=/usr
make
make install

this should work.

@mike-fabian mike-fabian self-assigned this Aug 23, 2016
@mike-fabian
Copy link
Owner

Did it work for you?

@infokiller
Copy link
Author

Sorry, didn't have time to test it yet. Will update this issue after I try.

@infokiller
Copy link
Author

OK, just installed from the repo checked out to release 1.5.7, and the installation finished with no errors. Sorry if this is a trivial question, but how do I trigger it? should I restart X11 before?
Thanks!

@mike-fabian
Copy link
Owner

Yes, it is easier if you restart X11.
Which window manager are you using? I remember you asked about i3 ...
I have the following two lines in my ~/.config/i3/config file to start ibus:

exec ibus-daemon -drx
for_window [instance=ibus-ui-gtk3] sticky enable

After starting your session, start "ibus-setup" and add the "English US (Typing Booster)"
input method.

In case you are using Gnome, see the video at the bottom of the ibus-typing-booster
home page: https://mike-fabian.github.io/ibus-typing-booster/
At the beginning of that video, I explain how to enable ibus-typing-booster on Gnome.

@infokiller
Copy link
Author

OK so now when I try to open ibus-setup I get this error:

Traceback (most recent call last):
  File "/usr/share/ibus/setup/main.py", line 28, in <module>
    from gi.repository import Gio
ImportError: No module named repository

I guess that this is unrelated to your code. I'll handle it and report back.

@infokiller
Copy link
Author

OK I finally went back to fix this issue, it was just a conflicting python library.
So now ibus-setup is started well, but I don't see a "English US (Typing Booster)" input method.

Should I have run anything else other than the make install?

Thanks!

@infokiller
Copy link
Author

FYI: I installed https://github.com/salty-horse/ibus-uniemoji and it worked.

@infokiller
Copy link
Author

More info:
First, I notice that following the installation steps you described above still left me with the old error (Missing argument to --destdir). Not sure how it worked for me 2 months ago.
Anyway, I then ran sudo make install DESTDIR=/usr/local and it worked.
Restarting ibus still didn't help, although it does look like the file is installed now:

$ ls -l /usr/share/ibus/component
total 48
-rw-r--r-- 1 root root   413 Jan 22  2016 dconf.xml
-rw-r--r-- 1 root root   420 Jan 22  2016 gtkpanel.xml
-rw-r--r-- 1 root root  1483 Feb 27  2014 pinyin.xml
-rw-r--r-- 1 root root 22676 Jan 22  2016 simple.xml
-rw-r--r-- 1 root root   611 Feb 14  2014 table.xml
-rw-r--r-- 1 root root   695 Nov 11 04:31 typing-booster.xml
-rw-r--r-- 1 root root  1257 Nov 11 04:27 uniemoji.xml

$ cat /usr/share/ibus/component/typing_booster.xml
<?xml version='1.0' encoding='utf-8'?>
<!-- filename: hunspell-table.xml -->
<component>
    <name>org.freedesktop.IBus.IbusTypingBooster</name>
    <description>Table Component</description>
    <exec>/usr/libexec/ibus-engine-typing-booster --ibus</exec>
    <version>0.0.1</version>
    <author>Anish Patil &lt;anish.developer@gmail.com&gt;</author>
    <license>GPL</license>
    <homepage>http://mike-fabian.github.io/ibus-typing-booster</homepage>
    <textdomain>ibus-typing-booster</textdomain>
    <observed-paths>
        <path> </path>
    </observed-paths>
    <engines exec='/usr/libexec/ibus-engine-typing-booster --xml'/>
</component>

Some strange things about typing_booster.xml:

  • Has the comment <!-- filename: hunspell-table.xml -->
  • The path mentioned /usr/share/ibus-typing-booster/hunspell-tables/ doesn't exist
  • Running /usr/libexec/ibus-engine-typing-booster --xml prints an error

@infokiller
Copy link
Author

Hey @mike-fabian , did you get a chance to look at this?

Thanks!

@mike-fabian
Copy link
Owner

Some strange things about typing_booster.xml:

Has the comment <!-- filename: hunspell-table.xml -->

OK, I have fixed that now, but that is only a comment, it doesn’t matter.

The path mentioned /usr/share/ibus-typing-booster/hunspell-tables/ doesn't exist

This is probably because you installed to /usr/local, not /usr.
Please try installing to /usr. Like this:

./configure --prefix=/usr
make
sudo make install

(The --prefix=/usr is important!)
I guess you installed ibus-uniemoji to /usr as well, it is the default
when you do do “make install” of ibus-uniemoji:

mfabian@taka:/local/mfabian/src/ibus-uniemoji$ make -n install
install -m 0755 -d /usr/share/ibus-uniemoji /etc/xdg/uniemoji /usr/share/ibus/component
install -m 0644 uniemoji.svg UnicodeData.txt emojione.json /usr/share/ibus-uniemoji
install -m 0755 uniemoji.py /usr/share/ibus-uniemoji
install -m 0644 config.py /usr/share/ibus-uniemoji
install -m 0644 ibus.py /usr/share/ibus-uniemoji
install -m 0644 uniemoji.xml /usr/share/ibus/component
install -m 0644 custom.json /etc/xdg/uniemoji

Running /usr/libexec/ibus-engine-typing-booster --xml prints an error

Which error?

@infokiller
Copy link
Author

Running make gives me this error now:


Making all in engine
make[1]: Entering directory `/home/downloads/sources/ibus-typing-booster/engine'
( \
                libexecdir=/usr/libexec; \
                pkgdatadir=/usr/share/ibus-typing-booster; \
                s=`cat typing-booster.xml.in`; \
                eval "echo \"${s}\""; \
        ) > typing-booster.xml
make[1]: Leaving directory `/home/downloads/sources/ibus-typing-booster/engine'
Making all in icons
make[1]: Entering directory `/home/downloads/sources/ibus-typing-booster/icons'
Making all in additional
make[2]: Entering directory `/home/downloads/sources/ibus-typing-booster/icons/additional'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/downloads/sources/ibus-typing-booster/icons/additional'
make[2]: Entering directory `/home/downloads/sources/ibus-typing-booster/icons'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/downloads/sources/ibus-typing-booster/icons'
make[1]: Leaving directory `/home/downloads/sources/ibus-typing-booster/icons'
Making all in m4
make[1]: Entering directory `/home/downloads/sources/ibus-typing-booster/m4'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/downloads/sources/ibus-typing-booster/m4'
Making all in hunspell-tables
make[1]: Entering directory `/home/downloads/sources/ibus-typing-booster/hunspell-tables'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/downloads/sources/ibus-typing-booster/hunspell-tables'
Making all in data
make[1]: Entering directory `/home/downloads/sources/ibus-typing-booster/data'
make[1]: *** No rule to make target `emojione.json.gz', needed by `all-am'.  Stop.
make[1]: Leaving directory `/home/downloads/sources/ibus-typing-booster/data'
make: *** [all-recursive] Error 1

@infokiller
Copy link
Author

OK not sure why it happened, but it should be ok now.
Anyway, running /usr/libexec/ibus-engine-typing-booster --xml still prints an error:

Traceback (most recent call last):
  File "/usr/share/ibus-typing-booster/engine/main.py", line 293, in <module>
    main()
  File "/usr/share/ibus-typing-booster/engine/main.py", line 218, in main
    confs = [x for x in os.listdir(CONFIG_FILE_DIR) if x.endswith('.conf')]
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/ibus-typing-booster/hunspell-tables'

@infokiller
Copy link
Author

It seems that after make install DESTDIR=usr/, whether using the latest git commit or the latest release, some files are still not copied. The /usr/share/ibus-typing-booster dir only has an engine dir inside, so I get the error about /usr/share/ibus-typing-booster/hunspell-tables.

I ran the following from the ibus source directory to resolve it:

sudo cp -r -a data engine hunspell-tables icons /usr/share/ibus-typing-booster

Now /usr/libexec/ibus-engine-typing-booster --xml works correctly, and after restarting ibus I finally saw the ibus-typing-booster input methods. However, after I switch to it and type a character, I get the following error:

☹ /usr/share/myspell/en_US.dic not found. Please install hunspell dictionary!

Indeed, the directory /usr/share/myspell is empty.
I installed hunspell from https://github.com/hunspell/hunspell, but the dictionary files were not installed into /usr/share/myspell/, but into /usr/share/myspell/dicts. I copied the en_US.dic one, but I still get this error.

Any idea?

Thanks!

@infokiller
Copy link
Author

I finally was able to resolve the issue after debugging it.
I noticed this error message in the debug log:

load_dictionary en_US: /usr/share/myspell/en_US.dic /usr/share/myspell/en_US.aff file missing.

So I also copied the aff file to this directory. I also deleted the db file, but not sure if it was needed or not.

Anyway, it seems like on Ubuntu ibus-typing-booster doesn't look at the right location for hunspell dictionaries?

@mike-fabian
Copy link
Owner

See also: #6

I’ll make the path for the dictionaries configurable to solve this.

By the way, if ibus-typing-booster cannot find the dictionaries, it will nevertheless work.
Only it will not complete words from the dictionaries and it will not give spell checking suggestions.
But learning from user input and suggesting stuff the user has typed before should work even
without the dictionaries.

By the way, you do not need to delete the ~/.local/share/ibus-typing-booster/user.db if you change the dictionaries.

@mike-fabian
Copy link
Owner

infokiller> Anyway, it seems like on Ubuntu ibus-typing-booster doesn't look at the right location for infokiller> hunspell dictionaries?

I hope it does now.

In this release https://github.com/mike-fabian/ibus-typing-booster/releases/tag/1.5.16
I added the commit
11dbb23

Which fixes the problem for Arch Linux by looking in a list of directories now. It now looks
in '/usr/share/hunspell', '/usr/share/myspell', and '/usr/share/myspell/dicts' for dictionaries.

Where are the dictionaries on Ubuntu? In case they are somewhere else in Ubuntu, I can
add another directory to search to that list here:

https://github.com/mike-fabian/ibus-typing-booster/blob/master/engine/itb_util.py#L354

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