Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 223657 - Review Request: PerceptualDiff - An image comparison utility
Summary: Review Request: PerceptualDiff - An image comparison utility
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Package Reviews List
URL:
Whiteboard:
Depends On:
Blocks: FE-ACCEPT
TreeView+ depends on / blocked
 
Reported: 2007-01-21 11:11 UTC by Tobias Sauerwein
Modified: 2010-12-10 14:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-18 12:31:20 UTC
Type: ---
Embargoed:
mtasaka: fedora-review+
j: fedora-cvs+


Attachments (Terms of Use)
PerceptualDiff.spec I used (deleted)
2007-01-30 16:25 UTC, Mamoru TASAKA
no flags Details
Mock build log of PerceptualDiff-1.0-2.1.fc7 (deleted)
2007-01-30 16:26 UTC, Mamoru TASAKA
no flags Details

Description Tobias Sauerwein 2007-01-21 11:11:16 UTC
Spec URL: http://www.cgtobi.de/aqsis/PerceptualDiff.spec
SRPM URL: http://www.cgtobi.de/aqsis/PerceptualDiff-1.0-1.src.rpm
Description: PerceptualDiff is an image comparison utility that makes use of a computational model of the human visual system to compare two images.

Comment 1 Michał Bentkowski 2007-01-21 12:59:25 UTC
It fails to build on x86_64:
In file included from /builddir/build/BUILD/PerceptualDiff-1.0/Metric.cpp:20:
/builddir/build/BUILD/PerceptualDiff-1.0/LPyramid.h:38:22: warning: no newline 
at end of file
/builddir/build/BUILD/PerceptualDiff-1.0/Metric.cpp:316:2: warning: no newline 
at end of file
Linking CXX executable perceptualdiff
CMakeFiles/perceptualdiff.dir/RGBAImage.o: In function 
`RGBAImage::ReadPNG(char*)':
RGBAImage.cpp:(.text+0x4e8): undefined reference to `png_read_destroy'
collect2: ld returned 1 exit status
make[2]: *** [perceptualdiff] Error 1
make[1]: *** [CMakeFiles/perceptualdiff.dir/all] Error 2


Comment 2 Ralf Corsepius 2007-01-21 13:07:37 UTC
Tobi, please make yourself familiar with the Fedora Packaging GuideLines.


MUSTFIX:

- Check your BuildRequires.
  ATM, building fails right from the beginning:
...
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
/var/tmp/rpm-tmp.39497: line 27: cmake: command not found
error: Bad exit status from /var/tmp/rpm-tmp.39497 (%build)

=> BuildRequires: cmake

- Don't use strip in %install
Remove the "strip"-line

- Broken source code, triggering warning during the build
  ... warning: no newline at end of file

- Build also fails on i386:
  ...
Linking CXX executable perceptualdiff
CMakeFiles/perceptualdiff.dir/RGBAImage.o: In function `RGBAImage::ReadPNG(char*)':
RGBAImage.cpp:(.text+0x527): undefined reference to `png_read_destroy'
collect2: ld returned 1 exit status
make[2]: *** [perceptualdiff] Error 1
make[1]: *** [CMakeFiles/perceptualdiff.dir/all] Error 2


Comment 3 Tobias Sauerwein 2007-01-21 13:54:43 UTC
Fixed build requirements and excluded x86_64

Spec URL: http://www.cgtobi.de/aqsis/PerceptualDiff.spec
SRPM URL: http://www.cgtobi.de/aqsis/PerceptualDiff-1.0-2.src.rpm


Comment 4 Ralf Corsepius 2007-01-21 14:44:37 UTC
- Building still fails:

CMakeFiles/perceptualdiff.dir/RGBAImage.o: In function 
`RGBAImage::ReadPNG(char*)':
RGBAImage.cpp:(.text+0x527): undefined reference to `png_read_destroy'
collect2: ld returned 1 exit status
make[2]: *** [perceptualdiff] Error 1
make[1]: *** [CMakeFiles/perceptualdiff.dir/all] Error 2

- Sources are still broken

- The build error reported for the x86_64 is identical to the one I am seeing on
i386, I am having strong doubts on whether excluding the x86_64 is the right
measure to address the building issues.

Comment 5 Mamoru TASAKA 2007-01-21 16:37:46 UTC
(In reply to comment #1)
> RGBAImage.cpp:(.text+0x4e8): undefined reference to `png_read_destroy'

(In reply to comment #2)
> RGBAImage.cpp:(.text+0x527): undefined reference to `png_read_destroy'

This is because...
from 1.2.10 the function png_read_destroy() is moved to "internal"
function and cannot be used for dinamical linking.

You have to use libpng10 instead (in FC5/FE6/FE-devel)

Comment 6 Mamoru TASAKA 2007-01-21 16:45:42 UTC
(Well, in comment 5 I commented that the build failure is
 due to libpng 1.2.8 -> 1.2.10, however, I met with server internal
 error and the mail may not be delivered. Please
 check my comment #4.

 And.. adding a note. As this is due to libpng 1.2.8->1.2.10 change,
 mockbuild succeeds on FC5 as FC5 libpng is 1.2.8)

 However, adding another issue.
 Fedora specific compilation flags are not passed. Please check
 it.

Comment 7 Mamoru TASAKA 2007-01-21 16:46:40 UTC
Oops.. s|comment 4|comment 5|

Comment 8 Mamoru TASAKA 2007-01-21 17:06:31 UTC
(In reply to comment #6)
>  However, adding another issue.
>  Fedora specific compilation flags are not passed. Please check
>  it.

More concrete...
In CMakeFiles/perceptualdiff.dir (created after cmake),
build.make says:
--------------------------------------
    46  include CMakeFiles/perceptualdiff.dir/flags.make
---------------------------------------
and flags.make says:
---------------------------------------
     3  
     4  CXX_FLAGS =    
     5  
---------------------------------------
  Perhaps you have to set CXX_FLAGS at some point.

Comment 9 Ralf Corsepius 2007-01-21 17:13:49 UTC
Is there any way to make this cmake stuff more verbose?

The default log messages this package prints out during compilation/linkage are
more or less useless.


Comment 10 Mamoru TASAKA 2007-01-21 17:41:01 UTC
(In reply to comment #9)
> Is there any way to make this cmake stuff more verbose?
> 
> The default log messages this package prints out during compilation/linkage are
> more or less useless.

Usually, removing "@" (atmark) from the top of the line in Makefile
do this. However, even I tried this, still useful verbose message 
cannot be print out.
I strongly suspect that cmake is suppressing me. "make -n" seems to
print what is to be actually done anyway. So a workaround maybe:

----------------------------------------------------------
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
# just to make message more verbose
sed -e 's|\(^[ \t]\)*@|\1|' ./Makefile ./CMakeFiles/perceptualdiff.dir/build.make
make -n
make %{?_smp_mflags}
----------------------------------------------------------


Another note:
By the way, please don't strip binaries as debugging info is
needed for creating debuginfo rpm (at the time rpmbuild
creates debuginfo rpm, binaries with
executable permission are stripped automatically)

Comment 11 Mamoru TASAKA 2007-01-21 18:01:25 UTC
Oops...
the sed line should be:
---------------------------------------------
sed -i -e 's|^\([ \t]*\)@|\1|' ./Makefile ./CMakeFiles/perceptualdiff.dir/build.make
---------------------------------------------

Comment 12 Ralf Corsepius 2007-01-21 18:16:44 UTC
> Usually, removing "@" (atmark) from the top of the line in Makefile

Thanks, but I am familiar with make ;)

I had hoped cmake to have a command line option or similar to switch its output
into something useful and was not just printing out silly "Building ... k.o"
messages - Apparently, I was wrong.


Comment 13 Mamoru TASAKA 2007-01-30 16:25:21 UTC
Created attachment 146929 [details]
PerceptualDiff.spec I used

PerceptualDiff.spec I used.
Please check this.

Comment 14 Mamoru TASAKA 2007-01-30 16:26:56 UTC
Created attachment 146930 [details]
Mock build log of  PerceptualDiff-1.0-2.1.fc7

Mock build log of  PerceptualDiff-1.0-2.1 (my spec file)
on FC-devel i386

Comment 15 Mamoru TASAKA 2007-02-09 16:26:18 UTC
setting needinfo (when you are back from exam, please let us
know).

Comment 16 Tobias Sauerwein 2007-02-25 12:42:20 UTC
Exams are over and I moved to London. Now I just need to get a fedora machine up and running since the 
opensuse buildserver doesn't seem to do a good job for me.

Comment 17 Mamoru TASAKA 2007-03-11 15:56:28 UTC
ping?

Comment 18 Mamoru TASAKA 2007-04-05 07:56:55 UTC
Again ping?

Comment 19 Nicolas Chauvet (kwizart) 2007-04-11 17:57:00 UTC
SRPMS:
http://kwizart.free.fr/fedora/6/testing/PerceptualDiff/PerceptualDiff-1.0.1-1.kwizart.fc6.src.rpm
SPEC:
http://kwizart.free.fr/fedora/6/testing/PerceptualDiff/PerceptualDiff.spec
Summary: An image comparison utility

I took the Review Request for this package as proposed to Tobias
(he's away from a Fedora workstation).
Sorry for the delay...

Update to 1.0.1
Allow x86_64
Fix RPATHs

rpmlint is silent

mock build in progress for devel


Comment 20 Ralf Corsepius 2007-04-12 03:59:09 UTC
I would not approve any package which is using chrpath.

Comment 21 Nicolas Chauvet (kwizart) 2007-04-12 11:30:07 UTC
Well the other way to do this is to patch libtool i'm not sure that will work.
(no libtool used)
I can also report this to upstream ( i will try to contact them...)
Since this is documented that way in the Fedora packaging guidelines, i would
recommnand that you raise this objection to the packaging guidelines commity.

This package seems to work fine, tested in mock from FC-5 to devel on x86_64...

Comment 22 Mamoru TASAKA 2007-04-12 15:14:26 UTC
Well, for 1.0.1-1:
* cmake special issue
  - Please make the build process _VERBOSE_ . Currently
    only the messages like
-----------------------------------------
[ 20%] Building CXX object CMakeFiles/perceptualdiff.dir/PerceptualDiff.o
-----------------------------------------
    are shown and I cannot check if the compilation is
    done properly (however, for 1.0.1-1 I can say that the
    compilation process is wrong because mockbuild log says:
-----------------------------------------
extracting debug info from
/var/tmp/PerceptualDiff-1.0.1-1.fc7-root-mockbuild/usr/bin/perceptualdiff
0 blocks
-----------------------------------------
    You can check:
    http://fedoraproject.org/wiki/PackagingDrafts/cmake
    Here you cannot use /etc/rpm/macros.cmake but you can borrow
    some trick from that page.

* macro
  - Please use macro (%{_sysconfdir}, %{_prefix}, ...)

* rpath
  - Well, for me chrpath seems unneeded as actually the created Makefile
    does not set rpath, you can refer to the URL above also for
    handling rpath.

Comment 23 Nicolas Chauvet (kwizart) 2007-04-17 14:57:19 UTC
SRPMS:
http://kwizart.free.fr/fedora/6/testing/PerceptualDiff/PerceptualDiff-1.0.1-3.kwizart.fc6.src.rpm
SPEC:
http://kwizart.free.fr/fedora/6/testing/PerceptualDiff/PerceptualDiff.spec
Summary: An image comparison utility

It remains the issue with debug info:
 extracting debug info from buildroot/usr/bin/perceptualdiff 
0 blocks
I don't know how to solve this... !?



Comment 24 Ralf Corsepius 2007-04-17 15:10:19 UTC
(In reply to comment #23)

> It remains the issue with debug info:
>  extracting debug info from buildroot/usr/bin/perceptualdiff 
> 0 blocks
> I don't know how to solve this... !?
This is a symptom of the package not acknowledging RPM_OPT_FLAGS.

Checking the log proves this:
...
/usr/bin/c++    -o CMakeFiles/perceptualdiff.dir/LPyramid.o -c
/users/packman/src/rpms/BUILD/PerceptualDiff-1.0.1/LPyramid.cpp
...

Comment 25 Mamoru TASAKA 2007-04-17 15:31:09 UTC
I have not checked -3 yet, however perhaps CFLAGS or CXXFLAGS
should be exported before cmake is called.

Comment 26 Nicolas Chauvet (kwizart) 2007-04-17 15:38:10 UTC
Then i suppose i need to patch CMakeLists.txt with:
#flags
SET(LINK_FLAGS )

#ADD CFLAGS AND LDFLAGS TO TARGET
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS "${DEBUG_FLAGS}")

SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_FLAGS "${LINK_FLAGS}")

I will try to look further...

Comment 27 Nicolas Chauvet (kwizart) 2007-04-17 16:04:43 UTC
SRPMS:
http://kwizart.free.fr/fedora/6/testing/PerceptualDiff/PerceptualDiff-1.0.1-4.kwizart.fc6.src.rpm
SPEC:
http://kwizart.free.fr/fedora/6/testing/PerceptualDiff/PerceptualDiff.spec
Summary: An image comparison utility

Ok i've got 49 blocks for debug info!
This look better!

Comment 28 Mamoru TASAKA 2007-04-17 17:08:56 UTC
Almost okay.

* Question:
  - Well, CXXFLAGS is exported before cmake is called.
    Then do we have to pass CXXFLAGS as a option of cmake?
    (Also CFLAGS and etc)

Comment 29 Nicolas Chauvet (kwizart) 2007-04-17 17:27:51 UTC
SRPMS:
http://kwizart.free.fr/fedora/6/testing/PerceptualDiff/PerceptualDiff-1.0.1-5.kwizart.fc6.src.rpm
SPEC:
http://kwizart.free.fr/fedora/6/testing/PerceptualDiff/PerceptualDiff.spec
Summary: An image comparison utility

Ok that wasn't necessary indeed...



Comment 30 Mamoru TASAKA 2007-04-17 18:07:14 UTC
Okay.

----------------------------------------------
  This package (PerceptualDiff) is APPROVED by me
----------------------------------------------

Comment 31 Nicolas Chauvet (kwizart) 2007-04-17 18:38:53 UTC
New Package CVS Request
=======================
Package Name: PerceptualDiff
Short Description: An image comparison utility
Owners: kwizart
Branches: FC-5 FC-6 devel
InitialCC: 

Comment 32 Nicolas Chauvet (kwizart) 2010-12-09 17:23:59 UTC
Package Change Request
======================
Package Name: PerceptualDiff
New Branches: el5 el6
Owners: kwizart

Comment 33 Jason Tibbitts 2010-12-10 14:40:08 UTC
Git done (by process-git-requests).


Note You need to log in before you can comment on or make changes to this bug.