Build error on Arch Linux in GTK3-configure switch

Bug #1239370 reported by Stefan Husmann on 2013-10-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
Unassigned

Bug Description

Hello,

recently compiling Inkscape from BZR repo yields:

color-profile.cpp:976:8: error: 'Gdk' does not name a type
 static Gdk::Color lastGamutColor("#808080");
        ^
color-profile.cpp: In static member function 'static void* Inkscape::CMSSystem::getDisplayTransform()':
color-profile.cpp:1121:5: error: 'Gdk' has not been declared
     Gdk::Color gamutColor( colorStr.empty() ? "#808080" : colorStr );
     ^
color-profile.cpp:1121:16: error: expected ';' before 'gamutColor'
     Gdk::Color gamutColor( colorStr.empty() ? "#808080" : colorStr );
                ^
color-profile.cpp:1130:14: error: 'gamutColor' was not declared in this scope
          || (gamutColor != lastGamutColor)
              ^
color-profile.cpp:1130:28: error: 'lastGamutColor' was not declared in this scope
          || (gamutColor != lastGamutColor)
                            ^
color-profile.cpp:1156:36: error: 'gamutColor' was not declared in this scope
                 newAlarmCodes[0] = gamutColor.get_red();
                                    ^
color-profile.cpp: In static member function 'static void* Inkscape::CMSSystem::getDisplayPer(const Glib::ustring&)':
color-profile.cpp:1291:17: error: 'Gdk' has not been declared
                 Gdk::Color gamutColor( colorStr.empty() ? "#808080" : colorStr );
                 ^
color-profile.cpp:1291:28: error: expected ';' before 'gamutColor'
                 Gdk::Color gamutColor( colorStr.empty() ? "#808080" : colorStr );
                            ^
color-profile.cpp:1300:26: error: 'gamutColor' was not declared in this scope
                      || (gamutColor != lastGamutColor)
                          ^
color-profile.cpp:1300:40: error: 'lastGamutColor' was not declared in this scope
                      || (gamutColor != lastGamutColor)
                                        ^
color-profile.cpp:1325:48: error: 'gamutColor' was not declared in this scope
                             newAlarmCodes[0] = gamutColor.get_red();
                                                ^
color-profile.cpp: At global scope:
color-profile.cpp:190:7: warning: '{anonymous}::rectRegistered' defined but not used [-Wunused-variable]
  bool rectRegistered = SPFactory::instance().registerObject("svg:color-profile", createColorProfile);
       ^
make[3]: *** [color-profile.o] Error 1
make[3]: Leaving directory `/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/haawda/paketierung/maintained_by_me/inkscape-gtk3-bzr/src/inkscape'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Some new dependencies?

su_v (suv-lp) wrote :

> Some new dependencies?

No. Which versions of GTK3, gtkmm, Glib, glibmm does ArchLinux currently provide, and which compiler did you use?

su_v (suv-lp) wrote :

Correction: s/gtkmm/gtkmm3/

tags: added: build gtk3
su_v (suv-lp) wrote :

Latest GTK3 build from inkscape-trunk PPA (r12679) was successful:
Build log Ubuntu 13.10 (Saucy):
<https://launchpadlibrarian.net/153650613/buildlog_ubuntu-saucy-amd64.inkscape-trunk_1%3A0.48%2Bdevel%2B12679%2B44~ubuntu13.10.1_UPLOADING.txt.gz>

Stefan Husmann (stefan-husmann) wrote :

GTK3: 3.10.1
gtkmm3: 3.10.0
glib2: 2.38.0
glibmm: 2.38.0

Stefan Husmann (stefan-husmann) wrote :

Sorry, forgot gcc: 4.8.1

su_v (suv-lp) wrote :

Reproduced on OS X 10.7.5, GTK3/X11, after upgrading these dependencies:
glibmm 2.36.2_0 < 2.38.0_0
gtk3 3.10.0_0 < 3.10.1_0
gtkmm3 3.8.1_100 < 3.10.0_100

Unchanged:
glib2: 2.38.0
(latest build r12687 before upgrading the dependencies succeeded)

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
su_v (suv-lp) wrote :

Build (r12687) succeeds without fatal error if configured with '--disable-strict-build'.

Alex Valavanis (valavanisalex) wrote :

It looks like gtkmm 3.10 has finally marked Gdk::Color as being deprecated in favour of Gdk::RGBA. Should be a relatively easy fix, I hope.

Changed in inkscape:
status: Confirmed → Triaged
Alex Valavanis (valavanisalex) wrote :

Hopefully fixed in lp:inkscape r12689. Please test :)

su_v (suv-lp) wrote :
Download full text (3.3 KiB)

Latest builds of r12789 and r12791 on OS X 10.7.5:

1) GTK+/X11 3.4 --> FAILS
  glib2 2.32.4
  glibmm 2.32.1
  gtk3 3.4.4
  gtkmm3 3.4.0

2) GTK+/Quartz 3.6 --> FAILS
  glib2 2.34.3
  glibmm 2.34.1
  gtk3 3.6.4
  gtkmm3 3.6.0

3) GTK+/Quartz 3.8/3.10 --> FAILS
  glib2 2.38.0
  glibmm 2.36.2
  gtk3 3.10.0
  gtkmm3 3.8.1

4) GTK+/X11 3.10 --> FAILS
  glib2 2.38.0
  glibmm 2.38.0
  gtk3 3.10.1
  gtkmm3 3.10.0

Build error (r12789) with GTK+/Quartz 3.6 using
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00):

  CXX color-profile.o
In file included from ../../src/color-profile.cpp:36:
/Volumes/cyan/mp-test/with-a-long-long-long-directory-name/include/lcms.h: In function ‘void* _cmsMalloc(size_t)’:
/Volumes/cyan/mp-test/with-a-long-long-long-directory-name/include/lcms.h:1418: warning: comparison of unsigned expression < 0 is always false
../../src/color-profile.cpp: In static member function ‘static void* Inkscape::CMSSystem::getDisplayTransform()’:
../../src/color-profile.cpp:1169: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator>>’
../../src/color-profile.cpp:1169: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator>>’
../../src/color-profile.cpp:1169: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator>>’
../../src/color-profile.cpp: In static member function ‘static void* Inkscape::CMSSystem::getDisplayPer(const Glib::ustring&)’:
../../src/color-profile.cpp:1343: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator>>’
../../src/color-profile.cpp:1343: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator>>’
../../src/color-profile.cpp:1343: error: invalid operands of types ‘double’ and ‘int’ to binary ‘operator>>’
../../src/color-profile.cpp: At global scope:
../../src/color-profile.cpp:195: warning: ‘<unnamed>::rectRegistered’ defined but not used
make[3]: *** [color-profile.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Build error (r12789) with GTK+/X11 3.10 using
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn):

  CXX color-profile.o
In file included from ../../src/color-profile.cpp:36:
/Volumes/magenta/mp-trunk/x11/include/lcms.h:1418:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (size < 0) return NULL; // Prevent signed size_t exploits
        ~~~~ ^ ~
../../src/color-profile.cpp:1169:55: error: invalid operands to binary expression ('double' and 'int')
                cmsSetAlarmCodes(gamutColor.get_red() >> 8, gamutColor.get_green() >> 8, gamutColor.get_blue() >> 8);
                                 ~~~~~~~~~~~~~~~~~~~~ ^ ~
../../src/color-profile.cpp:1343:67: error: invalid operands to binary expression ('double' and 'int')
                            cmsSetAlarmCodes(gamutColor.get_red() >> 8, gamutColor.get_green() >> 8, gamutColor.get_blue() >> 8);
                                             ~~~~~~~~~~~~~~~~~~~~ ^ ~
1 warning and 2 errors generat...

Read more...

Tested with r12791 under Arch Linux. Fixed.

Thanks.

su_v (suv-lp) wrote :

> Latest builds of (…) r12791 on OS X 10.7.5 (…) --> FAILS
> Tested with r12791 under Arch Linux. Fixed.

Build failure on OS X possibly related to still being forced to use lcms1 with OS X ports of inkscape (see also bug #1133014 and bug #1024344) - all other supported platforms by now use lcms2 in inkscape.

su_v (suv-lp) wrote :

> Build failure on OS X possibly related to still being forced to use lcms1

Builds succeed on OS X too, after forcing the use of lcms2 2.4 (by removing the platform test for the lcms2 check in configure.ac), both with gtkmm3 3.8.1 and gtkmm3 3.10.0.

--> fix is needed for LCMS1 + gtkmm3 3.10.0.

Alex Valavanis (valavanisalex) wrote :

Hmm OK... will see if I can reproduce the problem on linux with lcms1 + gtkmm 3.10.

@suv - Can you remind me what the deal is with lcms2 on OS X? Is there a good reason to keep lcms1 support?

su_v (suv-lp) wrote :

@Alex: I don't know more details about why Jon Cruz disabled the usage of lcms2 on OS X:
<https://bugs.launchpad.net/inkscape/+bug/1133014/comments/3>

In a few quick tests with the latest builds (GTK2 + lcms2 2.4, OS X 10.7.5) I haven't encountered any crashes related to color management (soft proofing as well as linking color profiles to documents and using them via Fill&Stroke seems to work the same as with the lcms1-based builds). I'll keep monitoring it, but I'm hesitant to propose to remove that configure platform test for LCMS2 because I don't know what issues Jon Cruz encountered with his builds on Snow Leopard.

Alex Valavanis (valavanisalex) wrote :

OK - I've subscribed Jon Cruz...

@Jon - if you have time, please could you provide a very quick summary of the issues with OSX & lcms2? Personally, I'd prefer to remove lcms1 support before 0.49 release if possible... the fewer config options we need to support, the better!

Alex Valavanis (valavanisalex) wrote :

OK, I see the problem with Gtkmm 3 and lcms1. Basically, RGBA::get_red() returns the red component as a percentage, whereas Color::get_red() returns an integer.

My "fix" for Gtkmm 3 builds is, therefore, dodgy and I'll need to sort it out! There is an equivalent RGBA::get_red_u() function that returns an unsigned int.

Alex Valavanis (valavanisalex) wrote :

Also, this could get very messy... we now need to support four different incompatible API cases:

lcms 1 + gtkmm 2
lcms 1 + gtkmm 3
lcms 2 + gtkmm 2
lcms 2 + gtkmm 3

If we can drop lcms1 support, it'll be *much* neater with less scope for errors!

Alex Valavanis (valavanisalex) wrote :

Hopefully fixed in lp:inkscape r12694. Please let me know if any further problems.

su_v (suv-lp) wrote :

Successfully compiled combinations (r12694, OS X 10.7.5) [1]:

lcms 1.19
+ gtkmm 2.24.2, gtkmm 2.24.4
+ gtkmm3 3.4.0, gtkmm3 3.6.0, gtkmm3 3.8.1, gtkmm3 3.10.0

lcms2 2.3
+ gtkmm 2.24.2

lcms2 2.4
+ gtkmm 2.24.4
+ gtkmm3 3.8.1, gtkmm3 3.10.0

--
[1] Note: build success does not imply having tested runtime color management features with individual build

su_v (suv-lp) on 2014-01-27
Changed in inkscape:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers