Building fails on postler-accounts.vala

Bug #723282 reported by FlyingIsFun1217
110
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Postler
Invalid
Undecided
Unassigned
Vala
Fix Released
Medium
postler (Fedora)
Fix Released
Medium
postler (Frugalware Linux)
New
Undecided
Unassigned
vala (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

../postler/postler-accounts.vala:69.44-69.44: error: Value must be constant

This is on the most recent revision on launchpad.

Revision history for this message
Sergio Spinatelli (spinatelli) wrote :

This is due to a change in the vala compiler ("Report error for constants with non-constant expressions")

Revision history for this message
Cris Dywan (kalikiana) wrote :

This is a regression in Vala 0.11.5, fixed in 0.11.6, see http://git.gnome.org/browse/vala/commit/?id=37a2304a9570715f180365baea063f89d9423bd7 .

Changed in postler:
status: New → Invalid
Revision history for this message
Cris Dywan (kalikiana) wrote :
Revision history for this message
FlyingIsFun1217 (flyingisfun1217) wrote :

My version of Vala is 0.11.6

$ valac --version
Vala 0.11.6.8-281523

Tried rebuilding, same error.

Revision history for this message
FlyingIsFun1217 (flyingisfun1217) wrote :

Updated vala to Vala 0.11.6.18-26eed, re-attempted the build.

../postler/postler-accounts.vala:69.44-69.44: error: Value must be constant
../postler/postler-cellrenderertoggle.vala:40.47-40.55: error: Argument 2: Cannot pass value to reference or output parameter

These are the current errors I'm getting with the latest git pull of valac.

Revision history for this message
Sergio Spinatelli (spinatelli) wrote :

I get those errors too,the second can be fixed quickly but the first one still remains (see the bug Christian linked) so the only way is to downgrade the vala compiler (0.11.4 works)

Revision history for this message
FlyingIsFun1217 (flyingisfun1217) wrote :

Downgrading is the only fix? Seems a little strange.

Revision history for this message
Sergio Spinatelli (spinatelli) wrote :

Since it is more a problem of the newest vala compiler (only 0.11.5 and 0.11.6 don't work) than a bug in postler's code, yes: downgrading seems to be the only way.

Revision history for this message
Guillaume Hain (zedtux) wrote :

Hello all,

I'm running Ubuntu natty alpha 3 (with all updates until today), and postler work after a very easy hack ;)
I have modified the postler/postler-accounts.vala file like this:

$ bzr diff
=== modified file 'postler/postler-accounts.vala'
--- postler/postler-accounts.vala 2011-03-01 12:39:23 +0000
+++ postler/postler-accounts.vala 2011-03-05 09:48:10 +0000
@@ -68,13 +68,13 @@
        index is taken in place of the enum value */
     const MailFolder[] localized_folders = {
         { "INBOX", STOCK_INBOX, N_("Inbox"), null, 0, FolderType.INBOX, 0 },
- { "Sent", STOCK_SENT_MAIL, N_("Sent"), sent_folders, sent_folders.length, FolderType.SENT, 1 },
- { "Drafts", null, N_("Drafts"), drafts_folders, drafts_folders.length, FolderType.DRAFTS, 2 },
- { "Queue", STOCK_OUTBOX, N_("Outbox"), queue_folders, queue_folders.length, FolderType.QUEUE, 3 },
- { "Trash", STOCK_USER_TRASH, N_("Trash"), trash_folders, trash_folders.length, FolderType.TRASH, 4 },
- { "Archive", STOCK_ARCHIVE, N_("Archive"), archive_folders, archive_folders.length, FolderType.ARCHIVE, 5 },
+ { "Sent", STOCK_SENT_MAIL, N_("Sent"), sent_folders, 0, FolderType.SENT, 1 },
+ { "Drafts", null, N_("Drafts"), drafts_folders, 0, FolderType.DRAFTS, 2 },
+ { "Queue", STOCK_OUTBOX, N_("Outbox"), queue_folders, 0, FolderType.QUEUE, 3 },
+ { "Trash", STOCK_USER_TRASH, N_("Trash"), trash_folders, 0, FolderType.TRASH, 4 },
+ { "Archive", STOCK_ARCHIVE, N_("Archive"), archive_folders, 0, FolderType.ARCHIVE, 5 },
         /* i18n: Junk, unsolicited bulk mail, spam */
- { null, null, N_("Junk"), junk_folders, junk_folders.length, FolderType.JUNK, 6 },
+ { null, null, N_("Junk"), junk_folders, 0, FolderType.JUNK, 6 },
         { null, Gtk.STOCK_DIRECTORY, null, null, 0, FolderType.GENERIC, 7 }
     };

In short words, I have replaced all collection.length by 0 on the 5th position, and now compilation and installation work.
I have try to use Postler, and it work with my Yahoo account.

I've never used vala, and I did it quickly without searching what's the goal of those .length, but without it works!

I hope this will help you to test postler ;)

Revision history for this message
Cris Dywan (kalikiana) wrote :

zedtux, thank you for the suggestion. I can confirm this allows Postler to build. Unfortunately you are removing a wrokaround for a bug that breaks special folder recognition.
So we can't use this change however I will post this on the upstream bug.

Revision history for this message
Guillaume Hain (zedtux) wrote :

Thank you Christian for your answer.

I did it in order to compile Postler. But now, I'm intresting to understand! :)
What is "special folder recognition"?
Is one of Inbox, Trash etc... or something else?

Revision history for this message
Cris Dywan (kalikiana) wrote :

Yes, Trash, Sent, Queue and friends. If you create a new account with the above change, those will not be recognised.

Revision history for this message
Brendan Martens (shrift) wrote :

I am getting the same error with vala 0.11.7:

../postler/postler-accounts.vala:69.44-69.44: error: Value must be constant

And right after it:

../postler/postler-cellrenderertoggle.vala:40.47-40.55: error: Argument 2: Cannot pass value to reference or output parameter

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

Spec URL: http://thm.fedorapeople.org/postler/postler.spec
SRPM URL: http://thm.fedorapeople.org/postler/postler-0.1.1-1.fc14.src.rpm

Description:
Postler aims to be easy, simple, clean, beautiful, and automagic. It
handles IMAP beautifully, and provides the user with smart, sensible
defaults.

Revision history for this message
In , Fabian (fabian-redhat-bugs) wrote :

Shouldn't libidentify included first?

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

(In reply to comment #1)
> Shouldn't libidentify included first?

Sorry, a typo on my side. It is libindicate, and I'm currently preparing a package. But it seems not strictly necessary for postler and can be enabled later. (And for various reasons it seems unlikely we can have libindicate in F14.)

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

As libindicate is part of Ayatana I doubt it'll be in Fedora. So no reason to wait for it.

Just as in bug 690953 I think the description should not include the word "sexy" and the language doesn't matter to the user either.

According to the packaging guidelines you should not build with the included waf copy but with the system's version if possible.

The two warnings form desktop-file-validate are bogus: According to the spec "Email" needs either "Office" or "Network" but not both and the latter is in place. The x-scheme-handler/mailto MIME type is required for GNOME3's default applications dialog, see bug 690298. There is no need to contact upstream about the desktop file warnings, I just spoke to him.

He and I have no idea about the problems with the debuginfo other than that the paths is wrong. find-debuginfo.sh is looking in postler-0.1.1/_build_/ while it is postler-0.1.1/_build_/default/postler

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

There is a problem with the icon I think: Postler includes internet-mail from elemantary-icon-theme and installs it to %{_datadir}/icons/hicolor/scalable/apps/internet-mail.svg. Themed icons/icons with a generic name should not be in hicolor because we could have another app providing internet-mail as well and we might run into a file conflict. I suggest to install it as postler.svg. It's no longer themable then, but this doesn't really matter because elementary and oxygen are the only packages to include an icon of the name "internet-mail" anyway.

Stay tuned for a full review.

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :
Download full text (6.0 KiB)

Review for 4494cd46098d379815e9df41842df4cd postler-0.1.1-1.fc14.src.rpm

OK - MUST: $ rpmlint /var/lib/mock/fedora-14-x86_64/result/postler-*
postler.src: W: spelling-error %description -l en_US automagic -> automatic, auto magic, auto-magic
postler.x86_64: W: spelling-error Summary(en_US) vala -> lava, val, ala
postler.x86_64: W: spelling-error %description -l en_US automagic -> automatic, auto magic, auto-magic
postler.x86_64: W: no-manual-page-for-binary postler
postler.x86_64: W: no-manual-page-for-binary postler-mbsync
3 packages and 0 specfiles checked; 0 errors, 5 warnings.

OK - MUST: named according to the Package Naming Guidelines
OK - MUST: spec file name matches the base package %{name}
OK - MUST: package meets the Packaging Guidelines
OK - MUST: Fedora approved license and meets the Licensing Guidelines: LGPLv2+
FIX - MUST: License field in spec file does not match the actual license
OK - MUST: license file included in %doc
OK - MUST: spec is in American English
OK - MUST: spec is legible
OK - MUST: sources match the upstream source by MD5 02e502c9f4a4b92e4ace32d9e268f06d
OK - MUST: successfully compiles and builds into binary rpms on x86_64
N/A - MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch.
OK - MUST: all build dependencies are listed in BuildRequires.
OK - MUST: handles locales properly with %find_lang
N/A - MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun.
OK - MUST: Package does not bundle copies of system libraries.
N/A - MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package
OK - MUST: owns all directories that it creates
OK - MUST: no duplicate files in the %files listing
OK - MUST: Permissions on files are set properly, includes %defattr(...)
OK - MUST: consistently uses macros
OK - MUST: package contains code, or permissable content
N/A - MUST: Large documentation files should go in a -doc subpackage
OK - MUST: Files included as %doc do not affect the runtime of the application
N/A - MUST: Header files must be in a -devel package
N/A - MUST: Static libraries must be in a -static package
N/A - MUST: library files that end in .so are in the -devel package.
N/A - MUST: devel packages must require the base package using a fully versioned dependency
OK - MUST: The package does not contain any .la libtool archives.
OK - MUST: Package contains a GUI application and includes a %{name}.desktop file, and that file is properly validated with desktop-file-validate
OK - MUST: package does not own files or directories already owned by other packages.
OK - Should: at the beginning of %install, the package runs rm -rf %{buildroot}
OK - MUST: all filenames valid UTF-8

SHOULD Items:
OK - SHOULD: Source package includes license text(s) as a separate file.
N/A - SHOULD: The description and summary sections in the package spec file should contain translations for sup...

Read more...

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

Spec URL: http://thm.fedorapeople.org/postler/postler.spec
SRPM URL: http://thm.fedorapeople.org/postler/postler-0.1.1-2.fc14.src.rpm

%changelog
* Mon Apr 4 2011 Thomas Moschny <..> - 0.1.1-2
- Changes suggested in the review ticket:
  - Fix License and Summary tags.
  - Rename icon to avoid clashes with icon theme packages.
  - BR dexter (bz 690953).

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

(In reply to comment #5)
> [...]
> ../postler/postler-accounts.vala:69.44-69.44: error: Value must be constant
> Waf: Leaving directory `/builddir/build/BUILD/postler-0.1.1/_build_'
> Build failed: -> task failed (err #1):

This is a known vala issue, covered here:
- for postler: https://bugs.launchpad.net/postler/+bug/723282
- for vala: https://bugzilla.gnome.org/show_bug.cgi?id=643010

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

(In reply to comment #3)
> The two warnings form desktop-file-validate are bogus: According to the spec
> "Email" needs either "Office" or "Network" but not both and the latter is in
> place. The x-scheme-handler/mailto MIME type is required for GNOME3's default
> applications dialog, see bug 690298. There is no need to contact upstream about
> the desktop file warnings, I just spoke to him.

Was that postler's or desktop-file-utils' upstream?

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

(In reply to comment #8)
> Was that postler's or desktop-file-utils' upstream?

Postler's. For desktop-file-utils there already is a bug report and a patch at https://bugs.freedesktop.org/show_bug.cgi?id=35844

I suggest to ignore both warnings.

(In reply to comment #7)
> (In reply to comment #5)
> > [...]
> > ../postler/postler-accounts.vala:69.44-69.44: error: Value must be constant
> > Waf: Leaving directory `/builddir/build/BUILD/postler-0.1.1/_build_'
> > Build failed: -> task failed (err #1):
>
> This is a known vala issue, covered here:

But this is a showstopper for us. :( The rest looks good, however I cannot approve the package now.

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

You will need a patch for renaming the icon because "internet-mail" also appears in the source code twice (in postler/postler-app.vala and postler/postler-accounts.vala).

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

(In reply to comment #10)
> You will need a patch for renaming the icon because "internet-mail" also
> appears in the source code twice (in postler/postler-app.vala and
> postler/postler-accounts.vala).

Thanks for the hint.

Spec URL: http://thm.fedorapeople.org/postler/postler.spec
SRPM URL: http://thm.fedorapeople.org/postler/postler-0.1.1-3.fc14.src.rpm

%changelog
* Tue Apr 5 2011 Thomas Moschny <..> - 0.1.1-3
- Use a patch for renaming the icon.

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

Ok, the vala issue are fixed and a scratch build was successfull, see
http://koji.fedoraproject.org/koji/taskinfo?taskID=2977217

Package APPROVED!

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

*** Bug 693931 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Michel (michel-redhat-bugs) wrote :

I was waiting for a fix for the Vala issue (which I just backported from Git yesterday), before finishing my Postler packaging -- sorry for the duplicate request!

Thomas, let me know if you'd like a comaintainer for this. I have some differences in my specs:

- CFLAGS needs to be manually exported; when packaging I searched for any guidelines for packaging with waf (we still really need to write one!) Funnily all the people involved in that thread on the mailing list are here -- me, you (waf maintainer) and Christoph who started the thread.

- waf build probably needs the -v option (verbose) -- that's how I discovered
  the wrong compiler flags were being used, and %{?_smp_mflags}

- link against libdb-devel (BerkeleyDB 5) rather than db4

- use system waf rather than the bundled version

Also, I started using the virtual pkgconfig(...) rather than package names, as they match up with upstream's dependency checking better.

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

(In reply to comment #14)
> I was waiting for a fix for the Vala issue (which I just backported from Git
> yesterday), before finishing my Postler packaging -- sorry for the duplicate
> request!

Thanks for applying the Vala fix!

> Thomas, let me know if you'd like a comaintainer for this.

Sure.

> I have some differences in my specs:
>
> - CFLAGS needs to be manually exported; when packaging I searched for any

Right, I will fix that while importing the package (maybe in the evening).

> guidelines for packaging with waf (we still really need to write one!) Funnily
> all the people involved in that thread on the mailing list are here -- me, you
> (waf maintainer) and Christoph who started the thread.

There has been a long thread on the devel mailing list some time ago with no real outcome. Also see below.

> - waf build probably needs the -v option (verbose) -- that's how I discovered

The -v switch didn't work on my F13 machine, and caused waf itself to crash.

> the wrong compiler flags were being used, and %{?_smp_mflags}

Not really needed, as waf automatically builds in parallel, using as many threads as it finds cores. Maybe it's nevertheless a good idea to pass -j %{?_smp_mflags}, so koji has more control.

> - link against libdb-devel (BerkeleyDB 5) rather than db4

Why's that?

> - use system waf rather than the bundled version

This is something we shouldn't do (in general, for any package, that is). I was still hoping someone else filed a request for an exception at the packaging committee. But now that I also own a package using waf, so maybe I have to do it myself.

Postler bundles waf 1.5.X, but in rawhide we are at 1.6. I didn't thoroughly test whether there are incompatibilities for postler, but in general, each package should use its bundled waf copy and not the system one. As waf is a development tool and not some sort of runtime library, the usual security argument against bundling doesn't really hold. The bundled copy is what upstream has released and tested their package with, and deviating from that is not worth the effort.

> Also, I started using the virtual pkgconfig(...) rather than package names, as they match up with upstream's dependency checking better.

Will consider this.

Changed in vala:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

New Package SCM Request
=======================
Package Name: postler
Short Description: An ultra simple desktop mail client
Owners: thm
Branches: f14 f15

Revision history for this message
Cris Dywan (kalikiana) wrote :

The build works with Vala from git master now. However there's a grave bug with regard to unread messages, no idea what the problem is. So please refrain from using this to package Postler just yet.

Revision history for this message
In , Jason (jason-redhat-bugs) wrote :

Git done (by process-git-requests).

Revision history for this message
FlyingIsFun1217 (flyingisfun1217) wrote :

And now also works from the 0.12.x release.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

postler-0.1.1-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/postler-0.1.1-4.fc15

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

postler-0.1.1-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/postler-0.1.1-4.fc14

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

postler-0.1.1-4.fc14 has been pushed to the Fedora 14 testing repository.

Revision history for this message
Devil505 (devil505) wrote :
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

postler-0.1.1-4.fc14 has been pushed to the Fedora 14 stable repository.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

postler-0.1.1-4.fc15 has been pushed to the Fedora 15 stable repository.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue should be fixed in the current version

Changed in vala (Ubuntu):
status: New → Fix Released
Changed in postler (Fedora):
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.