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

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

Closed
bigbao9494 opened this issue Dec 30, 2019 · 14 comments
Closed

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

bigbao9494 opened this issue Dec 30, 2019 · 14 comments
Assignees
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT.
Milestone

Comments

@bigbao9494
Copy link

bigbao9494 commented Dec 30, 2019

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

@winlinvip
Copy link
Member

winlinvip commented Jan 5, 2020

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

TRANS_BY_GPT3

@bigbao9494
Copy link
Author

bigbao9494 commented Jan 6, 2020

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

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Jan 6, 2020

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

@winlinvip winlinvip added this to the SRS 4.0 release milestone Jan 6, 2020
@bigbao9494
Copy link
Author

bigbao9494 commented Jan 8, 2020

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

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Jan 8, 2020

Friend, currently it's just you, hahaha.

TRANS_BY_GPT3

@liuguang
Copy link

liuguang commented Jan 19, 2020

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

TRANS_BY_GPT3

@liuguang
Copy link

liuguang commented Jan 19, 2020

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

bb3e8a41d13fa8dc87065c2adcf4d6f438b37e95 is the commit when cross-compilation was supported.

TRANS_BY_GPT3

@winlinvip winlinvip added the Bug It might be a bug. label Jan 20, 2020
@winlinvip
Copy link
Member

winlinvip commented Jan 20, 2020

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

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Jan 20, 2020

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

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Jan 20, 2020

#1547 (comment)

@winlinvip
Copy link
Member

winlinvip commented Jan 21, 2020

#1547 (comment)

@duduathz
Copy link

duduathz commented Mar 13, 2020

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

TRANS_BY_GPT3

@docterling
Copy link

docterling commented Mar 15, 2020

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

@XJTU-ZSY
Copy link

XJTU-ZSY commented May 22, 2020

Can you also support MIPS?

TRANS_BY_GPT3

@winlinvip winlinvip changed the title 最新的SRS3不支持ARM交叉编译? SRS支持嵌入式设备的交叉编译 May 21, 2021
@winlinvip winlinvip changed the title SRS支持嵌入式设备的交叉编译 SRS支持嵌入式设备的交叉编译,ARM,MIPS,armv8,aarch64等 May 21, 2021
@winlinvip winlinvip changed the title SRS支持嵌入式设备的交叉编译,ARM,MIPS,armv8,aarch64等 SRS支持ARM,MIPS,armv8,aarch64等 Jun 18, 2021
@winlinvip winlinvip added the Duplicated Duplicated bug. label Jun 18, 2021
@winlinvip winlinvip changed the title SRS支持ARM,MIPS,armv8,aarch64等 支持交叉编译:ARM,MIPS,armv8,aarch64等 Jun 18, 2021
@winlinvip winlinvip removed the Bug It might be a bug. label Jun 18, 2021
@winlinvip winlinvip added Feature It's a new feature. and removed Duplicated Duplicated bug. labels Jun 18, 2021
@ossrs ossrs locked as too heated and limited conversation to collaborators Jun 21, 2021
@winlinvip winlinvip self-assigned this Sep 5, 2021
@winlinvip winlinvip changed the title 支持交叉编译:ARM,MIPS,armv8,aarch64等 Support cross-compilation: ARM, MIPS, armv8, aarch64, etc. Jul 27, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

6 participants