<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>314528</bug_id>
          
          <creation_ts>2013-02-06 15:55:05 +0000</creation_ts>
          <short_desc>On i386 system, it doesn&apos;t compile</short_desc>
          <delta_ts>2013-05-15 12:55:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>amarok</product>
          <component>Playlists/Automated Playlist Generator</component>
          <version>2.7.0</version>
          <rep_platform>FreeBSD Ports</rep_platform>
          <op_sys>FreeBSD</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>grave</bug_severity>
          <target_milestone>2.8</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Luca Pizzamiglio">luca.pizzamiglio</reporter>
          <assigned_to name="Amarok Bugs">amarok-bugs-null</assigned_to>
          <cc>edward.hades</cc>
    
    <cc>stharward</cc>
          
          <cf_commitlink>http://commits.kde.org/amarok/3fb39f10d902826cde3f30fafd2ea2596a008b97</cf_commitlink>
          <cf_versionfixedin>2.7.1</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1338339</commentid>
    <comment_count>0</comment_count>
    <who name="Luca Pizzamiglio">luca.pizzamiglio</who>
    <bug_when>2013-02-06 15:55:05 +0000</bug_when>
    <thetext>When I build Amarok on i386 I get a compile error:
/usr/ports/audio/amarok-kde4/work/amarok-2.7.0/src/playlistgenerator/constraints/PlaylistFileSize.cpp:175:
error: integer constant is too large for &apos;long&apos; type

A 64bit integer number is used without the LL suffix

Reproducible: Always

Steps to Reproduce:
1. compile using a FreeBSD on i386
2.
3.
Actual Results:  
Adding the right suffix, the problem is solved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1338340</commentid>
    <comment_count>1</comment_count>
      <attachid>76946</attachid>
    <who name="Luca Pizzamiglio">luca.pizzamiglio</who>
    <bug_when>2013-02-06 15:56:03 +0000</bug_when>
    <thetext>Created attachment 76946
Adding the suffix on 64 bit integer constant</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1338346</commentid>
    <comment_count>2</comment_count>
    <who name="Myriam Schweingruber">myriam</who>
    <bug_when>2013-02-06 16:11:03 +0000</bug_when>
    <thetext>Very strange, why did none of the distributions report that? Apparently it does build on Linux i386 systems without problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1338370</commentid>
    <comment_count>3</comment_count>
    <who name="Luca Pizzamiglio">luca.pizzamiglio</who>
    <bug_when>2013-02-06 17:13:48 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Very strange, why did none of the distributions report that? Apparently it
&gt; does build on Linux i386 systems without problems.

I guess, it&apos;s related with the old gcc version (4.2.x)  FreeBSD still uses and some automatic conversion that a newer gcc adopts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1338372</commentid>
    <comment_count>4</comment_count>
    <who name="Myriam Schweingruber">myriam</who>
    <bug_when>2013-02-06 17:20:04 +0000</bug_when>
    <thetext>Right, then I would suggest to update the Gcc version instead of asking Amarok to be compliant with outdated compilers, current is 4.7.2, your version was released over 5 years ago.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1338396</commentid>
    <comment_count>5</comment_count>
    <who name="Luca Pizzamiglio">luca.pizzamiglio</who>
    <bug_when>2013-02-06 18:23:44 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Right, then I would suggest to update the Gcc version instead of asking
&gt; Amarok to be compliant with outdated compilers, current is 4.7.2, your
&gt; version was released over 5 years ago.

I cannot explain here all related question about what you&apos;ve written, but:
* FreeBSD 8 &amp; 9 has, as default compiler, gcc 4.2.1 because newer gcc adopts GPLv3, incompatible with the BSD license.
* FreeBSD 9 and Current (10) is moving to another compiler, clang. No problem raised with it.
* The change I&apos;m proposing is covered by the C99 standard, so perfectly compliant with almost every new compilers. It&apos;s a minimal modification, just add the ULL or LL suffix to a number, to specify that it&apos;s a 64 bit integer. In my personal opinion, it improves readability and compatibility.
* we use, when we find a problem, to propose a patch to be integrated in the mainline, when this patch contributes to compatibility without damage the original source code (that&apos;s the case)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1359632</commentid>
    <comment_count>6</comment_count>
    <who name="Edward Hades">edward.hades</who>
    <bug_when>2013-04-11 14:29:10 +0000</bug_when>
    <thetext>Git commit c20d7bc1698c5322cc272d37baa7016a6477b2d8 by Edward Toroshchin.
Committed on 11/04/2013 at 16:21.
Pushed by hades into branch &apos;master&apos;.

Fix compilation error on gcc-4.2

Thanks Luca Pizzamiglio for pointing it out and providing a fix.

FIXED-IN: 2.8

M  +1    -0    ChangeLog
M  +5    -5    src/playlistgenerator/constraints/PlaylistFileSize.cpp

http://commits.kde.org/amarok/c20d7bc1698c5322cc272d37baa7016a6477b2d8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1368863</commentid>
    <comment_count>7</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-05-14 21:25:22 +0000</bug_when>
    <thetext>Git commit 3fb39f10d902826cde3f30fafd2ea2596a008b97 by Matěj Laitl, on behalf of Edward Toroshchin.
Committed on 11/04/2013 at 16:21.
Pushed by laitl into branch &apos;v2.7.x&apos;.

Fix compilation error on gcc-4.2

Thanks Luca Pizzamiglio for pointing it out and providing a fix.

FIXED-IN: 2.8

M  +1    -0    ChangeLog
M  +5    -5    src/playlistgenerator/constraints/PlaylistFileSize.cpp

http://commits.kde.org/amarok/3fb39f10d902826cde3f30fafd2ea2596a008b97</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>76946</attachid>
            <date>2013-02-06 15:56:03 +0000</date>
            <delta_ts>2013-02-06 15:56:03 +0000</delta_ts>
            <desc>Adding the suffix on 64 bit integer constant</desc>
            <filename>patch-src-playlistgenerator-constraints-PlaylistFileSize.cpp</filename>
            <type>text/plain</type>
            <size>561</size>
            <attacher name="Luca Pizzamiglio">luca.pizzamiglio</attacher>
            
              <data encoding="base64">LS0tIFBsYXlsaXN0RmlsZVNpemUuY3BwLm9yaWcJMjAxMy0wMi0wNiAxMTo1OTozMi4wMDAwMDAw
MDAgKzAxMDAKKysrIFBsYXlsaXN0RmlsZVNpemUuY3BwCTIwMTMtMDItMDYgMTE6NTc6NTYuMDAw
MDAwMDAwICswMTAwCkBAIC0xNzIsNyArMTcyLDcgQEAKICAgICAgICAgY2FzZSAyOgogICAgICAg
ICAgICAgcmV0dXJuIHN0YXRpY19jYXN0PHF1aW50NjQ+KCBtX3NpemUgKSAqIHN0YXRpY19jYXN0
PHF1aW50NjQ+KCAxMDAwMDAwMDAwICk7CiAgICAgICAgIGNhc2UgMzoKLSAgICAgICAgICAgIHJl
dHVybiBzdGF0aWNfY2FzdDxxdWludDY0PiggbV9zaXplICkgKiBzdGF0aWNfY2FzdDxxdWludDY0
PiggMTAwMDAwMDAwMDAwMCApOworICAgICAgICAgICAgcmV0dXJuIHN0YXRpY19jYXN0PHF1aW50
NjQ+KCBtX3NpemUgKSAqIHN0YXRpY19jYXN0PHF1aW50NjQ+KCAxMDAwMDAwMDAwMDAwTEwgKTsK
ICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgIHJldHVybiBzdGF0aWNfY2FzdDxxdWludDY0
PiggbV9zaXplICkgKiBzdGF0aWNfY2FzdDxxdWludDY0PiggMSApOwogICAgIH0K
</data>

          </attachment>
      

    </bug>

</bugzilla>