Build error with --program-suffix introduced in 6.8.3-10

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
pipe
Posts: 28
Joined: 2013-04-09T08:32:37-07:00
Authentication code: 6789

Build error with --program-suffix introduced in 6.8.3-10

Post by pipe »

I have encountered a problem when installing ImageMagick using the --program-suffix configure option.

I wrote a script to find out in which version it was introduced, and it seems to be 6.8.3-10, and likely has to do with this line in the changelog:
Move binaries to lib subdirectory and link are created from binary package.
I run configure like this, on a pristine copy of the source code:
./configure --program-suffix=-hdr --enable-hdri
After successfully running "make", "make install" fails with the following relevant part:

Code: Select all

make  install-exec-hook
make[4]: Entering directory `/home/pipe/src/ImageMagick-6.8.4-8'
/bin/bash /home/pipe/src/ImageMagick-6.8.4-8/config/install-sh -d  //usr/local/lib/ImageMagick-6.8.4/bin-Q16HDRI
cd //usr/local/bin && \
        for CURR_PROG in `echo utilities/animate utilities/compare utilities/composite utilities/conjure utilities/convert utilities/display utilities/identify utilities/import utilities/mogrify utilities/montage utilities/stream | sed 's/utilities\///g'`; do \
                mv -f ./$CURR_PROG //usr/local/lib/ImageMagick-6.8.4/bin-Q16HDRI/$CURR_PROG && \
                ln -s /usr/local/lib/ImageMagick-6.8.4/bin-Q16HDRI/$CURR_PROG ./$CURR_PROG; \
        done;
mv: cannot stat `./animate': No such file or directory
mv: cannot stat `./compare': No such file or directory
mv: cannot stat `./composite': No such file or directory
mv: cannot stat `./conjure': No such file or directory
mv: cannot stat `./convert': No such file or directory
mv: cannot stat `./display': No such file or directory
mv: cannot stat `./identify': No such file or directory
mv: cannot stat `./import': No such file or directory
mv: cannot stat `./mogrify': No such file or directory
mv: cannot stat `./montage': No such file or directory
mv: cannot stat `./stream': No such file or directory
make[4]: *** [install-exec-hook] Error 1
This causes "make install" to exit prematurely, and whatever is after this section will not get executed.

I'm not sure exactly what would be the root cause here, but a diff shows that the error presumably is somewhere in Makefile.am:

Code: Select all

install-exec-hook:
	$(install_sh) -d  $(DESTDIR)/$(LIB_BIN_DIR_PATH)
	cd $(DESTDIR)/$(bindir) && \
	for CURR_PROG in `echo $(UTILITIES_PGMS) | sed 's/utilities\///g'`; do \
		mv -f ./$$CURR_PROG$(EXEEXT) $(DESTDIR)/$(LIB_BIN_DIR_PATH)/$$CURR_PROG$(EXEEXT) && \
		$(LN_S) $(LIB_BIN_DIR_PATH)/$$CURR_PROG$(EXEEXT) ./$$CURR_PROG$(EXEEXT); \
	done;

uninstall-hook:
	for CURR_PROG in `echo $(UTILITIES_PGMS) | sed 's/utilities\///g'`; do \
		rm -f $(DESTDIR)/$(LIB_DIR_PATH)/$$CURR_PROG$(EXEEXT)
	done;
	rm -r -f $(LIB_BIN_DIR_PATH)

I have a pretty standard 64-bit Ubuntu 12.10 installation here, and judging from the logs it doesn't seem to be anything missing from my setup, which is why I suspect it's a bug. What's strange is that it's been there for a month already and I didn't find any other reference to the problem here in the forum. Either I'm bad at searching, or no one else is using the --program-suffix or --program-prefix options. :)

I captured all configure logs and the complete output of the "make install" pass and put online if it helps anyone to find a fix to this: http://www.natrox.org/code/imagemagick/ ... gs.tar.bz2
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Build error with --program-suffix introduced in 6.8.3-10

Post by glennrp »

I reported the problem, off-list, on March 16th. It's still behaving the same way now.
pipe
Posts: 28
Joined: 2013-04-09T08:32:37-07:00
Authentication code: 6789

Re: Build error with --program-suffix introduced in 6.8.3-10

Post by pipe »

I see, maybe someone is more inclined to fix it now when it's out in the open, so to speak. :)

I'm running 6.8.3-9 now because of this, because right now I don't need any feature that was added later.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Build error with --program-suffix introduced in 6.8.3-10

Post by glennrp »

pipe wrote:I see, maybe someone is more inclined to fix it now when it's out in the open, so to speak. :)
.
"magick" is working on it ("has it on his RADAR"). The bug was contributed by a third party and it will take a little time to figure
it out, so we can fix it without breaking other parts of that contribution.
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: Build error with --program-suffix introduced in 6.8.3-10

Post by broucaries »

Copied from automake documentation:
http://www.gnu.org/software/automake/ma ... #Extending

I will report a bug to automake
pipe
Posts: 28
Joined: 2013-04-09T08:32:37-07:00
Authentication code: 6789

Re: Build error with --program-suffix introduced in 6.8.3-10

Post by pipe »

Whenever the Makefile is referring to the binaries, it uses a magic sed invocation using the $(transform) pattern, which will be set correctly by the configure script when passing --program-prefix and --program-suffix.

See for example this part of the generated Makefile:

Code: Select all

uninstall-binSCRIPTS:
     @$(NORMAL_UNINSTALL)
     @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
     files=`for p in $$list; do echo "$$p"; done | \
            sed -e 's,.*/,,;$(transform)'`; \                                  
     dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
The sed line will transform foo/convert into bar-convert-hdr if --program-prefix=-bar --program-suffix=-hdr.

Since I have never developed using automake, I have no idea if it's possible to use $(transform) in Makefile.am without someone getting too upset about it. It doesn't sound like the right solution.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Build error with --program-suffix introduced in 6.8.3-10

Post by magick »

Thanks to broucaries, we have a patch to repair this problem. Look for it in ImageMagick 6.8.4-9 Beta by sometime tomorrow.
pipe
Posts: 28
Joined: 2013-04-09T08:32:37-07:00
Authentication code: 6789

Re: Build error with --program-suffix introduced in 6.8.3-10

Post by pipe »

Code: Select all

pipe@spacelab:~$ convert-hdr --version
Version: ImageMagick 6.8.4-9 2013-04-12 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC HDRI OpenCL OpenMP
Just reporting that the installation procedure with --program-suffix works fine now! Thanks!
Post Reply