Welcome! Log In Create A New Profile

Advanced

回复: Server mp4 file larger than 2GB on 32bit system

王 静凯
June 06, 2021 10:46PM
>What does "./configure" output show? Are you running configure on
>the target system, or tried to cross-compile nginx?

>It looks like for some reason nginx wasn't able to find out how to
>instruct your system to use 64-bit off_t. The most likely reason
>I can think of is an attempt to cross-compile nginx. Note that
>cross-compiling is not supported and not going to work. The most
>simple and the only supported solution would be to compile nginx
>natively.

Yes,I am doing a cross compile.
There is no way to compile natively.

The configure output:
root@ava-virtual-machine:/wjk/pingos-arm3536/pingos/modules/nginx-1.20.1# ./configure --user=root --group=root --sbin-path=/usr/local/nginx/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --pid-path=/usr/local/nginx/logs/nginx.pid --error-log-path=/usr/local/nginx/logs/error.log --with-http_ssl_module --with-cc=arm-hisiv400-linux-gcc --with-cpp=arm-hisiv400-linux-cpp --with-pcre=../pcre-8.44 --with-openssl=../openssl-1.1.1k --add-module=../nginx-client-module --add-module=../nginx-multiport-module --add-module=../nginx-toolkit-module --add-module=../nginx-rtmp-module --with-http_flv_module --with-http_mp4_module --with-debug --with-zlib=../zlib-1.2.11 --with-http_stub_status_module --with-cc-opt='-D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE' --with-ld-opt='-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE' --with-http_slice_module
checking for OS
+ Linux 5.3.0-64-generic x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.8.3 20131202 (prerelease) (Hisilicon_v400)
checking for gcc -pipe switch ... found
checking for --with-ld-opt="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found but is not working
checking for C99 variadic macros ... found but is not working
checking for gcc variadic macros ... found but is not working
checking for gcc builtin 64 bit byteswap ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for EPOLLRDHUP ... found
checking for EPOLLEXCLUSIVE ... not found
checking for eventfd() ... found
checking for O_PATH ... found
checking for sendfile() ... found but is not working
checking for sendfile64() ... found but is not working
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found but is not working
checking for prctl(PR_SET_KEEPCAPS) ... found but is not working
checking for capabilities ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for sched_setaffinity() ... found
checking for SO_SETFIB ... not found
checking for SO_REUSEPORT ... not found
checking for SO_ACCEPTFILTER ... not found
checking for SO_BINDANY ... not found
checking for IP_TRANSPARENT ... found
checking for IP_BINDANY ... not found
checking for IP_BIND_ADDRESS_NO_PORT ... not found
checking for IP_RECVDSTADDR ... not found
checking for IP_SENDSRCADDR ... not found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... not found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for int size ... 4 bytes
checking for long size ... 4 bytes
checking for long long size ... 4 bytes
checking for void * size ... 4 bytes
checking for uint32_t ... found
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... big endian
checking for size_t size ... 4 bytes
checking for off_t size ... 4 bytes
checking for time_t size ... 4 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for pwritev() ... found
checking for strerrordesc_np() ... not found
checking for sys_nerr ... found but is not working
checking for _sys_nerr ... found but is not working
checking for localtime_r() ... found
checking for clock_gettime(CLOCK_MONOTONIC) ... not found
checking for clock_gettime(CLOCK_MONOTONIC) in librt ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found but is not working
checking for mmap("/dev/zero", MAP_SHARED) ... found but is not working
checking for System V shared memory ... found but is not working
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found but is not working
checking for POSIX semaphores in librt ... not found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for ioctl(FIONREAD) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
configuring additional modules
adding module in ../nginx-client-module
+ ngx_client_module was configured
adding module in ../nginx-multiport-module
+ ngx_multiport_module was configured
adding module in ../nginx-toolkit-module
+ ngx_toolkit_module was configured
adding module in ../nginx-rtmp-module
+ ngx_rtmp_module was configured
creating objs/Makefile

Configuration summary
+ using PCRE library: ../pcre-8.44
+ using OpenSSL library: ../openssl-1.1.1k
+ using zlib library: ../zlib-1.2.11

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

发件人: Maxim Dounin<mailto:mdounin@mdounin.ru>
发送时间: 2021年6月7日 0:10
收件人: nginx@nginx.org<mailto:nginx@nginx.org>
主题: Re: Server mp4 file larger than 2GB on 32bit system

Hello!

On Sat, Jun 05, 2021 at 08:35:32AM +0000, 王 静凯 wrote:

> I compile a nginx for an 32bit system (ARM).
> When I request a mp4 file which is larger than 2GB then it response with '416 Requested Range Not Satisfiable’.
> The type of max_ranges is ngx_uint_t, I could not set it max than about 2000000000.
> In this situation, I could I server the mp4 file correctly?

The max_ranges directive is to limit the number of ranges in a
request, which almost always at most one (and just one in the
request you've showed). And it is completely unrelated to 416
errors. Just leave the default.

> The ngx_size is set to 4 when I compile nginx.
> So:
> #ifndef NGX_MAX_SIZE_T_VALUE
> #define NGX_MAX_SIZE_T_VALUE 2147483647
> #endif
>
>
> #ifndef NGX_SIZE_T_LEN
> #define NGX_SIZE_T_LEN (sizeof("-2147483648") - 1)
> #endif
>
>
> #ifndef NGX_MAX_OFF_T_VALUE
> #define NGX_MAX_OFF_T_VALUE 2147483647
> #endif
>
>
> #ifndef NGX_OFF_T_LEN
> #define NGX_OFF_T_LEN (sizeof("-2147483648") - 1)
> #endif

What does "./configure" output show? Are you running configure on
the target system, or tried to cross-compile nginx?

It looks like for some reason nginx wasn't able to find out how to
instruct your system to use 64-bit off_t. The most likely reason
I can think of is an attempt to cross-compile nginx. Note that
cross-compiling is not supported and not going to work. The most
simple and the only supported solution would be to compile nginx
natively.

--
Maxim Dounin
https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmdounin.ru%2F&amp;data=04%7C01%7C%7C9d9e573c16ce4999d88c08d92905a5be%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637585926499571416%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=gWfy8ZPy%2B%2Bsdszv9FojJIBfsEt82KP9lY%2FQradMzx2g%3D&amp;reserved=0
_______________________________________________
nginx mailing list
nginx@nginx.org
https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.nginx.org%2Fmailman%2Flistinfo%2Fnginx&amp;data=04%7C01%7C%7C9d9e573c16ce4999d88c08d92905a5be%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637585926499571416%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=AbLY8pukl8cg3dEcXamXgLJ1gnMy1M%2B%2F91VWZGDh1i0%3D&amp;reserved=0

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Server mp4 file larger than 2GB on 32bit system

王 静凯 June 05, 2021 04:36AM

Re: Server mp4 file larger than 2GB on 32bit system

Maxim Dounin June 06, 2021 12:12PM

回复: Server mp4 file larger than 2GB on 32bit system

王 静凯 June 06, 2021 10:46PM

Re: 回复: Server mp4 file larger than 2GB on 32bit system

Maxim Dounin June 07, 2021 08:22AM

Server mp4 file larger than 2GB on 32bit system

王 静凯 June 08, 2021 10:56PM

Re: Server mp4 file larger than 2GB on 32bit system

Maxim Dounin June 09, 2021 10:26AM

Segmentation fault sometimes

王 静凯 August 24, 2021 04:38AM

RE: Segmentation fault sometimes

Ali Ghanbari August 29, 2021 04:00AM

Re: Segmentation fault sometimes

Sergey A. Osokin August 30, 2021 06:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 64
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready