Opened 15 years ago

Closed 14 years ago

#18209 closed defect (fixed)

ufraw 0.15 fails to build

Reported by: macports@… Owned by: frank.mcpherson@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: ryanjohns@…, ryandesign (Ryan Carsten Schmidt)
Port: ufraw

Description

The error I get is:

$ sudo port install gimp +no_x11 +quartz
--->  Fetching ufraw
--->  Verifying checksum(s) for ufraw
--->  Extracting ufraw
--->  Configuring ufraw
--->  Building ufraw
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_ufraw/work/ufraw-0.15" && make all " returned error 2
Command output: /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I.  -I/opt/local/include   -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12   -I/opt/local/include    -I/opt/local/include/libpng12   -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include  -O2  -MT ufraw_delete.o -MD -MP -MF .deps/ufraw_delete.Tpo -c -o ufraw_delete.o ufraw_delete.c
mv -f .deps/ufraw_delete.Tpo .deps/ufraw_delete.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I.  -I/opt/local/include   -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12   -I/opt/local/include    -I/opt/local/include/libpng12   -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include  -O2  -MT ufraw_chooser.o -MD -MP -MF .deps/ufraw_chooser.Tpo -c -o ufraw_chooser.o ufraw_chooser.c
mv -f .deps/ufraw_chooser.Tpo .deps/ufraw_chooser.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I.  -I/opt/local/include   -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12   -I/opt/local/include    -I/opt/local/include/libpng12   -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include  -O2  -MT ufraw_icons.o -MD -MP -MF .deps/ufraw_icons.Tpo -c -o ufraw_icons.o ufraw_icons.c
mv -f .deps/ufraw_icons.Tpo .deps/ufraw_icons.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I.  -I/opt/local/include   -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12   -I/opt/local/include    -I/opt/local/include/libpng12   -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include  -O2  -MT curveeditor_widget.o -MD -MP -MF .deps/curveeditor_widget.Tpo -c -o curveeditor_widget.o curveeditor_widget.c
mv -f .deps/curveeditor_widget.Tpo .deps/curveeditor_widget.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I.  -I/opt/local/include   -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12   -I/opt/local/include    -I/opt/local/include/libpng12   -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include  -O2  -MT ufraw_lens_ui.o -MD -MP -MF .deps/ufraw_lens_ui.Tpo -c -o ufraw_lens_ui.o ufraw_lens_ui.c
mv -f .deps/ufraw_lens_ui.Tpo .deps/ufraw_lens_ui.Po
rm -f libufraw.a
ar cru libufraw.a dcraw.o ufraw_ufraw.o ufraw_routines.o ufraw_developer.o ufraw_conf.o ufraw_writer.o ufraw_embedded.o ufraw_message.o wb_presets.o dcraw_api.o dcraw_indi.o nikon_curve.o uf_gtk.o ufraw_exiv2.o iccjpeg.o ufraw_preview.o ufraw_saver.o ufraw_delete.o ufraw_chooser.o ufraw_icons.o curveeditor_widget.o ufraw_lens_ui.o 
ranlib: file: libufraw.a(ufraw_lens_ui.o) has no symbols
ranlib libufraw.a
ranlib: file: libufraw.a(ufraw_lens_ui.o) has no symbols
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I.  -I/opt/local/include   -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12   -I/opt/local/include    -I/opt/local/include/libpng12   -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include  -O2  -MT ufraw.o -MD -MP -MF .deps/ufraw.Tpo -c -o ufraw.o ufraw.c
mv -f .deps/ufraw.Tpo .deps/ufraw.Po
/usr/bin/g++-4.0  -O2   -L/opt/local/lib -o ufraw ufraw.o libufraw.a  -R/opt/local/lib -Wl,-framework -Wl,CoreFoundation -L/opt/local/lib -lexiv2 -lintl -lc -liconv -lz -lexpat   -L/opt/local/lib -lglib-2.0 -lintl -liconv   -L/opt/local/lib -llcms    -L/opt/local/lib -lpng12 -lz   -L/opt/local/lib -lgtkimageview -lgtk-quartz-2.0 -lgdk-quartz-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 -lm -lpixman-1 -lfontconfig -lexpat -lfreetype -lpng12 -lz -lXrender -lX11 -lXau -lXdmcp -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv   -ltiff -ljpeg -lbz2 -lz  -lintl 
Undefined symbols:
  "_CMCloseProfile", referenced from:
      _uf_get_display_profile in libufraw.a(uf_gtk.o)
  "_CMFlattenProfile", referenced from:
      _uf_get_display_profile in libufraw.a(uf_gtk.o)
  "_CMGetProfileByAVID", referenced from:
      _uf_get_display_profile in libufraw.a(uf_gtk.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [ufraw] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: The following dependencies failed to build: ufraw xsane sane-backends libusb
Error: Status 1 encountered during processing.

Change History (16)

comment:1 Changed 15 years ago by blb@…

Owner: changed from macports-tickets@… to frank.mcpherson@…

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

Cc: ryanjohns@… devans@… added

Ccing reporter of duplicate #18667.

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

It looks like you have a problem with your +no_x11 build environment as the link line that is failing above includes X11 library dependencies.

I just tried rebuilding ufraw here and it completed successfully with a slightly different link line as follows:

/usr/bin/g++-4.0  -O2   -L/opt/gtk/lib -o ufraw ufraw.o libufraw.a  -R/opt/gtk/lib -Wl,-framework -Wl,CoreFoundation -L/opt/gtk/lib -lexiv2 -lintl -lc -liconv -lz -lexpat   -L/opt/gtk/lib -lglib-2.0 -lintl -liconv   -L/opt/gtk/lib -llcms    -L/opt/gtk/lib -lpng12 -lz   -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices -L/opt/gtk/lib -lgtkimageview -lgtk-quartz-2.0 -lgdk-quartz-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 -lm -lpixman-1 -lfontconfig -lexpat -lfreetype -lpng12 -lz -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv   -ltiff -ljpeg -lbz2 -lz  -lintl

To build gimp successfully with +no_x11 +quartz you need to build all of its dependencies with these variants with no X11 ports installed. Practically this means that you should install a clean instance of MacPorts that you use only for building with these variants and define +no_x11 +quartz in ${prefix}/etc/macports/variants.conf. Then build from scratch with just

sudo port install gimp

If you see any attempt to install xorg-* ports then something is wrong.

Finally I recommend that you install MacPorts from trunk for this type of build as currently only the trunk version will properly upgrade your ports respecting the global variants.

Basically, trying to build +x11 and +no_x11 ports in the same instance of MacPorts just doesn't work. If you want both you need to install separate instances for each. See the topic on installing multiple instances of MacPorts in the guide. http://guide.macports.org

comment:4 Changed 15 years ago by ryanjohns@…

I actually uninstalled all my ports and modified my variants.conf file before attempting to build gimp with +quartz in an attempt to avoid this problem by doing the following.

sudo port uninstall -f installed
sudo port clean -f --all all
edit variants.conf to include +no_static +no_x11 -x11 +quartz
sudo port selfupdate
sudo port install gimp

Yet I still received the error message. I'm going to follow your recommendations and start over with a fresh install of macports from trunk.

Three questions about macports trunk.

1) Am I correct in assuming that running 'sudo port selfupdate' will actually downgrade to the latest release version? Therefore, I need to use 'sudo port sync' to get updates.

2) Do I want to use the trunk ports tree or the regular release version?

3) If I want to install a port like 'tightvnc' which uses x11 but doesn't have a quartz variant, will this cause problems with other quartz-built ports like gimp and gnucash? If the answer to this question is yes then I will install 2 copies of macports.

Thanks for your help.

comment:5 in reply to:  4 Changed 15 years ago by dbevans (David B. Evans)

Replying to ryanjohns@…:

edit variants.conf to include +no_static +no_x11 -x11 +quartz

Really only +no_x11 and +quartz are necessary for gimp. -x11 is sort of a noop as all the ports with +no_x11 turn off +x11 if it exists now. I assume the +no_static has to do with your other quartz port but it isn't necessary for gimp.

Yet I still received the error message. I'm going to follow your recommendations and start over with a fresh install of macports from trunk.

You might try doing it in pieces to isolate where the problem is. If you're starting from scratch I would do

sudo port install gimp2   // which installs the gimp application and default plugins
sudo port install ufraw   // add the ufraw plugin

if this works then you can install gimp to fill in the rest

1) Am I correct in assuming that running 'sudo port selfupdate' will actually downgrade to the latest release version? Therefore, I need to use 'sudo port sync' to get updates.

No it will sync the ports and then tell you that you have the most recent as trunk says it is version 1.8.0. If you wanted to downgrade you would have to use the -f option to force selfupdate. But as you say sync is sufficient to update the ports tree.

2) Do I want to use the trunk ports tree or the regular release version?

They are the same.

3) If I want to install a port like 'tightvnc' which uses x11 but doesn't have a quartz variant, will this cause problems with other quartz-built ports like gimp and gnucash? If the answer to this question is yes then I will install 2 copies of macports.

yes, it will cause problems if any of the common dependencies of tightvnc and gimp have both x11 and no_x11 variants. So, it is easiest to have separate environments. I use three, one for x11, one for no_x11 and one for system_x11. Be sure and pay attention to the instructions for doing this in the guide. the directory that you want to build from is trunk/base instead of the tar ball. Then you can switch from one to the other by changing your PATH (with a script say). I have x11 installed at /opt/local for instance and the no_x11 installed at /opt/gtk.

By the way, in case it matters, my successful build of ufraw is on 10.4.11 ppc with XCode 2.5.

comment:6 Changed 15 years ago by ryanjohns@…

I have installed macports from trunk and all seems to be working correctly except I received the following error when running 'sudo port sync' for the first time

Warning: Can't open index file: /opt/local/var/macports/sources/rsync.macports.org/release/ports/PortIndex
Warning: No index(es) found! Have you synced your source indexes?

Subsequent attempts to run 'sudo port sync' or 'sudo port -d sync' or 'sudo port selfupdate' all run fine with no errors, however, when I try to do 'port variants gimp' it gives the same error.

Warning: Can't open index file: /opt/local/var/macports/sources/rsync.macports.org/release/ports/PortIndex
Warning: No index(es) found! Have you synced your source indexes?
Error: Port gimp not found

I cannot figure out how to fix this.

Also, what is the system_x11 variant and how does it differ from quartz and no_x11?

Thanks for your continued help, I appreciate it very much.

comment:7 in reply to:  6 ; Changed 15 years ago by ryanjohns@…

Replying to ryanjohns@…:

I have installed macports from trunk and all seems to be working correctly except I received the following error when running 'sudo port sync' for the first time

Warning: Can't open index file: /opt/local/var/macports/sources/rsync.macports.org/release/ports/PortIndex
Warning: No index(es) found! Have you synced your source indexes?

Subsequent attempts to run 'sudo port sync' or 'sudo port -d sync' or 'sudo port selfupdate' all run fine with no errors, however, when I try to do 'port variants gimp' it gives the same error.

Warning: Can't open index file: /opt/local/var/macports/sources/rsync.macports.org/release/ports/PortIndex
Warning: No index(es) found! Have you synced your source indexes?
Error: Port gimp not found

I cannot figure out how to fix this.

Also, what is the system_x11 variant and how does it differ from quartz and no_x11?

Thanks for your continued help, I appreciate it very much.

I should add that /opt/local/var/macports/sources/rsync.macports.org/release/ports/PortIndex does exist. If I remove it and re-run 'sudo port sync' the file is re-created but the same issue persists. Also, directories do exist for all the main port categories inside the ports directory where PortIndex resides.

comment:8 in reply to:  7 Changed 15 years ago by dbevans (David B. Evans)

Replying to ryanjohns@…: system_x11 variant is an X11 installation that installs stubs for all the xorg-* ports so that your ports build against the X11 libraries that come with MacOSX instead of the newer MacPorts ones. Not really recommended now but I test my ports against it for completeness.

Well, I'm not really sure what your problem is now and I must confess that this is not the way, I do it. I use one installation of the trunk ports tree, that I keep up to date with svn and then configure the various MacPorts installations to point to it.

For instance, my ports tree is at /opt/macports/trunk/dports and so for each of the installations I edit ${prefix}/etc/macports/sources.conf to change

rsync://rsync.macports.org/release/ports/ [default]

to

file:///opt/macports/trunk/dports/ [default]

and then

cd /opt/macports/trunk/dports
svn update
port outdated   // or whatever

comment:9 Changed 15 years ago by ryanjohns@…

So I'm still getting the same build error after all this. Here is my current configuration.

-Uninstalled all ports and uninstalled macports following the instructions in the guide.
-Updated XCode to 3.1.2
-Installed macports trunk from svn checkout and configured sources.conf to use the svn port-tree.
-Added +no_x11 +quartz to variants.conf
-Ensured my environment was setup correctly.
-Installed gnucash (installed perfectly and runs perfectly)
-Installed gimp2 (installed perfectly and runs perfectly)
-Installed ufraw (link error)
-Installed gimp-app macclipboard-gimp macfile-gimp gtk-nodoka-engine (all work perfectly)

I don't really need any of the other plugins including ufraw so its not a big deal but I still can't figure out why it wont link correctly.

I did notice that the installation of gimp2 installed several xorg-* packages as dependencies, which doesn't seem right.

Here is a list of the xorg-* ports that I have installed (all were installed during the install of gimp2)

xorg-bigreqsproto @1.0.2_0 (active)
xorg-inputproto @1.5.0_0 (active)
xorg-kbproto @1.0.3_0 (active)
xorg-libice @1.0.5_0 (active)
xorg-libsm @1.1.0_0 (active)
xorg-libX11 @1.2_0 (active)
xorg-libXau @1.0.4_0 (active)
xorg-libXaw @1.0.5_0 (active)
xorg-libXdmcp @1.0.2_0 (active)
xorg-libXext @1.0.5_0 (active)
xorg-libXmu @1.0.4_0 (active)
xorg-libXt @1.0.5_1 (active)
xorg-util-macros @1.2.1_1 (active)
xorg-xcmiscproto @1.1.2_0 (active)
xorg-xextproto @7.0.5_0 (active)
xorg-xf86bigfontproto @1.1.2_0 (active)
xorg-xproto @7.0.14_1 (active)
xorg-xtrans @1.2.3_0 (active)

comment:10 Changed 15 years ago by takojagi@…

I'm getting the same build error.

--->  Building ufraw
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_ufraw/work/ufraw-0.15" && make all " returned error 2
Command output: make  all-recursive
Making all in po
make[2]: Nothing to be done for `all'.
Making all in icons
make[2]: Nothing to be done for `all'.
/usr/bin/g++-4.0  -O2   -L/opt/local/lib -o ufraw ufraw.o libufraw.a  -R/opt/local/lib -Wl,-framework -Wl,CoreFoundation -L/opt/local/lib -lexiv2 -lintl -lc -liconv -lz -lexpat   -L/opt/local/lib -lglib-2.0 -lintl -liconv   -L/opt/local/lib -llcms    -L/opt/local/lib -lpng12 -lz   -L/opt/local/lib -lgtkimageview -lgtk-quartz-2.0 -lgdk-quartz-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 -lm -lpixman-1 -lfontconfig -lexpat -lfreetype -lpng12 -lz -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv   -ltiff -ljpeg -lbz2 -lz  -lintl 
Undefined symbols:
  "_CMCloseProfile", referenced from:
      _uf_get_display_profile in libufraw.a(uf_gtk.o)
  "_CMFlattenProfile", referenced from:
      _uf_get_display_profile in libufraw.a(uf_gtk.o)
  "_CMGetProfileByAVID", referenced from:
      _uf_get_display_profile in libufraw.a(uf_gtk.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [ufraw] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: The following dependencies failed to build: ufraw xsane sane-backends libusb
Error: Status 1 encountered during processing.

comment:11 Changed 15 years ago by takojagi@…

I fixed the error editing Makefile: "-Wl,-framework -Wl,CoreFoundation" → "-Wl,-framework -Wl,Carbon -Wl,-framework -Wl,CoreFoundation" :)))

Rgds.

comment:12 in reply to:  11 Changed 15 years ago by takojagi@…

Replying to takojagi@…:

I fixed the error editing Makefile: "-Wl,-framework -Wl,CoreFoundation" → "-Wl,-framework -Wl,Carbon -Wl,-framework -Wl,CoreFoundation" :)))

Rgds.

Thanks to Yamakawa; http://cue.yellowmagic.info/

comment:13 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:14 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

I updated ufraw to 0.16 in r62098. It builds for me on Snow Leopard. Do you still see the problem?

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

Cc: devans@… removed

comment:16 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Closing due to lack of response.

Note: See TracTickets for help on using tickets.