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

Type defined several times, 64 bits compilation #522

Closed
trinytron opened this issue Aug 22, 2017 · 4 comments
Closed

Type defined several times, 64 bits compilation #522

trinytron opened this issue Aug 22, 2017 · 4 comments
Labels
Component: build Related to the Makefiles / build scripts in the project.
Milestone

Comments

@trinytron
Copy link

When compiling with libwebsocket (and using libuv), there is an issue regarding the "ssize_t" type definiton. This type is already defined in libuv, but libuv makes a difference between x86 and x64 platform.

on 64 bits compilation, ssize_t is a __int64, but ssize_t is defined as a int in net_most.h

A simple macro update should work fine !

@toast-uz
Copy link
Contributor

Could you describe the detailed instruction to reproduce the issue? I tried but libuv did not work well after compiling libwebsockets with libuv.

[centos@ip-172-31-17-231 ~]$ cat websockets_test.conf 
port 1890
protocol websockets

log_type all
websockets_log_level 255

[centos@ip-172-31-17-231 ~]$ mosquitto -c websockets_test.conf 
1505571392: mosquitto version 1.4.14 (build date 2017-09-16 14:13:15+0000) starting
1505571392: Config loaded from websockets_test.conf.
1505571392: Opening websockets listen socket on port 1890.
1505571392: Initial logging level 255
1505571392: Libwebsockets version: 2.3.0 centos@ip-172-31-17-231.ap-northeast-1.compute.internal-v2.0.0-487-g07b444c
1505571392: IPV6 not compiled in
1505571392: libev support not compiled in
1505571392: libuv support compiled in but disabled
1505571392:  Threads: 1 each 240000 fds
1505571392:  mem: platform fd map: 1920000 bytes
1505571392:  Compiled with OpenSSL support
1505571392: Doing SSL library init
1505571392: Creating Vhost 'default' port 1890, 3 protocols, IPv6 off
1505571392:  Using non-SSL mode
1505571392:  Listening on port 1890
1505571392:  mem: per-conn:          752 bytes + protocol rx buf
1505571392:  canonical_hostname = ip-172-31-17-231.ap-northeast-1.compute.internal

@szarta
Copy link

szarta commented Nov 9, 2017

Can you provide further detail regarding your build environment to help identify/reproduce this? I am building on Ubuntu 16.04 64-bit with websocket enabled in the config.mk - granted I am using the dependencies (libwebsockets) installed from the package manager.

Script started on Thu 09 Nov 2017 05:46:49 PM EST
brandon@ci-1:~/mosquitto$ cat websockets_test.conf
port 1890
protocol websockets

log_type all
websockets_log_level 255
brandon@ci-1:~/mosquitto$ ./src/mosquitto -c websockets_test.conf
1510267639: mosquitto version 1.4.14 (build date 2017-11-09 17:41:27-0500) starting
1510267639: Config loaded from websockets_test.conf.
1510267639: Opening websockets listen socket on port 1890.
1510267639: Initial logging level 255
1510267639: Libwebsockets version: 1.7.1 unknown-build-hash
1510267639: IPV6 not compiled in
1510267639: libev support compiled in but disabled
1510267639:  LWS_DEF_HEADER_LEN    : 1024
1510267639:  LWS_MAX_PROTOCOLS     : 5
1510267639:  LWS_MAX_SMP           : 32
1510267639:  SPEC_LATEST_SUPPORTED : 13
1510267639:  sizeof (*info)        : 216
1510267639:  SYSTEM_RANDOM_FILEPATH: '/dev/urandom'
1510267639:  default timeout (secs): 20
1510267639:  Threads: 1 each 1024 fds
1510267639:  mem: context:         62808 bytes (58712 ctx + (1 thr x 4096))
1510267639:  mem: http hdr rsvd:   67712 bytes (1 thr x (1024 + 3208) x 16))
1510267639:  mem: pollfd map:       8192
1510267639:  mem: platform fd map:  8192 bytes
1510267639:  LWS_MAX_EXTENSIONS_ACTIVE: 2
1510267639:  mem: per-conn:          808 bytes + protocol rx buf
1510267639:  canonical_hostname = ci-1
1510267639:  Compiled with OpenSSL support
1510267639:  Using non-SSL mode
1510267639:  SSL ECDH curve 'prime256v1'
1510267639: insert_wsi_socket_into_fds: 0x901a10: tsi=0, sock=6, pos-in-fds=1
1510267639:  Listening on port 1890
^C1510267645: mosquitto version 1.4.14 terminating
1510267645: lws_context_destroy
1510267645: lws_close_free_wsi: real just_kill_connection: 0x901a10
1510267645: remove_wsi_socket_from_fds: wsi=0x901a10, sock=6, fds pos=1, end guy pos=2, endfd=0
1510267645: not calling back closed mode=16 state=0
1510267645: lws_free_wsi: 0x901a10, remaining wsi 0
brandon@ci-1:~/mosquitto$ uname -a
Linux ci-1 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
brandon@ci-1:~/mosquitto$ exit
exit

Script done on Thu 09 Nov 2017 05:47:42 PM EST

@toast-uz toast-uz added Component: build Related to the Makefiles / build scripts in the project. Status: Blocked Another issue needs to be resolved first labels Mar 2, 2018
@ralight
Copy link
Contributor

ralight commented Aug 8, 2018

This is a Windows issue.

ralight added a commit that referenced this issue Sep 4, 2019
Closes #522. Thanks to trinytron.
@ralight ralight removed the Status: Blocked Another issue needs to be resolved first label Sep 4, 2019
@ralight ralight added this to the 1.6.5 milestone Sep 4, 2019
@ralight
Copy link
Contributor

ralight commented Sep 4, 2019

Fixed for 1.6.5.

@ralight ralight closed this as completed Sep 4, 2019
ralight added a commit that referenced this issue Sep 4, 2019
Closes #522. Thanks to trinytron.
ralight added a commit that referenced this issue Sep 18, 2019
Closes #522. Thanks to trinytron.
@lock lock bot locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: build Related to the Makefiles / build scripts in the project.
Projects
None yet
Development

No branches or pull requests

4 participants