[Libwebsockets] packaging help

Jaco Kroon jaco at uls.co.za
Thu Nov 7 19:07:07 CET 2019


Hi Andy,

I'm going to bump to 3.2 and then just close the others as WONTFIX
asking if 3.2.0 solves their issue, however, there is a few more:

/usr/bin/x86_64-pc-linux-gnu-gcc -Dwebsockets_shared_EXPORTS
-I/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/include
-I/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/plugins
-I.
-I/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/lib
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include  -DNDEBUG -Wall
-Wsign-compare -Wuninitialized -Werror -fvisibility=hidden -Wundef 
-Wtype-limits -Wignored-qualifiers -O2 -march=native -pipe  -fPIC -MD
-MT CMakeFiles/websockets_shared.dir/lib/roles/http/client/client.c.o
-MF CMakeFiles/websockets_shared.dir/lib/roles/http/client/client.c.o.d
-o CMakeFiles/websockets_shared.dir/lib/roles/http/client/client.c.o -c
/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/lib/roles/http/client/client.c
/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/lib/roles/http/client/client.c:
In function 'lws_client_socket_service':
/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/lib/roles/http/client/client.c:217:10:
error: assignment of read-only location '*cce'
     *cce = "socks gen msg fail";

As far as I can tell, the * just needs to fall away.

/usr/bin/x86_64-pc-linux-gnu-gcc -Dwebsockets_shared_EXPORTS
-I/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/include
-I/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/plugins
-I.
-I/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/lib
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include  -DNDEBUG -Wall
-Wsign-compare -Wuninitialized -Werror -fvisibility=hidden -Wundef 
-Wtype-limits -Wignored-qualifiers -O2 -march=native -pipe  -fPIC -MD
-MT CMakeFiles/websockets_shared.dir/lib/misc/lws-struct-sqlite.c.o -MF
CMakeFiles/websockets_shared.dir/lib/misc/lws-struct-sqlite.c.o.d -o
CMakeFiles/websockets_shared.dir/lib/misc/lws-struct-sqlite.c.o -c
/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/lib/misc/lws-struct-sqlite.c
/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/lib/misc/lws-struct-sqlite.c:
In function 'lws_struct_sq3_open':
/var/tmp/portage/net-libs/libwebsockets-3.2.0/work/libwebsockets-3.2.0/lib/misc/lws-struct-sqlite.c:257:3:
error: ignoring return value of 'chown', declared with attribute
warn_unused_result [-Werror=unused-result]
   chown(sqlite3_path, uid, gid);

This I've simply patched to log the error and then continue on anyway.

Patches for both issues attached.

Kind Regards,
Jaco

On 2019/11/07 12:48, Andy Green wrote:

>
> On November 7, 2019 10:38:55 AM GMT, Jaco Kroon <jaco at uls.co.za> wrote:
>> 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
> That's libev's problem, follow the links in the comment to hear how it's supposed to be a "gcc problem".  Either way it's not an lws problem.
>
>> 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.
> lws v2 is very old.
>
>>>> 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?
> It does.  But if you're defiming things with cmake manually and keeping the cache, you can get combinations of thjngs that aren't handled in CMakeLists.txt.
>
>> 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?
> In CI it runs a bunch of stuff... if you build with LWS_WITH_MINIMAL_EXAMPLES=1 and run ../minimal-examples/selftests.sh it will test a bunch of stuff.
>
> -Andy
>
>>> 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
>>>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lws_check_chown_result.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20191107/2800b7ff/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lws_string_assignment.patch
Type: text/x-patch
Size: 482 bytes
Desc: not available
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20191107/2800b7ff/attachment-0001.bin>


More information about the Libwebsockets mailing list