Bug 4547 - --enable-tests makes compilation fail
Summary: --enable-tests makes compilation fail
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.19.0
Hardware: PC Linux
: P3 minor
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2021-11-11 16:20 UTC by linux.felixbecker2
Modified: 2022-07-23 15:54 UTC (History)
1 user (show)

See Also:


Attachments
Terminal output of the `./configure` run. (21.51 KB, text/plain)
2022-07-14 12:51 UTC, linux.felixbecker2
no flags Details
Terminal output of the `make` run. (25.87 KB, application/x-bzip2)
2022-07-14 13:12 UTC, linux.felixbecker2
no flags Details
Terminal output of `./configure --disable-static --enable-tests`. (21.59 KB, text/plain)
2022-07-15 14:11 UTC, linux.felixbecker2
no flags Details
Terminal output of `make`. (28.22 KB, application/zstd)
2022-07-15 14:11 UTC, linux.felixbecker2
no flags Details

Description linux.felixbecker2 2021-11-11 16:20:17 UTC
If I compile claws-mail with `--enable-tests`, configuration fails with

    make[6]: *** No rule to make target '../pgpcore_la-pgp_utils.o', needed by 'pgp_utils_test'.  Stop.

If I specify `--disable-tests` instead it compiles fine.

Tested with Claws mail git checkout from git://git.claws-mail.org/claws.git, latest commit hash 71e1e70a4 (commit date: 2021-11-06), on Artix Linux.

The full `./configure` command line is:

    ./configure \
      --prefix='/usr' \
      --disable-static \
      --enable-shared \
      --enable-nls \
      --enable-manual \
      --enable-libsm \
      --enable-ipv6 \
      --enable-gnutls \
      --enable-enchant \
      --enable-crash-dialog \
      --disable-generic-umpc \
      --enable-compface \
      --enable-pthread \
      --enable-startup-notification \
      --enable-dbus \
      --enable-ldap \
      --disable-jpilot \
      --disable-networkmanager \
      --enable-libetpan \
      --disable-valgrind \
      --disable-alternate-addressbook \
      --enable-svg \
      --enable-tests \
      --enable-deprecated \
      --enable-acpi_notifier-plugin \
      --enable-address_keeper-plugin \
      --enable-archive-plugin \
      --enable-att_remover-plugin \
      --enable-attachwarner-plugin \
      --enable-bogofilter-plugin \
      --enable-bsfilter-plugin \
      --enable-clamd-plugin \
      --enable-dillo-plugin \
      --disable-fancy-plugin \
      --enable-fetchinfo-plugin \
      --enable-gdata-plugin \
      --enable-libravatar-plugin \
      --enable-litehtml_viewer-plugin \
      --enable-mailmbox-plugin \
      --enable-managesieve-plugin \
      --enable-newmail-plugin \
      --enable-notification-plugin \
      --enable-pdf_viewer-plugin \
      --enable-perl-plugin \
      --enable-python-plugin \
      --enable-pgpcore-plugin \
      --enable-pgpmime-plugin \
      --enable-pgpinline-plugin \
      --enable-rssyl-plugin \
      --enable-smime-plugin \
      --enable-spamassassin-plugin \
      --enable-spam_report-plugin \
      --enable-tnef_parse-plugin \
      --enable-vcalendar-plugin \
      --enable-demo-plugin
Comment 1 linux.felixbecker2 2022-07-14 12:49:27 UTC
This still applies to latest git checkoout of 3.19 branch as of today.
Comment 2 linux.felixbecker2 2022-07-14 12:50:29 UTC
I attach the output of the `./configure` run and of the `make` run from today's git checkout of 3.19 branch.
Comment 3 linux.felixbecker2 2022-07-14 12:51:33 UTC
Created attachment 2289 [details]
Terminal output of the `./configure` run.

./configure \
  --prefix=/usr \
  --disable-static \
  --enable-shared \
  --enable-nls \
  --enable-manual \
  --enable-libsm \
  --enable-ipv6 \
  --enable-gnutls \
  --enable-enchant \
  --enable-crash-dialog \
  --disable-generic-umpc \
  --enable-compface \
  --enable-pthread \
  --enable-startup-notification \
  --enable-dbus \
  --enable-ldap \
  --enable-jpilot \
  --disable-networkmanager \
  --enable-libetpan \
  --disable-valgrind \
  --disable-alternate-addressbook \
  --enable-svg \
  --enable-tests \
  --enable-deprecated \
  --enable-acpi_notifier-plugin \
  --enable-address_keeper-plugin \
  --enable-archive-plugin \
  --enable-att_remover-plugin \
  --enable-attachwarner-plugin \
  --enable-bogofilter-plugin \
  --enable-bsfilter-plugin \
  --enable-clamd-plugin \
  --enable-dillo-plugin \
  --disable-fancy-plugin \
  --enable-fetchinfo-plugin \
  --enable-gdata-plugin \
  --enable-libravatar-plugin \
  --enable-litehtml_viewer-plugin \
  --enable-mailmbox-plugin \
  --enable-managesieve-plugin \
  --enable-newmail-plugin \
  --enable-notification-plugin \
  --enable-pdf_viewer-plugin \
  --enable-perl-plugin \
  --enable-python-plugin \
  --enable-pgpcore-plugin \
  --enable-pgpmime-plugin \
  --enable-pgpinline-plugin \
  --enable-rssyl-plugin \
  --enable-smime-plugin \
  --enable-spamassassin-plugin \
  --enable-spam_report-plugin \
  --enable-tnef_parse-plugin \
  --enable-vcalendar-plugin \
  --enable-demo-plugin
Comment 4 Paul 2022-07-14 13:06:41 UTC
Builds without problem here. Do you need a clean build directory? Try running `make maintainer-clean` before rebuilding.

If you still have problems, re-open this and attach the `make` error msg. You have only attached the configure output, which is not very useful.
Comment 5 linux.felixbecker2 2022-07-14 13:12:24 UTC
Created attachment 2290 [details]
Terminal output of the `make` run.
Comment 6 linux.felixbecker2 2022-07-14 13:13:50 UTC
> Do you need a clean build directory? Try running `make maintainer-clean` before rebuilding.

I did a fresh git checkout.
Comment 7 linux.felixbecker2 2022-07-14 13:14:35 UTC
.. and if I do not specify all the options, i.e. if I just do `./configure --prefix=/usr --enable-tests`, `make` runs fine.
Comment 8 Paul 2022-07-14 13:21:17 UTC
Why do you use all those configure options? Most of them are not necessary: if the dependencies for the various features are present you do not need to specifically enable that feature.
Comment 9 linux.felixbecker2 2022-07-14 13:39:33 UTC
> Why do you use all those configure options?

To be sure to have that available, and to be thrown an error if some dependency is missing so I can add the dependency. And: For some plugins it seems I have to enable them manually. Since it is too confusing for me to know what needs to be enabled manually and what not, I jsut explicitly set what I want.

Is that harmful? (I think it should not, why otherwise is the option there then?)  
Why is this important here?

When you set all the options and have the dependencies installed, do you still get a compilation without error?
Comment 10 Paul 2022-07-14 14:24:55 UTC
(In reply to linux.felixbecker2 from comment #9)

> Is that harmful? (I think it should not, why otherwise is the option there then?)  
> Why is this important here?

Harmful? hmmm. It makes it harder to narrow down when you are using the widest possible field.

> When you set all the options and have the dependencies installed, do you still get a compilation without error?

Yes.
Comment 11 linux.felixbecker2 2022-07-15 14:09:58 UTC
(In reply to Paul from comment #10)

After some disecting, I found out that for me the combination of `--disable-static` and `--enable-tests` triggers the compilation problem. If I leave out any of those two, compilation succeeds.

After finding out, I confirmed for me by starting from a clean `git checkout` by the sequence of the following commands:

```
git clone git://git.claws-mail.org/claws.git claws-mail
cd claws-mail
git switch gtk2
NOCONFIGURE=1 ./autogen.sh
./configure --disable-static --enable-tests > /tmp/claws-mail.configure.log 2>&1
make > /tmp/claws-mail.make.log 2>&1
```

I update the attached configure and make logs to the output of this latest run.
Comment 12 linux.felixbecker2 2022-07-15 14:11:11 UTC
Created attachment 2293 [details]
Terminal output of `./configure --disable-static --enable-tests`.
Comment 13 linux.felixbecker2 2022-07-15 14:11:56 UTC
Created attachment 2294 [details]
Terminal output of `make`.
Comment 14 Paul 2022-07-15 15:04:36 UTC
I managed to reprduce the problem, with only --enable-tests.

The simple, (and, at present, favoured), solution is to remove the tests.
Comment 15 linux.felixbecker2 2022-07-15 15:45:09 UTC
> The simple, (and, at present, favoured), solution is to remove the tests.

So it is not a build-side problem (i.e. my problem) if I explicitly use `--disable-static`?

Wouldn't then the clean solution be to fix the issue instead of just removing the tests (excpet if no one is caring in keeping up with writing tests anyway), maybe leave this issue hanging around unresolved for a while until someone finds the capacity to do it?
Comment 16 Paul 2022-07-23 15:54:41 UTC
fixed in git by removing the broken test.

Note You need to log in before you can comment on or make changes to this bug.