Closed ASopH closed 3 weeks ago
Same.
Same issue
Running git update for libmediainfo... ┌ libmediainfo git ...................................... [Updates found] ├ Running uninstall... ├ Running cmake... Likely error (tail of the failed operation logfile):
but not all the files it references.
Call Stack (most recent call first): C:/MABS/msys64/mingw64/lib/cmake/CURL/CURLConfig.cmake:58 (include) C:/MABS/msys64/mingw64/share/cmake/Modules/FindCURL.cmake:80 (find_package) CMakeLists.txt:89 (find_package)
-- Configuring incomplete, errors occurred! cmake failed. Check C:/MABS/build/libmediainfo-git/build-64bit/ab-suite.cmake.log This is required for other packages, so this script will exit. Creating diagnostics file...
Attach C:\MABS\build\logs.zip to the GitHub issue. Make sure the suite is up-to-date before reporting an issue. It might've been fixed already.
Try running the build again at a later time.
It or the FindCURL.cmake is looking for shared version of libcurl and ultimately fails because M-AB-S hides libcurl.dll.a by renaming it with additional ".dyn" suffix.
If the file is renamed back to original name before libmediainfo build, then it can pass the check. I thought this would make mediainfo.exe to link to shared curl but it seems not the case.
So why the heck would it look for shared curl since we (or M-AB-S) only want static linking and have the static library?
TinyXML2
is not found and raises an error? But file is inside the libmediainfo-git/Source/ThirdParty/tinyxml2/tinyxml2.cpp
so I don't know how to resolve this problem.
-- Checking for module 'tinyxml2'
-- Package 'tinyxml2' not found
-- Could NOT find TinyXML (missing: TinyXML_LIBRARIES)
CMake Error at C:/media-ab/msys64/mingw64/lib/cmake/CURL/CURLTargets.cmake:86 (message):
The imported target "CURL::libcurl_shared" references the file
EDIT As L4cache actually gave a comment it's libcurl.dll.a.dyn
file magic, I put a cp(copy) before cmake and libmediainfo and mediainfo.exe was compiled fine.
file: media-ab\build\media-suite_compile.sh
_check=(libmediainfo.{a,pc})
_deps=(lib{zen,curl}.a)
if do_vcs "$SOURCE_REPO_LIBMEDIAINFO" libmediainfo; then
do_uninstall include/MediaInfo{,DLL} bin-global/libmediainfo-config \
"${_check[@]}" libmediainfo.la lib/cmake/mediainfolib
cp "/C/media-ab/msys64/mingw64/lib/libcurl.dll.a.dyn" "/C/media-ab/msys64/mingw64/lib/libcurl.dll.a"
CFLAGS+=" $($PKG_CONFIG --cflags libzen)" \
LDFLAGS+=" $($PKG_CONFIG --cflags --libs libzen)" \
do_cmakeinstall Project/CMake -DBUILD_ZLIB=off -DBUILD_ZENLIB=off
do_checkIfExist
fi
fix_cmake_crap_exports "$LOCALDESTDIR/lib/cmake/mediainfolib"
I put a cp(copy) before cmake and libmediainfo and mediainfo.exe was compiled fine.
Then libmedinfo will link with shared curl library.
Why does MediaInfo requires cURL anyway? After all, it's just a tool / library to extract metadata out of local files...
Why does MediaInfo requires cURL anyway?
https://github.com/MediaArea/MediaInfoLib/blob/master/Source/MediaInfo/Reader/Reader_libcurl.cpp
Yeah, sorry, i know.
Was a rhetorical question implying we could have an additional option in mabs to turn network-readers off :-)
Meanwhile, if someone is interested in such a build, this libmediainfo_extra.sh
should do it:
_pre_cmake(){
sed -i 's!find_package(CURL)!!' ${REPO_DIR}/Project/CMake/CMakeLists.txt
sed -i 's!"ZenLib/Conf.h"!&\n#define MEDIAINFO_LIBMMS_NO\n#define MEDIAINFO_LIBCURL_NO!' ${REPO_DIR}/Source/MediaInfo/Setup.h
}
_post_install(){
cd "${REPO_DIR}" && git restore ./Source/MediaInfo/Setup.h ./Project/CMake/CMakeLists.txt
}
Uhh, so no cmake option to disable it easier?
Probably there is, but i didn't bothered wasting time looking for it, creating that *_extra.sh file was easier / faster :)
Ultimately, this is something we should do through media-suite_compile.sh
since we could also prevent having to compile libcurl
which takes ages.
PR(s) welcome ;)
@diegocr Thanks for your things-done-properly
script. My variation cp "msys64/mingw64/lib/libcurl.dll.a.dyn" "msys64/mingw64/lib/libcurl.dll.a"
was to get things compile without knowing anything about mediainfo.
Executable works for an offline files mediainfo.exe --full somevideo.ts
but I will take your _extra.sh script and recompile.
09:30:38 Running git update for hdr10plus_tool... 09:30:39 hdr10plus_tool git ............................... [Up-to-date] 09:30:41 Running git update for libzen... 09:30:43 libzen git ....................................... [Up-to-date] 09:30:46 Running git update for libmediainfo... 09:31:02 ┌ libmediainfo git ......................... [Recently updated] 09:31:02 ├ Running cmake... Likely error (tail of the failed operation logfile):
but not all the files it references.
Call Stack (most recent call first): F:/m-a-s/msys64/mingw32/lib/cmake/CURL/CURLConfig.cmake:58 (include) F:/m-a-s/msys64/mingw32/share/cmake/Modules/FindCURL.cmake:80 (find_package) CMakeLists.txt:89 (find_package)
-- Configuring incomplete, errors occurred! cmake failed. Check F:/m-a-s/build/libmediainfo-git/build-32bit/ab-suite.cmake.log This is required for other packages, so this script will exit. 09:31:23 Creating diagnostics file...
logs.zip