Bug 223657 - Review Request: PerceptualDiff - An image comparison utility
Review Request: PerceptualDiff - An image comparison utility
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mamoru TASAKA
Fedora Package Reviews List
:
Depends On:
Blocks: FE-ACCEPT
  Show dependency treegraph
 
Reported: 2007-01-21 06:11 EST by Tobias Sauerwein
Modified: 2010-12-10 09:40 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-18 08:31:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mtasaka: fedora‑review+
tibbs: fedora‑cvs+


Attachments (Terms of Use)
PerceptualDiff.spec I used (1.67 KB, text/plain)
2007-01-30 11:25 EST, Mamoru TASAKA
no flags Details
Mock build log of PerceptualDiff-1.0-2.1.fc7 (37.27 KB, text/plain)
2007-01-30 11:26 EST, Mamoru TASAKA
no flags Details

  None (edit)
Description Tobias Sauerwein 2007-01-21 06:11:16 EST
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 07:59:25 EST
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 08:07:37 EST
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 08:54:43 EST
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 09:44:37 EST
- 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 11:37:46 EST
(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 11:45:42 EST
(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 11:46:40 EST
Oops.. s|comment 4|comment 5|
Comment 8 Mamoru TASAKA 2007-01-21 12:06:31 EST
(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 12:13:49 EST
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 12:41:01 EST
(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 13:01:25 EST
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 13:16:44 EST
> 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 11:25:21 EST
Created attachment 146929 [details]
PerceptualDiff.spec I used

PerceptualDiff.spec I used.
Please check this.
Comment 14 Mamoru TASAKA 2007-01-30 11:26:56 EST
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 11:26:18 EST
setting needinfo (when you are back from exam, please let us
know).
Comment 16 Tobias Sauerwein 2007-02-25 07:42:20 EST
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 11:56:28 EDT
ping?
Comment 18 Mamoru TASAKA 2007-04-05 03:56:55 EDT
Again ping?
Comment 19 Nicolas Chauvet (kwizart) 2007-04-11 13:57:00 EDT
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-11 23:59:09 EDT
I would not approve any package which is using chrpath.
Comment 21 Nicolas Chauvet (kwizart) 2007-04-12 07:30:07 EDT
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 11:14:26 EDT
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 10:57:19 EDT
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 11:10:19 EDT
(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 11:31:09 EDT
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 11:38:10 EDT
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 12:04:43 EDT
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 13:08:56 EDT
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 13:27:51 EDT
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 14:07:14 EDT
Okay.

----------------------------------------------
  This package (PerceptualDiff) is APPROVED by me
----------------------------------------------
Comment 31 Nicolas Chauvet (kwizart) 2007-04-17 14:38:53 EDT
New Package CVS Request
=======================
Package Name: PerceptualDiff
Short Description: An image comparison utility
Owners: kwizart@gmail.com
Branches: FC-5 FC-6 devel
InitialCC: 
Comment 32 Nicolas Chauvet (kwizart) 2010-12-09 12:23:59 EST
Package Change Request
======================
Package Name: PerceptualDiff
New Branches: el5 el6
Owners: kwizart
Comment 33 Jason Tibbitts 2010-12-10 09:40:08 EST
Git done (by process-git-requests).

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