Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
June 09, 2021 10:26AM
Hello!

On Wed, Jun 09, 2021 at 02:55:28AM +0000, 王 静凯 wrote:

> >Certainly there is a way to compile natively. Even if for some
> >reason, for example, due to lack of disk space, it is not possible
> >to compile right on the target hardware, you can always compile in
> >an emulated environment.
>
> Because there is no gcc tools on the target environment.(Or
> maybe it is exist but we could not get it.)

That's sad, but as long as you have a cross-compiler available,
you can cross-compile a compiler and use it for native
compilation.

> >If you nevertheless insist on cross-compiling, which is, as
> >outlined above, is not supported, the right approach would be to
> >check all the configure tests affected by your cross-compilation
> >changes to nginx configure, notably all feature tests with
> >"ngx_feature_run=yes" and all sizeof tests. Proper check would be
> >to obtain the test binary as produced for the test by nginx
> >configure and run it on the target system, and then make sure that
> >results produced by your patched configure match the results from
> >running test binaries on the target system.
>
> I have try to set ngx_feature_run to no to make sendfile() and
> sendfile64() work, but then the server will response
> “ERR_CONTENT_LENGTH_MISMATCH”.

There are multiple feature tests with ngx_feature_run=yes, and
each of these tests needs to be properly evaluated. Just setting
ngx_feature_run=no will likely result in incorrectly working
binary.

> And try to set ngx_size to 8, but it didn’t take effect.

Similarly, there are multiple sizeof tests, and each of these
tests needs to be properly evaluated. Just setting ngx_size for
all the tests to a fixed value is certainly wrong.

> Do you mean compiling all the test program and run on the target system?

Each feature test with ngx_feature_run=yes and each sizeof test
compiles a test program, and runs it to obtain the test result.
To properly cross-compile nginx you have to provide correct test
results yourself - that is, you have to run the test program on the
target system, record the result, and then use it in configure
instead of running the particular test program.

Note again that tests results are different for different tests.
In particular, simply returning ngx_size=4 from all the sizeof
tests is wrong and expected to cause problems like the one you are
facing. You have to properly check sizes of all the types, they
are different.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
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

回复: Segmentation fault sometimes

王 静凯 November 11, 2022 04:06AM

Re: 回复: Segmentation fault sometimes

Sergey A. Osokin November 17, 2022 09:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 127
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready