Tereius / libONVIF

Yet another ONVIF library
GNU General Public License v3.0
164 stars 47 forks source link

Error: /usr/bin/ld: cannot open output file headerParser: it is a folder #10

Closed wallerka77 closed 3 years ago

wallerka77 commented 3 years ago

Hi Tereius,

Thanks a lot for your answer!

I followed your advice:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Debug /home/pi/software/ONVIF/libONVIF-master

pi@raspberrypi:~/software/ONVIF/libONVIF-master $ cmake --build ./

... but some new errors occured:

[ 43%] Building CXX object src/CMakeFiles/onvifcommon.dir/gsoap/httpda.c.o [ 43%] Building CXX object src/CMakeFiles/onvifcommon.dir/onvifcommon_autogen/mocs_compilation.cpp.o [ 43%] Linking CXX shared library libonvifcommond.so [ 43%] Built target onvifcommon [ 43%] Automatic MOC for target onvifimaging [ 43%] Built target onvifimaging_autogen Scanning dependencies of target onvifimaging [ 43%] Building CXX object src/CMakeFiles/onvifimaging.dir/generated/soapImagingBindingProxy.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifimaging.dir/OnvifImagingClient.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifimaging.dir/onvifimaging_autogen/mocs_compilation.cpp.o [ 43%] Linking CXX shared library libonvifimagingd.so [ 43%] Built target onvifimaging [ 43%] Automatic MOC for target onvifdisplay [ 43%] Built target onvifdisplay_autogen Scanning dependencies of target onvifdisplay [ 43%] Building CXX object src/CMakeFiles/onvifdisplay.dir/generated/soapDisplayBindingProxy.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifdisplay.dir/OnvifDisplayClient.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifdisplay.dir/onvifdisplay_autogen/mocs_compilation.cpp.o [ 43%] Linking CXX shared library libonvifdisplayd.so [ 43%] Built target onvifdisplay [ 43%] Automatic MOC for target onvifevent [ 43%] Built target onvifevent_autogen Scanning dependencies of target onvifevent [ 43%] Building CXX object src/CMakeFiles/onvifevent.dir/generated/soapPullPointSubscriptionBindingProxy.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifevent.dir/OnvifEventClient.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifevent.dir/OnvifPullPoint.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifevent.dir/Topics.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifevent.dir/NotificationFilter.cpp.o [ 43%] Building CXX object src/CMakeFiles/onvifevent.dir/onvifevent_autogen/mocs_compilation.cpp.o [ 43%] Linking CXX shared library libonvifeventd.so [ 43%] Built target onvifevent [ 43%] Automatic MOC for target headerParser [ 43%] Built target headerParser_autogen [ 43%] Building CXX object src/CMakeFiles/headerParser.dir/headerParser/main.cpp.o [ 43%] Building CXX object src/CMakeFiles/headerParser.dir/headerParser_autogen/mocs_compilation.cpp.o [ 43%] Linking CXX executable headerParser /usr/bin/ld: cannot open output file headerParser: Ist ein Verzeichnis collect2: error: ld returned 1 exit status make[2]: [src/CMakeFiles/headerParser.dir/build.make:99: src/headerParser] Fehler 1 make[1]: [CMakeFiles/Makefile2:245: src/CMakeFiles/headerParser.dir/all] Fehler 2 make: *** [Makefile:152: all] Fehler 2 pi@raspberrypi:~/software/ONVIF/libONVIF-master $

Tereius commented 3 years ago

Please create/use a build directory outside the git repo as described in INSTALL. You probably have to do a fresh clone of the repo too (or remove all untracked files) because build relevant files are now mixed with source files which may lead to errors.

In CMake you distinguish between the source directory and the build directory. The source directory is the topmost folder of the git repo. The build directory is an arbitrary folder located outside the source folder.

wallerka77 commented 3 years ago

Sorry, sorry

now i am totally confused: build outside repo and so on ...

I did not understand this. Maybe because I am not a linux man. I think I have to throw everything away and start completely new.

I can't handle the INSTALL.

Tereius commented 3 years ago

ok, start from the beginning and do the following. REPLACE <user> with the current username you are logged in:

git clone https://github.com/Tereius/libONVIF.git /home/<user>/devel/source/libONVIF
cd /home/<user>/devel/source/libONVIF
conan install ./ -s build_type=Debug --build missing
mkdir -p /home/<user>/devel/build/libONVIF
cd /home/<user>/devel/build/libONVIF
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Debug /home/<user>/devel/source/libONVIF
cmake --build ./
cmake --build ./ --target install
wallerka77 commented 3 years ago

Hi, now unfortunately happened what I feared: The first installation now gives errors and I do not know how to fix it.

Error appears after step 3

  1. sudo git clone https://github.com/Tereius/libONVIF.git /home/pi/devel/source/libONVIF
  2. cd /home/pi/devel/source/libONVIF
  3. conan install ./ -s build_type=Debug --build missing

pi@raspberrypi:~/devel/source/libONVIF $ conan install ./ -s build_type=Debug --build missing Configuration: [settings] arch=armv7 arch_build=armv7 build_type=Debug compiler=gcc compiler.libcxx=libstdc++ compiler.version=8 os=Linux os_build=Linux [options] [build_requires] [env]

Qt/5.12.4@tereius/stable: WARN: Package binary is corrupted, removing: 5587389252630436ebf65f52bc5e7ec12d6aba7a Package already installed: libxcb1-dev Package already installed: libx11-dev Package already installed: libfontconfig1-dev Package already installed: libfreetype6-dev Package already installed: libxext-dev Package already installed: libxfixes-dev Package already installed: libxi-dev Package already installed: libxrender-dev Package already installed: libx11-xcb-dev Package already installed: libxcb-glx0-dev Package already installed: libxkbcommon-dev Package already installed: libgl1-mesa-dev Version ranges solved Version range '>=5.4' required by 'conanfile.py (libONVIF/1.1.0-SNAPSHOT)' resolved to 'Qt/5.12.4@tereius/stable' in local cache

conanfile.py (libONVIF/1.1.0-SNAPSHOT): Installing package Requirements OpenSSL/1.1.1b@tereius/stable from 'tereius' - Cache Qt/5.12.4@tereius/stable from 'tereius' - Cache Packages OpenSSL/1.1.1b@tereius/stable:61498798ee9fabc722119341f6ebd123b6a101ba - Cache Qt/5.12.4@tereius/stable:5587389252630436ebf65f52bc5e7ec12d6aba7a - Build

Installing (downloading, building) binaries... OpenSSL/1.1.1b@tereius/stable: Already installed! Qt/5.12.4@tereius/stable: WARN: Build folder is dirty, removing it: /home/pi/.conan/data/Qt/5.12.4/tereius/stable/build/5587389252630436ebf65f52bc5e7ec12d6aba7a Qt/5.12.4@tereius/stable: WARN: Trying to remove corrupted source folder Qt/5.12.4@tereius/stable: WARN: This can take a while for big packages Qt/5.12.4@tereius/stable: Configuring sources in /home/pi/.conan/data/Qt/5.12.4/tereius/stable/source Downloading qt-everywhere-src-5.12.4.tar.xz completed [496052.93k]

ERROR: Qt/5.12.4@tereius/stable: Error in source() method, line 150 tools.get("%s.tar.xz" % url) ConanException: XZ format not supported in Python 2. Use Python 3 instead pi@raspberrypi:~/devel/source/libONVIF $

Without your help I would have to abort now, because, as already said, I am not a real linux man

Thanks a lot Walter

Tereius commented 3 years ago

Then skip the conan install step. This step is required if you want to build the dependencies yourself. It seems like you already installed qt5 via the package manager. And never use sudo!

wallerka77 commented 3 years ago

pi@raspberrypi:~/devel/build/libONVIF $ cmake --build ./ --target install [ 1%] Automatic MOC for target onvifcommon [ 1%] Built target onvifcommon_autogen [ 20%] Built target onvifcommon [ 21%] Automatic MOC for target onvifimaging [ 21%] Built target onvifimaging_autogen [ 26%] Built target onvifimaging [ 27%] Automatic MOC for target onvifdisplay [ 27%] Built target onvifdisplay_autogen [ 31%] Built target onvifdisplay [ 32%] Automatic MOC for target onvifevent [ 32%] Built target onvifevent_autogen [ 40%] Built target onvifevent [ 42%] Automatic MOC for target headerParser [ 42%] Built target headerParser_autogen [ 45%] Built target headerParser [ 46%] Automatic MOC for target onvifdiscovery [ 46%] Built target onvifdiscovery_autogen [ 53%] Built target onvifdiscovery [ 54%] Automatic MOC for target onvifdevice [ 54%] Built target onvifdevice_autogen [ 59%] Built target onvifdevice [ 60%] Automatic MOC for target onvifanalytics [ 60%] Built target onvifanalytics_autogen [ 64%] Built target onvifanalytics [ 65%] Automatic MOC for target onvifptz [ 65%] Built target onvifptz_autogen [ 70%] Built target onvifptz [ 71%] Automatic MOC for target onvifmedia [ 71%] Built target onvifmedia_autogen [ 76%] Built target onvifmedia [ 77%] Automatic MOC for target onvifrecording [ 77%] Built target onvifrecording_autogen [ 81%] Built target onvifrecording [ 82%] Automatic MOC for target onvifreceiver [ 82%] Built target onvifreceiver_autogen [ 87%] Built target onvifreceiver [ 88%] Automatic MOC for target onvifreplay [ 88%] Built target onvifreplay_autogen [ 93%] Built target onvifreplay [ 94%] Automatic MOC for target onvifinfo [ 94%] Built target onvifinfo_autogen [100%] Built target onvifinfo Install the project... -- Install configuration: "Debug" -- Installing: /usr/local/bin/onvifinfo CMake Error at src/cmake_install.cmake:47 (file): file INSTALL cannot copy file "/home/pi/devel/build/libONVIF/src/onvifinfo" to "/usr/local/bin/onvifinfo". Call Stack (most recent call first): cmake_install.cmake:42 (include)

make: *** [Makefile:140: install] Fehler 1 pi@raspberrypi:~/devel/build/libONVIF $

wallerka77 commented 3 years ago

Hi ,

looks much better now:

cmake --build ./ --target install makes 100% progress, but an error occured: [ 94%] Built target onvifinfo_autogen [100%] Built target onvifinfo Install the project... -- Install configuration: "Debug" -- Installing: /usr/local/bin/onvifinfo CMake Error at src/cmake_install.cmake:47 (file): file INSTALL cannot copy file "/home/pi/devel/build/libONVIF/src/onvifinfo" to "/usr/local/bin/onvifinfo". Call Stack (most recent call first): cmake_install.cmake:42 (include)

make: *** [Makefile:140: install] Fehler 1

Your advice: don't use sudo ... but after

sudo cmake --build ./ --target install makes

errors disappeared.

I hope using sudo was OK in this step?

If that's all OK, then I'm very, very happy.

Question:

How can I test your libONVIF? I have several cameras.

Is there an example (best in Qt, I would like to use) where

-a camera can be detected/discovered -the camera stream can be displayed in a Qt widget -and the camera zoom can be set?

That would be absolutely great!!!

Many, many thanks also for your patience!!!