sourcey / libsourcey

C++14 evented IO libraries for high performance networking and media based applications
https://sourcey.com/libsourcey
GNU Lesser General Public License v2.1
1.31k stars 347 forks source link

Windows libsourcey cmake error. #97

Closed VinciShark closed 7 years ago

VinciShark commented 7 years ago

qq 20161015113144

Windows10 x64 with ffmpeg installed already. But cmake can't find ffmepg relative libs. Also miss other libs' paths in cmake's configure.

auscaster commented 7 years ago

It looks like cmake can't find the location of the ffmpeg header files. Please make sure your version of ffmpeg includes development headers (.h files) and that cmake knows where they are.

For instance FFMPEG_AVCODED_INCLUDE_DIRS equals /home/sourcey/build//ffmpeg/include on my system.

On 15 October 2016 at 05:36, Vinci notifications@github.com wrote:

[image: qq 20161015113144] https://cloud.githubusercontent.com/assets/9538504/19407138/692889bc-92cb-11e6-834e-a3c2c0e8c49c.png

Windows10 x64 with ffmpeg installed already. But cmake can't find ffmepg relative libs. Also miss other libs' paths in cmake's configure.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/97, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDNdvr8I_BKZ4Yez456ZZZf_WiXagks5q0Eo5gaJpZM4KXmXL .

VinciShark commented 7 years ago

You use ubuntu or MacOS? I am working on Windows10. Quite confusing when build libsourcey on Windows step by step. Is there any requirements or pre-work missing? When cmake, lots of entry say library missing. I change a ffmpeg build, none ffmpeg error left, except for an FFMPEG_AVRESAMPLE_INCLUDE_DIRS.

cmake configure output:

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_SWRESAMPLE": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:48 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVRESAMPLE": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:49 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVFORMAT": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:50 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVCODEC": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:51 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_SWSCALE": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:52 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVUTIL": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:53 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVFILTER": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:54 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVDEVICE": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:55 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_POSTPROC": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:56 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at D:/Develop/CMake/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES) (found version "1.1.0b") Call Stack (most recent call first): D:/Develop/CMake/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) D:/Develop/CMake/share/cmake-3.6/Modules/FindOpenSSL.cmake:370 (find_package_handle_standard_args) cmake/LibSourceyIncludes.cmake:43 (find_package) CMakeLists.txt:227 (find_dependency)

Configuring incomplete, errors occurred! See also "D:/Projects/libsourcey/build/CMakeFiles/CMakeOutput.log".

auscaster commented 7 years ago

You can ignore the warnings. Seems to me that you need to set the OPENSSL_ROOT_DIR variable so cmake can find openssl.

A quick google search reveals this: http://stackoverflow.com/questions/16248775/cmake-not-able-to-find-openssl

On 15 October 2016 at 19:02, Vinci notifications@github.com wrote:

You use ubuntu or MacOS? I am working on Windows10. Quite confusing when build libsourcey on Windows step by step. Is there any requirements or pre-work missing? When cmake, lots of entry say library missing. I change a ffmpeg build, none ffmpeg error left, except for an FFMPEG_AVRESAMPLE_INCLUDE_DIRS.

cmake configure output:

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_SWRESAMPLE": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:48 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVRESAMPLE": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:49 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVFORMAT": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:50 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVCODEC": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:51 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_SWSCALE": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:52 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVUTIL": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:53 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVFILTER": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:54 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_AVDEVICE": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:55 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/LibSourceyIncludes.cmake:501 (set): Cannot set "HAVE_FFMPEG_POSTPROC": current scope has no parent. Call Stack (most recent call first): cmake/LibSourceyIncludes.cmake:622 (set_component_found) cmake/LibSourceyIncludes.cmake:651 (find_component_paths) cmake/FindFFmpeg.cmake:56 (find_component) CMakeLists.txt:212 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at D:/Develop/CMake/share/cmake-3.6/Modules/ FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES) (found version "1.1.0b") Call Stack (most recent call first): D:/Develop/CMake/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) D:/Develop/CMake/share/cmake-3.6/Modules/FindOpenSSL.cmake:370 (find_package_handle_standard_args) cmake/LibSourceyIncludes.cmake:43 (find_package) CMakeLists.txt:227 (find_dependency)

Configuring incomplete, errors occurred! See also "D:/Projects/libsourcey/build/CMakeFiles/CMakeOutput.log".

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/97#issuecomment-253996752, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDGHj1aLtBEY6v8_lKuZrMN5Ngc5Cks5q0QclgaJpZM4KXmXL .

VinciShark commented 7 years ago

I set it up already. But new error:

CMake Error at cmake/LibSourceyIncludes.cmake:8 (add_subdirectory): add_subdirectory given source "vendor/zlib" which is not an existing directory. Call Stack (most recent call first): src/archo/CMakeLists.txt:9 (add_vendor_dependency)

CMake Error at cmake/LibSourceyIncludes.cmake:8 (add_subdirectory): add_subdirectory given source "vendor/minizip" which is not an existing directory. Call Stack (most recent call first): src/archo/CMakeLists.txt:10 (add_vendor_dependency)

CMake Error at cmake/LibSourceyIncludes.cmake:8 (add_subdirectory): add_subdirectory given source "vendor/http_parser" which is not an existing directory. Call Stack (most recent call first): src/http/CMakeLists.txt:3 (add_vendor_dependency)

CMake Error at cmake/LibSourceyIncludes.cmake:8 (add_subdirectory): add_subdirectory given source "vendor/libuv" which is not an existing directory. Call Stack (most recent call first): src/uv/CMakeLists.txt:9 (add_vendor_dependency)

CMake Error at cmake/LibSourceyIncludes.cmake:174 (list): list sub-command REMOVE_DUPLICATES requires list to be present. Call Stack (most recent call first): cmake/LibSourceyModules.cmake:55 (set_default_project_dependencies) src/uv/CMakeLists.txt:14 (define_sourcey_module)

Google but not find any similar answer...

VinciShark commented 7 years ago

@auscaster I wrongly close this issue...

auscaster commented 7 years ago

Hi Vinci, the issue is Windows specific. If you give me a few minutes I can push a fix

auscaster commented 7 years ago

Please try again @VinciShark. Most people are currently using LibSourcey on mac and linux (myself on Linux) where it is very easy to install. I have compiled LibSourcey on windows many times in the past, but not for a while. If you write a step by step guide for Windows users I would love to include it in the README.

VinciShark commented 7 years ago

Plan to do... I just compile libuv in windows, but don't know how to link it to libsourcey's cmake...Any hints?

VinciShark commented 7 years ago

Pull and Success

VinciShark commented 7 years ago

image 无法打开包括文件 === can't open include file

VinciShark commented 7 years ago

error when build project with VS2015

auscaster commented 7 years ago

OK please hold. I'm not on a windows machine, so this is a bit difficult.

On 16 October 2016 at 10:28, Vinci notifications@github.com wrote:

Reopened #97 https://github.com/sourcey/libsourcey/issues/97.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/97#event-825054265, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDHuKhDPmjE8_ODebB7yW64ec-8Qqks5q0eBFgaJpZM4KXmXL .

auscaster commented 7 years ago

OK I think we're good to go this time. I removed all the cmake warnings on Windows also

VinciShark commented 7 years ago

After fix minizip's build requiring. Most of the error fixed. Still some as below:

ERROR LNK1104 open file failed“......\uv\Debug\scy_uv_095d.lib” deviceenumerator D:\libsourcey\build\src\av\samples\deviceenumerator\LINK 1
ERROR C1083 open include file failed: “scy/error.h”: No such file or directory uv D:\libsourcey\src\uv\include\scy\uv\uvpp.h 32
ERROR LNK1104 open file failed“......\uv\Debug\scy_uv_095d.lib” echoserver D:\libsourcey\build\src\net\samples\echoserver\LINK 1
ERROR LNK1104 open file failed“......\uv\Debug\scy_uv_095d.lib” flashpolicyserver D:\libsourcey\build\src\net\samples\flashpolicyserver\LINK 1
ERROR LNK1104 open file failed“......\uv\Debug\scy_uv_095d.lib” turnserver D:\libsourcey\build\src\turn\samples\turnserver\LINK 1
ERROR LNK1104 open file failed“......\uv\Debug\scy_uv_095d.lib” stunclient D:\libsourcey\build\src\stun\samples\stunclient\LINK 1
ERROR LNK1104 open file failed“......\uv\Debug\scy_uv_095d.lib” httpechoserver D:\libsourcey\build\src\http\samples\httpechoserver\LINK 1
ERROR LNK1104 open file failed“......\uv\Debug\scy_uv_095d.lib” sympleconsole D:\libsourcey\build\src\symple\apps\sympleconsole\LINK 1
ERROR C1083 open include file failed: “zconf.h”: No such file or directory archo D:\libsourcey\vendor\zlib\zlib.h 34
ERROR C2065 “SCY_CAMERA_INPUTS”: undefined identifier av D:\libsourcey\src\av\src\devicemanager.cpp 329 ERROR C2065 “SCY_SCREEN_INPUTS”: undefined identifier av D:\libsourcey\src\av\src\devicemanager.cpp 330 ERROR C2065 “SCY_MICROPHONE_INPUTS”: undefined identifier av D:\libsourcey\src\av\src\devicemanager.cpp 331 ERROR C2065 “SCY_SPEAKER_OUTPUTS”: undefined identifier av D:\libsourcey\src\av\src\devicemanager.cpp 332 ERROR LNK1104 open file failed“......\uv\Debug\scy_uv_095d.lib” devicerecorder D:\libsourcey\build\src\av\samples\devicerecorder\LINK 1

auscaster commented 7 years ago

OK let's get this Windows build fixed for you.

First, please sync with latest master.

Next, does the scy_uv_095d.lib file exist on your harddrive?

If not, please try this - build LibSourcey modules and dependencies first by setting the following cmake flags: BUILD_MODULES=ON BUILD_APPLICATIONS=OFF BUILD_SAMPLES=OFF BUILD_TESTS=OFF

Now please regenerate project files and rebuild LibSourcey. Once all modules build you should have scy_uv_095d.lib somewhere?

Now try enabling the applications and samples flags BUILD_APPLICATIONS=ON BUILD_SAMPLES=ON and build again.

Hopefully this does the trick, please let me know.

VinciShark commented 7 years ago

Success, but need fix a problem:

project minizip and archo needs zconf.h, but not generate requirements correctly, I fix it in vs manually. Better fix it in cmake's config.

image

auscaster commented 7 years ago

Awesome!

zconf.h is generated when zlib is compiled. In Linux it's in /build/vendor/zlib. Where is in on Windows?

VinciShark commented 7 years ago

{path-to-libsourcey}\build\vendor\zlib\

auscaster commented 7 years ago

OK cheers, that will be fixed in the next release.

VinciShark commented 7 years ago

Soon, I will update Windows Installation part in README.md...