Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#18135 closed defect (worksforme)

gimp2: no_x11 variant still links against X11

Reported by: simon@… Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: no_x11 quartz Cc:
Port: gimp2

Description

When using the no_x11 or quartz variant for the gimp2 port the file-uri plugin links against X11 as disabling gvfs is the standard behaviour. the no_x11/quartz variants should require the gvfs variant so file-uri no longer needs to depend on X11 libs or even throw errors during compilation if no X11 is installed.

Reference: http://bugzilla.gnome.org/show_bug.cgi?id=568489

Patch attached

Attachments (1)

gimp.diff (472 bytes) - added by simon@… 15 years ago.

Download all attachments as: .zip

Change History (8)

Changed 15 years ago by simon@…

Attachment: gimp.diff added

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Cc: devans@… removed
Owner: changed from macports-tickets@… to devans@…

comment:2 Changed 15 years ago by dbevans (David B. Evans)

Keywords: gimp2 removed
Status: newassigned

I'm surprised to hear this as I spent the past weekend building the gimp port (including gimp2) from scratch in the native mode. The build went well with no tendency to install X11 related ports and gimp runs with no errors (including file-uri) and no references to X11 at all. Even gnome-vfs built without X11 references so this is possible.

The key to success here is to make sure that not only gimp2 but all dependencies (and their dependencies, etc) are built without reference to X11 as any dependency that accidentally gets built with X11 will typically forward that X11 dependency upwards to its dependents via its pkg-config files.

Because of this, it is, IMO, impractical to acheive this in a MacPorts installation that is trying to build both +x11 and +no_x11 ports. I, therefore, recommend using a separate installation of MacPorts for no_x11/quartz development using a different path than the default. I user /opt/local for X11 development and /opt/gtk for no_x11 development and switch between the two by changing my $path.

Here is what I did to acheive success:

  • installed a fresh MacPorts installation (1.7.0) using path /opt/gtk and set shell search path to this. At this point, no ports installed at all.
  • in /opt/gtk/etc/macports/variants.conf add +no_x11 +quartz to apply these variants to all dependent ports. At this point both are needed as the use of these variants is still not completely consistent.
  • sudo port install gimp2 (or gimp if you want all the bells and whistles)
  • wait a long time (about 24 hours on my old G4).

Is this consistent with what you did? What exactly were the symptoms that you experienced (compile time, run time, etc?). Is MacPorts finding and building X11 dependencies or is the build complaining it can't find a X11 reference (indicating a requirement forwarded by pkg-config typically).

BTW, the build I did was just before the recent wholesale dependency changes concerning the xorg-* ports and references to them so I am rebuilding gimp2 now as we speak to make sure that that didn't introduce any new unwanted X11 dependencies.

I'm considering the issue with gvfs to be a separate issue, that is, the relative merits of gvfs vs gnome-vfs as contrary to popular belief (as in Sven's reply to your bug report) gnome-vfs will build and run without X11 if its dependencies are X11 clean. The main culprit here is usually dbus which needs to be built without X11 support (now the default in the latest dbus port in MacPorts).

Actually, I would prefer to use gvfs as part of a general move away from gnome specific functionality to GTK functionality where available but for the present case I think that change just masks the real problem of gnome-vfs and dependents being built with X11 when it should be without.

I had gvfs as the default originally for the 2.6 branch but I received some reports that it didn't work in MacPorts so I reverted to gnome-vfs as the default. Is this working for you? If so I would prefer to make gvfs the default for all cases rather than just a requirement for no_x11.

Thanks for your report and I appreciate your frustration. Looking forward to more details so we can get to the bottom of this.

comment:3 Changed 15 years ago by simon@…

I built it the same way, my whole /opt/local repo is +no_x11 and +quartz variant wise. I had linking errors during the compilation as file-uri could not link against the X session manager in libXsm. I also built it before the xorg-* changes as installing Xquartz fixed that problem.

Also I am not sure about the correctness of the comment to the bugreport on gnome.org. My libgnomevfs is not linked against X11 at all, but it looks like libgnomeui has some old X11 dependencies. I guess I need to rebuild all involved ports first as after the xorg-* changes gnome-vfs should work fine (at least it sounds as if it should).

comment:4 Changed 15 years ago by dbevans (David B. Evans)

My rebuild of gimp2 just finished with no adverse effects.

libgnomeui needs to be built with +no_x11. In fact, the ports that need to be built specially can be found with

devans% port installed variants:quartz variants:no_x11
The following ports are currently installed:
  cairo @1.8.6_3+macosx+no_x11 (active)
  gimp-app @2.6.0_1+quartz (active)
  gimp2 @2.6.4_0+no_x11+quartz (active)
  graphviz @2.20.3_1+macosx+no_pangocairo+no_x11 (active)
  gtk2 @2.14.7_1+darwin_8+no_x11+quartz (active)
  libgnomeui @2.24.0_0+no_x11 (active)
  libsdl @1.2.13_5+darwin_8+no_x11 (active)
  pango @1.22.4_1+no_x11 (active)
  poppler @0.10.3_0+quartz (active)

This will display ports installed that have either of the two variants and what version is actually installed. So if the installed version doesn't show at least one or the other of +quartz or +no_x11 it needs to be rebuilt with the appropriate variant and then all dependents need to be rebuilt in ascending order.

comment:5 Changed 15 years ago by simon@…

Yes, looks like after the xorg-* changes everything builds without X11 deps for me, too. This is strange, but I guess there's no need for a gvfs dependency anymore :)

comment:6 Changed 15 years ago by dbevans (David B. Evans)

Resolution: worksforme
Status: assignedclosed

Great. Glad to see its working.

comment:7 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.