ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.

Home Page:https://ossrs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support cross-compilation: ARM, MIPS, armv8, aarch64, etc.

bigbao9494 opened this issue · comments

Remark

!!! Attention, please confirm whether cross-compilation is necessary. In general, direct compilation is possible unless in very few cases.

Weng Xiaojing: It seems that many people misunderstand the meaning of cross-compilation. It is only required for compiling on heterogeneous platforms, such as when the compilation platform and the execution platform are different. It is not necessary when both platforms are the same.

Weng Xiaojing: The most common scenario is playing with network devices because the processors in network devices are usually weak and the compilation process is slow. That's why cross-compilation is done on a PC. The processors in PCs are usually x86, while the processors in network devices are mostly low-frequency MIPS or ARM processors, which are considered heterogeneous. The compilation speed of x86 processors is significantly faster than that of MIPS or ARM processors. Therefore, most people prefer to do cross-compilation on a PC and then copy the results into the network devices. This significantly speeds up the compilation process. Of course, if you have time, you can also compile directly on the network device, but it will be much slower.

Weng Xiaojing: I saw a friend mention ARM servers like Kunpeng, so you can directly compile on the ARM server instead of cross-compiling. There's no need to go through the extra step of cross-compilation because ARM servers are not network devices. Compiling a program on an ARM server is not a problem. Let's not take a detour.

Ubuntu Cross Build

Cross Build SRS on Ubuntu

Cross-compilation on Ubuntu platform

SRS 3.0:

SRS 4.0 ARMv8(aarch64):

SRS 4.0 ARMv7:

ARM Server

Directly compiling SRS on ARM Server: link

TRANS_BY_GPT3

Yes, I plan to stop supporting cross-compilation. I recommend compiling directly on an ARM server.

TRANS_BY_GPT3

Which version of 3.0 can still be cross-compiled for ARM?

TRANS_BY_GPT3

The call for support is so strong... I am considering if it would be better to show my support. I need to take another look at how many people are in need...

TRANS_BY_GPT3

Still support it, many people may use it in an embedded environment.

TRANS_BY_GPT3

Friend, currently it's just you, hahaha.

TRANS_BY_GPT3

2个,哈哈。' translates to '2, haha.

TRANS_BY_GPT3

Which version of 3.0 can still support ARM cross-compilation?

bb3e8a41d13fa8dc87065c2adcf4d6f438b37e95 is the commit when cross-compilation was supported.

TRANS_BY_GPT3

The previous cross-compilation was not done well, I will see how to support it better.

TRANS_BY_GPT3

You can choose to pick this commit and disable cross-compilation directly: commit link

TRANS_BY_GPT3

Strongly appeal for support for cross-compiling. Currently, the capabilities of embedded ARM are becoming stronger and stronger. Thank you!

TRANS_BY_GPT3

I compiled using Hisilicon's arm-hisiv300-linux, but I keep getting a segmentation fault when running it. GDB's backtrace points to strnlen, I wonder if anyone else has encountered the same issue.

TRANS_BY_GPT3

Can you also support MIPS?

TRANS_BY_GPT3