Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw32, ffmpeg and others: libraries missing for mingw32 only #2593

Open
LigH-de opened this issue Jan 27, 2024 · 16 comments
Open

mingw32, ffmpeg and others: libraries missing for mingw32 only #2593

LigH-de opened this issue Jan 27, 2024 · 16 comments

Comments

@LigH-de
Copy link
Contributor

LigH-de commented Jan 27, 2024

Tail of ffmpeg-git/build-static-32bit/ffbuild/config.log

pkgconf --exists --print-errors librist >= 0.2.7
Package libcjson was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcjson.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcjson', required by 'librist', not found
ERROR: librist >= 0.2.7 not found using pkg-config

libcjson exists in msys64/mingw64/lib but not in msys64/mingw32/lib

@1480c1
Copy link
Member

1480c1 commented Jan 28, 2024

libcjson was removed for mingw32, so that would at least explain that. I'm going to need to make a list of deps that are required for 32-bit but were removed soon.

@LigH-de LigH-de changed the title mingw32, ffmpeg / librist: libcjson missing for mingw32 only mingw32, ffmpeg: libraries missing for mingw32 only Jan 28, 2024
@LigH-de LigH-de changed the title mingw32, ffmpeg: libraries missing for mingw32 only mingw32, ffmpeg and others: libraries missing for mingw32 only Jan 28, 2024
@LigH-de
Copy link
Contributor Author

LigH-de commented Jan 28, 2024

Another case: bmx

checking for uriParseUriA in -luriparser... no
configure: error: liburiparser not found

@Biswa96
Copy link
Contributor

Biswa96 commented Jan 28, 2024

Could you provide any reason for compiling 32 bit binaries?

@LigH-de
Copy link
Contributor Author

LigH-de commented Jan 29, 2024

In my case, just curiosity and testing. I just try now and then if it still works and tell you if not; the maintainers decide whether to try to find a solution or take it as a more serious reason to abandon the support.

@LigH-de
Copy link
Contributor Author

LigH-de commented Feb 7, 2024

Building 32-bit ffmpeg with librist can be repaired by reenabling the use of the internal cJSON, see #2476 (comment)
(Building 64-bit librist fails for another reason: undefined reference to `BCryptGenRandom')

_check=(librist.{a,pc} librist/librist.h)
[[ $standalone = y ]] && _check+=(bin-global/rist{sender,receiver,2rist,srppasswd}.exe)
if enabled librist && do_vcs "$SOURCE_REPO_LIBRIST"; then
-    do_pacman_install cjson
    do_uninstall include/librist "${_check[@]}"
-    extracommands=("-Dbuiltin_cjson=false")
+    extracommands=("-Dbuiltin_cjson=true")
    [[ $standalone = y ]] || extracommands+=("-Dbuilt_tools=false")
    do_mesoninstall global -Dhave_mingw_pthreads=true -Dtest=false "${extracommands[@]}"
    do_checkIfExist
fi

Regarding bmx, may it be suitable to build https://github.com/uriparser/uriparser from sources?

@LigH-de
Copy link
Contributor Author

LigH-de commented Feb 13, 2024

Created VideoLAN/librist issue 175

@Biswa96
Copy link
Contributor

Biswa96 commented Feb 14, 2024

The linker error does not seem related with librist. mbedcrypto should mention the bcrypt dependency somewhere.

@LigH-de
Copy link
Contributor Author

LigH-de commented Feb 14, 2024

Then maybe it's another issue of MSYS2 pkgconfig enumerating dependencies?

@Biswa96
Copy link
Contributor

Biswa96 commented Feb 14, 2024

mbedtls does not have pkgconfig file. The bcrypt dependency is mentioned in MbedTLSTargets.cmake file. You have to manually add bcrypt dependency in librist for static linking. Though I am not sure if upstream librist would add it or not.

@Biswa96
Copy link
Contributor

Biswa96 commented Feb 14, 2024

Upstream mbedtls has a new pull request to add pkgconfig file. We could wait for that one.

@LigH-de
Copy link
Contributor Author

LigH-de commented Feb 20, 2024

I guess this should have happened in Mbed-TLS/mbedtls@0315123 so MSYS2 needs to deploy new packages? In my suite, no *mbed*.pc exists yet, anywhere.

@Biswa96
Copy link
Contributor

Biswa96 commented Feb 20, 2024

Thanks for the reminder. The pkgconfig file is not complete yet. The version and lib.private field are empty and we need the later one for bcrypt. I shall try to figure something out.

@LigH-de
Copy link
Contributor Author

LigH-de commented Mar 15, 2024

@Biswa96 - read your commit comment but it seems not to be available yet, compilation still misses BCryptGenRandom in MinGW64. Will try again now and then ...

@Biswa96
Copy link
Contributor

Biswa96 commented Mar 15, 2024

I have tired with a sample tool in librist using cc test.c $(pkgconf -libs -static librist) command and not with m-ab-s.

@LigH-de
Copy link
Contributor Author

LigH-de commented Mar 29, 2024

Still no news...

build/librist-git/build-64bit/ab-suite.build.log

@Biswa96
Copy link
Contributor

Biswa96 commented Mar 29, 2024

The linking command does not have -lbcrypt. I am not familiar with this project and can not provide any suggestion.

Though, the output is correct from pkgconf.

$ pkgconf -libs -static mbedcrypto
-lmbedcrypto -lbcrypt

$ pkgconf -libs -static librist
-lrist -lws2_32 -liphlpapi -pthread -lmbedcrypto -lbcrypt -lcjson -lm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants