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

compiling with libwebsockets 4.3.1 fails #918

Closed
Mindavi opened this issue Apr 11, 2022 · 3 comments
Closed

compiling with libwebsockets 4.3.1 fails #918

Mindavi opened this issue Apr 11, 2022 · 3 comments

Comments

@Mindavi
Copy link

Mindavi commented Apr 11, 2022

Describe the bug

Compiling with libwebsockets 4.3.1 fails.
Not sure if libwebsockets or this package is at fault, but I'm hoping you'd be able to shed some light on it.

To Reproduce
Steps to reproduce the behavior:

  1. Apply the attached patch (updating libwebsockets to 4.3.1 in the cross-build script)
  2. Run env BUILD_TARGET=i686 ./scripts/cross-build.sh
  3. See build failure:
=== Building ttyd (i686-linux-musl)...
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 11.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /tmp/ttyd/cr/cross/bin/i686-linux-musl-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /run/current-system/sw/bin/git (found version "2.35.1") 
-- Found LIBUV: /tmp/ttyd/cr/stage/i686-linux-musl/lib/libuv.a  
-- Found JSON-C: /tmp/ttyd/cr/stage/i686-linux-musl/lib/libjson-c.a  
-- Found ZLIB: /tmp/ttyd/cr/stage/i686-linux-musl/lib/libz.a (found version "1.2.12") 
CMake Error at /tmp/ttyd/cr/stage/i686-linux-musl/lib/cmake/libwebsockets/libwebsockets-config.cmake:35 (include):
  include could not find requested file:

    LwsCheckRequirements
Call Stack (most recent call first):
  CMakeLists.txt:54 (find_package)
diff --git a/scripts/cross-build.sh b/scripts/cross-build.sh
index 01e2a87..751ad56 100755
--- a/scripts/cross-build.sh
+++ b/scripts/cross-build.sh
@@ -14,7 +14,7 @@ ZLIB_VERSION="${ZLIB_VERSION:-1.2.12}"
 JSON_C_VERSION="${JSON_C_VERSION:-0.15}"
 MBEDTLS_VERSION="${MBEDTLS_VERSION:-2.16.8}"
 LIBUV_VERSION="${LIBUV_VERSION:-1.40.0}"
-LIBWEBSOCKETS_VERSION="${LIBWEBSOCKETS_VERSION:-4.2.1}"
+LIBWEBSOCKETS_VERSION="${LIBWEBSOCKETS_VERSION:-4.3.1}"
 
 build_zlib() {
     echo "=== Building zlib-${ZLIB_VERSION} (${TARGET})..."

Expected behavior

Build succeeds without cmake errors.

Environment:

  • OS: NixOS 22.05 Quokka
  • Browser: [e.g. Chrome 79.0.3945.130]

Additional context

I noticed this when updating libwebsockets in the nixpkgs package repository. It was working fine with 4.3.0, but broke with 4.3.1. See the PR to nixpkgs: NixOS/nixpkgs#168304

@Mindavi Mindavi added the bug label Apr 11, 2022
@bbilas
Copy link
Contributor

bbilas commented Apr 15, 2022

The same errors have been encountered in buildroot, see http://autobuild.buildroot.net/?reason=ttyd-1.6.3.

@Mindavi
Copy link
Author

Mindavi commented Apr 19, 2022

Thanks, applying that patch fixes the build.

@Mindavi Mindavi closed this as completed Apr 19, 2022
Mindavi added a commit to Mindavi/nixpkgs that referenced this issue Apr 24, 2022
Changelog (there's no official one):
- warmcat/libwebsockets@v4.3.0...v4.3.1

Also apply a patch required to make ttyd build again.
This is probably due to a bug in the lws cmake module,
which may only be exercised in this package.
See also tsl0922/ttyd#918.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants