Bug 223657
Summary: | Review Request: PerceptualDiff - An image comparison utility | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tobias Sauerwein <cgtobi> | ||||||
Component: | Package Review | Assignee: | Mamoru TASAKA <mtasaka> | ||||||
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Package Reviews List <fedora-package-review> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | kwizart, mr.ecik, mtasaka | ||||||
Target Milestone: | --- | Flags: | mtasaka:
fedora-review+
j: fedora-cvs+ |
||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2007-04-18 12:31:20 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 163779 | ||||||||
Attachments: |
|
Description
Tobias Sauerwein
2007-01-21 11:11:16 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 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 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 - 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. (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) (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. (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. 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. (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) Oops... the sed line should be: --------------------------------------------- sed -i -e 's|^\([ \t]*\)@|\1|' ./Makefile ./CMakeFiles/perceptualdiff.dir/build.make --------------------------------------------- > 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.
Created attachment 146929 [details]
PerceptualDiff.spec I used
PerceptualDiff.spec I used.
Please check this.
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
setting needinfo (when you are back from exam, please let us know). 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. ping? Again ping? 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 I would not approve any package which is using chrpath. 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... 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. 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... !? (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 ... I have not checked -3 yet, however perhaps CFLAGS or CXXFLAGS should be exported before cmake is called. 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... 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! 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) 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... Okay. ---------------------------------------------- This package (PerceptualDiff) is APPROVED by me ---------------------------------------------- New Package CVS Request ======================= Package Name: PerceptualDiff Short Description: An image comparison utility Owners: kwizart Branches: FC-5 FC-6 devel InitialCC: Package Change Request ====================== Package Name: PerceptualDiff New Branches: el5 el6 Owners: kwizart Git done (by process-git-requests). |