Problems compiling from source in 'make all'.
Plutonium5793 opened this issue · 6 comments
Since an rpm never came out for Fedora I am still compiling from source which has worked ok until very recently. Using version 0.70, I am getting an error during 'make all' that I have not been able to decipher, but it basically said it could not find bind.
As I understand it it is saying that bind is not within scope of the program being compiled. I had compiled version 0.62 on this computer successfully so I am not sure what has changed.
At Marco's suggestion I put
#include in zoomimage.h and it began to compile to about 2% done.
I then put #include <functional? in fps_counter.h and frame.h and it compiles to the 27% level where I get another error which I am attaching below. It is still not finishing the make step.
[jduchek@localhost build]$ make all
[ 1%] Automatic MOC, UIC and RCC for target GuLinux_Qt_Commons
AutoMoc: Warning: "/home/jduchek/PlanetaryImager/GuLinux-Commons/Qt/functional.cpp"
The file includes the moc file "functional.moc", but does not contain a Q_OBJECT or Q_GADGET macro.
[ 1%] Built target GuLinux_Qt_Commons_autogen
[ 6%] Built target GuLinux_Qt_Commons
[ 7%] Automatic MOC, UIC and RCC for target planetaryimager-commons
AutoMoc: Warning: "/home/jduchek/PlanetaryImager/src/commons/fps_counter.cpp"
The file includes the moc file "fps_counter.moc", but does not contain a Q_OBJECT or Q_GADGET macro.
[ 7%] Built target planetaryimager-commons_autogen
Scanning dependencies of target planetaryimager-commons
[ 8%] Building CXX object src/commons/CMakeFiles/planetaryimager-commons.dir/configuration.cpp.o
[ 9%] Building CXX object src/commons/CMakeFiles/planetaryimager-commons.dir/configurationdialog.cpp.o
[ 10%] Linking CXX static library libplanetaryimager-commons.a
[ 14%] Built target planetaryimager-commons
[ 15%] Automatic MOC, UIC and RCC for target drivers
[ 15%] Built target drivers_autogen
Scanning dependencies of target drivers
[ 16%] Building CXX object src/drivers/CMakeFiles/drivers.dir/imagerthread.cpp.o
[ 17%] Linking CXX static library libdrivers.a
[ 23%] Built target drivers
[ 24%] Automatic MOC, UIC and RCC for target qhy_driver
AutoMoc: Warning: "/home/jduchek/PlanetaryImager/src/drivers/qhy/qhyccdimager.cpp"
The file includes the moc file "qhyccdimager.moc", but does not contain a Q_OBJECT or Q_GADGET macro.
[ 24%] Built target qhy_driver_autogen
Scanning dependencies of target qhy_driver
[ 25%] Building CXX object src/drivers/qhy/CMakeFiles/qhy_driver.dir/qhyccdimager.cpp.o
[ 26%] Building CXX object src/drivers/qhy/CMakeFiles/qhy_driver.dir/qhydriver.cpp.o
[ 27%] Building CXX object src/drivers/qhy/CMakeFiles/qhy_driver.dir/qhyimagingworker.cpp.o
/home/jduchek/PlanetaryImager/src/drivers/qhy/qhyimagingworker.cpp: In member function ‘virtual Frame::ptr QHYImagingWorker::shoot()’:
/home/jduchek/PlanetaryImager/src/drivers/qhy/qhyimagingworker.cpp:79:91: error: call of overloaded ‘Mat(, int&, unsigned char*)’ is ambiguous
cv::Mat image({static_cast(d->w), static_cast(d->h)}, type, d->buffer.data());
^
In file included from /usr/include/opencv2/core.hpp:59:0,
from /usr/include/opencv2/opencv.hpp:52,
from /home/jduchek/PlanetaryImager/src/commons/frame.h:23,
from /home/jduchek/PlanetaryImager/src/image_handlers/imagehandler.h:24,
from /home/jduchek/PlanetaryImager/src/drivers/imagerthread.h:22,
from /home/jduchek/PlanetaryImager/src/drivers/qhy/qhyimagingworker.h:23,
from /home/jduchek/PlanetaryImager/src/drivers/qhy/qhyimagingworker.cpp:20:
/usr/include/opencv2/core/mat.hpp:894:5: note: candidate: cv::Mat::Mat(const std::vector&, int, void*, const size_t*)
Mat(const std::vector& sizes, int type, void* data, const size_t* steps=0);
^~~
In file included from /usr/include/opencv2/core/mat.hpp:3518:0,
from /usr/include/opencv2/core.hpp:59,
from /usr/include/opencv2/opencv.hpp:52,
from /home/jduchek/PlanetaryImager/src/commons/frame.h:23,
from /home/jduchek/PlanetaryImager/src/image_handlers/imagehandler.h:24,
from /home/jduchek/PlanetaryImager/src/drivers/imagerthread.h:22,
from /home/jduchek/PlanetaryImager/src/drivers/qhy/qhyimagingworker.h:23,
from /home/jduchek/PlanetaryImager/src/drivers/qhy/qhyimagingworker.cpp:20:
/usr/include/opencv2/core/mat.inl.hpp:459:1: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t)
Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
^~~
make[2]: *** [src/drivers/qhy/CMakeFiles/qhy_driver.dir/build.make:111: src/drivers/qhy/CMakeFiles/qhy_driver.dir/qhyimagingworker.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:391: src/drivers/qhy/CMakeFiles/qhy_driver.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
[jduchek@localhost build]$ ^C
[jduchek@localhost build]$
I have been unable to get past this.
I was able to build v0.7 (current tip of the branch, commit 3ccffa2) on Fedora 25. What's your Fedora version? Are you using the same commit? Also, which OpenCV version do you have? (Check with: rpm -qa | grep opencv).
Hi,
I am using Fedora 26 64 bit. I have tried 0.62 (which used to compile), 0.7, and whatever the current beta is. Opencv is 3.2.0-2.fc26.x86_64. The list of opencv installs is below.
[jduchek@localhost ~]$ rpm -qa | grep opencv
opencv-contrib-3.2.0-2.fc26.x86_64
opencv-devel-3.2.0-2.fc26.x86_64
opencv-core-3.2.0-2.fc26.x86_64
opencv-python-3.2.0-2.fc26.x86_64
opencv-3.2.0-2.fc26.x86_64
[jduchek@localhost ~]$
Not sure how to find the commit from the program. I have checked the Changlog file but it is listing the version number. Both the beta and 0.7 were downloaded from github in the last two days.
Got it; I'll have a look at Fedora 26 (on Fedora 25 I have OpenCV 3.1.0-8). As for the current commit, you can check it by running:
git log -1
in the source folder. (Nothing has been committed lately to v0.7
, so you should have the latest code.)
I successfully built v0.7 (commit 3ccffa28
) on Fedora 26 with the following fixes (will add them the to repository later): in GuLinux-Commons/Qt/zoomableimage.cpp
, src/network/networkdispatcher.h
, src/widgets/savefileconfiguration.cpp
, add #include <funtional>
above the existing #include
s.
I am not sure it will help in your case (but please check), as your error came from OpenCV; I was unable to replicate it so far. I suggest you also make sure opencv
is up-to-date:
sudo dnf update opencv opencv-devel
UPDATE: I can see that the OpenCV error happens for v0.6-fixes
branch.
My commit had the same 8 digits that yours has, but a bunch more digits behind those. I made the changes you suggested and make all and make install worked just fine and it is now running. My opencv is the current version from fedora. In the program itself now that it is running it says it is version 0.6.97 rather than 0.7 but it is running just fine.
Thank you very much for your help!
John
Right, the full commit id has 40 characters (hex digits), but you can specify just a few first ones (there is very little probability of having two commit with the same >6 common digits), also in git commands.
I think I have identified all the problems and will commit fixes to all the branches shortly.