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

'make erl' Compiling _build/default/lib/cowlib/src/cow_sse.erl failed #109

Closed
philleer opened this issue Apr 18, 2023 · 2 comments
Closed

Comments

@philleer
Copy link

Hi, I am trying to test the compile flow, according to instructions from the doc: https://www.emqx.io/docs/zh/v5.0/extensions/plugins.html#_2-%E6%B5%8B%E8%AF%95%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83

Well, I just clone the repo and run make rel.
Unfortunately, I got the following error info

root@3210f365cfae:/home/emqx/emqx-plugin-template# make rel
/home/emqx/emqx-plugin-template/rebar3 emqx_plugrel tar
===> Verifying dependencies...
+ mkdir -p _build/cmake
+ cd _build/cmake
+ type cmake3
+ CMAKE=cmake
+ cmake -DWITH_BUNDLE_LZ4=ON -DWITH_BUNDLE_SNAPPY=ON ../../c_src
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- LZ4 library: /home/emqx/emqx-plugin-template/_build/default/lib/rocksdb/_build/cmake/lz4/lib/liblz4.a
-- LZ4 includes: /home/emqx/emqx-plugin-template/_build/default/lib/rocksdb/_build/cmake/lz4/include
-- Snappy library: /home/emqx/emqx-plugin-template/_build/default/lib/rocksdb/_build/cmake/snappy/lib/libsnappy.a
-- Snappy includes: /home/emqx/emqx-plugin-template/_build/default/lib/rocksdb/_build/cmake/snappy/include
-- cmake args -DCMAKE_POSITION_INDEPENDENT_CODE=ON;-DCMAKE_CXX_COMPILER=/usr/bin/c++;-DCMAKE_AR=/usr/bin/ar;-DCMAKE_BUILD_TYPE=Rel
ease;-DFAIL_ON_WARNINGS=OFF;-DPORTABLE=ON;-DUSE_RTTI=1;-DWITH_TOOLS=OFF;-DWITH_TESTS=OFF;-DWITH_GFLAGS=OFF;-DWITH_JEMALLOC=OFF;-DW
ITH_TBB=;-DWITH_SNAPPY=TRUE;-DWITH_LZ4=TRUE;-DWITH_ZLIB=;-DWITH_BZ2=;-DWITH_ZSTD=;-Dsnappy_ROOT_DIR=/home/emqx/emqx-plugin-templat
e/_build/default/lib/rocksdb/_build/cmake/snappy;-Dlz4_ROOT_DIR=/home/emqx/emqx-plugin-template/_build/default/lib/rocksdb/_build/
cmake/lz4
-- Found RocksDB library: /home/emqx/emqx-plugin-template/_build/default/lib/rocksdb/_build/cmake/rocksdb-prefix/src/rocksdb-build
/librocksdb.a
-- Found RocksDB includes: /home/emqx/emqx-plugin-template/_build/default/lib/rocksdb/c_src/../deps/rocksdb/include
-- Using OTP lib: /home/erlang/lib/erlang/lib - found
-- Using erl_interface version: erl_interface-5.4
-- Using erts version: erts-14.0
-- Performing Test HAVE_OMIT_LEAF_FRAME_POINTER
-- Performing Test HAVE_OMIT_LEAF_FRAME_POINTER - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/emqx/emqx-plugin-template/_build/default/lib/rocksdb/_build/cmake
+ echo done-do_cmake.
done-do_cmake.
===> Compiling c_src/decoder.c
===> Compiling c_src/encoder.c
===> Compiling c_src/jiffy.c
===> Compiling c_src/termstack.c
===> Compiling c_src/utf8.c
===> Compiling c_src/util.c
===> Compiling c_src/doubles.cc
===> Compiling c_src/objects.cc
===> Compiling c_src/double-conversion/bignum-dtoa.cc
===> Compiling c_src/double-conversion/bignum.cc
===> Compiling c_src/double-conversion/cached-powers.cc
===> Compiling c_src/double-conversion/diy-fp.cc
===> Compiling c_src/double-conversion/double-conversion.cc
===> Compiling c_src/double-conversion/fast-dtoa.cc
===> Compiling c_src/double-conversion/fixed-dtoa.cc
===> Compiling c_src/double-conversion/strtod.cc
===> Linking /home/emqx/emqx-plugin-template/_build/default/lib/jiffy/priv/jiffy.so
===> Compiling c_src/async_queue.c
===> Compiling c_src/bcrypt.c
===> Compiling c_src/bcrypt_nif.c
===> Compiling c_src/blowfish.c
===> Linking /home/emqx/emqx-plugin-template/_build/default/lib/bcrypt/priv/bcrypt_nif.so
===> Analyzing applications...
===> Compiling rocksdb
===> Compiling recon
===> Compiling sext
===> Compiling snabbkaffe
===> Compiling lc
===> Compiling cowlib
===> Compiling _build/default/lib/cowlib/src/cow_sse.erl failed
_build/default/lib/cowlib/src/cow_sse.erl:56:29: type variable 'State' is only used once (is unbound)

make: *** [Makefile:49: rel] Error 1

Have no idea what does this mean, and how to fix the error? Any suggestions will be appreciated!

@JimMoen
Copy link
Member

JimMoen commented May 29, 2023

Hi, sorry for late reply. you can try to use the latest EMQX release to build.

  • Pull the newest branch master
  • Bump emqx to v5.0.25, see this commit
  • Run make clean, then make rel

@zmstone
Copy link
Member

zmstone commented Aug 29, 2023

we believe this issues has been fixed in later version.

@zmstone zmstone closed this as completed Aug 29, 2023
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