[Users] How to compile a plugin with these details?

Ricardo Mones ricardo at mones.org
Fri Sep 24 00:31:52 CEST 2021


Hi Dedeco,

On Thu, Sep 23, 2021 at 03:14:42PM -0300, Dedeco Balaco via Users wrote:
> 
> 
> Em 23/09/2021 13:39, Paul escreveu:
> > On Thu, 23 Sep 2021 13:32:07 -0300
> > Dedeco Balaco via Users <users at lists.claws-mail.org> wrote: 
> > 
> >> How do i compile just the one plugin i want, and install it in the
> >> correct relative folder where claws has been installed? All the rest is
> >> not necessary to me. Can you give me some help with what i should change
> >> or do, compared to the instructions given in the README file? (why these
> >> are different from the instructions in the INSTALL file, which says to
> >> run configure script?)
> > 
> > run configure with the correct prefix, e.g.:
> > 
> > ./configure --prefix=/usr
> > 
> > cd to the plugin source directory that you want, e.g.:
> > 
> > cd src/plugins/fancy
> > 
> > and run make and sudo make install there.
> > 
> > with regards
> > 
> 
> Really easy! I did not imagine it could be that simple. But there is a
> problem: other plugins (I installed one from the Debian repository) use
> the folder, and the one i just compiled, with your steps, want to copy
> it to a different folder.
> 
> From repository:
> 
> /usr/lib/x86_64-linux-gnu/claws-mail/plugins/
> 
> Installing from downloaded source, steps above:
> 
> /usr/lib/x86_64-linux-gnu/lib/claws-mail/plugins
> 
> See the difference?
> 
> /usr/lib/x86_64-linux-gnu/claws-mail/plugins/
> /usr/lib/x86_64-linux-gnu/lib/claws-mail/plugins
> 
> There is an extra "lib" folder in the second path. I used
> 
> $ ./configure --prefix=/usr
> 
> to obtain that result.
> 
> In another try, I did:
> 
> $ ./configure --prefix=/usr/lib/x86_64-linux-gnu/

This prefix is wrong. If you want to build plugins like the Debian
packages do, just use the same dir-related flags for configuring:

https://salsa.debian.org/claws-mail-team/claws-mail/-/blob/master/debian/rules#L20

Anyway, keep reading...

> $  cd src/plugins/fancy
> 
> $  make
> 
> $  LANG=C; make install
> make[1]: Entering directory '/dev/shm/claws-mail-3.17.8/src/plugins/test'
> make[1]: Nothing to be done for 'install-exec-am'.
>  /bin/mkdir -p '/usr/lib/x86_64-linux-gnu/lib/claws-mail/plugins'
> /bin/mkdir: cannot create directory '/usr/lib/x86_64-linux-gnu/lib':
> Permission denied
> make[1]: *** [Makefile:528: install-pluginLTLIBRARIES] Error 1
> make[1]: Leaving directory '/dev/shm/claws-mail-3.17.8/src/plugins/test'
> make: *** [Makefile:710: install-am] Error 2
> 2021.09.23 15:09:54 [  2] user at debian:
> /dev/shm/claws-mail-3.17.8/src/plugins/test

You need to be root to install stuff on system directories. You missed
the "sudo" bits that Paul mentioned. But if you're puzzled by this error
I'm not sure you should be installing things on system directories as
root ;-)

Safer would be to install the plugin to a directory in your home folder
(e.g.: --prefix=/home/user/myclawsplugins) and load it from the folder
created by make install under it. That doesn't require root and chances
you break your system is zero. Note that Claws Mail allows loading
plugins from any directory, not just the system wide folder.

regards,
-- 
  Ricardo Mones 
  ~
  Physics is like sex: sure, it may give some practical results, but 
  that's not why we do it.                            Richard Feynman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20210924/86d9209e/attachment-0001.sig>


More information about the Users mailing list