[Libwebsockets] packaging help

Jaco Kroon jaco at uls.co.za
Thu Nov 7 11:38:55 CET 2019


Hi Andy,

Thanks, that's helpful.

On 2019/11/07 12:03, Andy Green wrote:
>
>
> On 11/7/19 9:54 AM, Jaco Kroon wrote:
>> Hi Andy,
>>
>> I've been tasked with version bumping the Gentoo install, and trying to
>> package 3.2.0.  I'm getting compile errors that seem to be internal to
>> libwebsockets.  Could be a misunderstanding of how things work.
>>
>> You've posted some comments on the Gentoo bug tracker regarding
>> libwebsockets, and upstream stuff.  This seems to complicate things for
>> me at the moment.
>
> I dunno what you are referring to.

Specifically https://bugs.gentoo.org/615532

Other bugs I need to deal with too (which I'm hoping the bump to 3.2.0
will just make go away):

https://bugs.gentoo.org/618428
https://bugs.gentoo.org/672194
https://bugs.gentoo.org/669152

Not even sure what two of those are even implying.  The last one
(without having dug into the code yet) could be legit.

>
>> My biggest issue right at the moment is this:
>>
>> : && /usr/bin/cc -Wall -Wsign-compare -Wuninitialized -Werror
>> -fvisibility=hidden -Wundef  -Wtype-limits -Wignored-qualifiers
>> -pthread  -rdynamic
>> CMakeFiles/test-server.dir/test-apps/test-server.c.o  -o
>> bin/libwebsockets-test-server  -Wl,-rpath,/tmp/libwebsockets-3.2.0/lib:
>> lib/libwebsockets.so.15 -lz -lssl -lcrypto -lev -lm && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E make_directory
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/libwebsockets-test-server.key.pem
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/libwebsockets-test-server.pem
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/favicon.ico
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/leaf.jpg
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/candide.zip
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/libwebsockets.org-logo.svg
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/http2.png
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/wss-over-h2.png
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/lws-common.js
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/test.html
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/test.css
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server && cd
>> /tmp/libwebsockets-3.2.0 && /usr/bin/cmake -E copy
>> /tmp/libwebsockets-3.2.0/test-apps/test.js
>> /tmp/libwebsockets-3.2.0/bin/../share/libwebsockets-test-server
>> /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>>
>> lib/libwebsockets.so.15: undefined reference to `lejp_error_to_string'
>> /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>>
>> lib/libwebsockets.so.15: undefined reference to `lejp_parser_push'
>> /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>>
>> lib/libwebsockets.so.15: undefined reference to `lejp_get_wildcard'
>> /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>>
>> lib/libwebsockets.so.15: undefined reference to `lejp_parser_pop'
>> /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>>
>> lib/libwebsockets.so.15: undefined reference to `lejp_construct'
>> /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>>
>> lib/libwebsockets.so.15: undefined reference to `lejp_parse'
>> /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>>
>> lib/libwebsockets.so.15: undefined reference to `lejp_destruct'
>> collect2: error: ld returned 1 exit status
>> ninja: build stopped: subcommand failed.
>>
>> The original cmake configuration command was this:
>>
>> cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DLWS_IPV6=ON
>> -DLWS_LINK_TESTAPPS_DYNAMIC=ON -DLWS_WITH_HTTP2=ON -DLWS_WITH_STATIC=OFF
>> -DLWS_HAVE_LIBCAP=OFF -DLWS_WITH_LIBEV=ON -DLWS_WITH_LIBEVENT=OFF
>> -DLWS_WITH_LIBUV=OFF -DLWS_WITH_PEER_LIMITS=OFF -DLWS_WITH_SSL=ON
>> -DLWS_WITHOUT_CLIENT=ON -DLWS_WITHOUT_TEST_CLIENT=ON -DLWS_WITH_CGI=OFF
>> -DLWS_WITH_HTTP_PROXY=OFF -DLWS_WITH_ACCESS_LOG=OFF
>> -DLWS_WITH_SERVER_STATUS=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
>> -DLWS_WITH_LEJP=OFF -DLWS_WITH_GENERIC_SESSIONS=OFF
>> -DLWS_WITH_SQLITE3=OFF -DLWS_WITH_SMTP=OFF -DLWS_WITH_SOCKS5=OFF
>> -DLWS_WITH_ZIP_FOPS=ON -DCMAKE_BUILD_TYPE=Gentoo
>
> You're telling it to not build with lejp
>
>  > -DLWS_WITH_LEJP=OFF
>
> but evidently something is enabled that wants it.  Make sure
> -DLWS_WITH_STRUCT_JSON=0 since that looks like the likely consumer.

Isn't this something the build system could potentially do internally?

Anyway, that got me in the right direction, was the testapps actually.

On that front, once compiled (before installing), is there a test suite
that can be run to verify that everything has been built and is working
correctly?

>
> If you're doing the cmake by hand, notice you have to remove
> ./build/CMakeCache.txt to stop cmake caching previous settings that
> were not explicitly overridden which is the usual cause of confusion.

That's very good to know thanks!

Kind Regards,
Jaco


>
> -Andy
>
>> (Which I retrieved from the gentoo build logs, and just dropped most of
>> the path specs that builds in /var/tmp/portage ...
>>
>> Would you be able (and willing) to assist please?
>>
>>
>> Kind Regards,
>> Jaco Kroon
>>
>>
>>
>>
>> _______________________________________________
>> Libwebsockets mailing list
>> Libwebsockets at ml.libwebsockets.org
>> https://libwebsockets.org/mailman/listinfo/libwebsockets
>>


More information about the Libwebsockets mailing list