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

Compiling on AARCH64 #49

Open
IchthysMaranathaCopy opened this issue Jun 21, 2021 · 5 comments
Open

Compiling on AARCH64 #49

IchthysMaranathaCopy opened this issue Jun 21, 2021 · 5 comments

Comments

@IchthysMaranathaCopy
Copy link

IchthysMaranathaCopy commented Jun 21, 2021

Big thanks to Infactum for this wonderful bridge

This is for those wishing to use tg2sip on AARCH64 platforms like AWS or Oracle Cloud (where you can get a 4 core 24 GB RAM ARM instance in the always free tier). May also be applicable to other ARM platforms.

  1. pjproject will not compile with webrtc and will throw an error that emmintrin.h is not available. This is due to sse2 not being available on ARM. You can use sse2neon.h from https://github.com/DLTcollab/sse2neon and replace #include <emmintrin.h> accordingly in aec_core_sse2.c and aec_rdft_sse2.c
  2. During final build there will be an error that target machine, endianess etc is not defined. This is due to lack of 'aarch64' recognition. You could modify final else construct like so in config.h for pj
#else
#   define PJ_HAS_PENTIUM	0
#   define PJ_IS_LITTLE_ENDIAN	1
#   define PJ_IS_BIG_ENDIAN	0
#   define PJ_M_ARM7		1
#   define PJ_M_NAME		"armv7"
#endif

Build will succeed after these changes.
Have attached working binaries compiled on Ubuntu 20.04 AARCH64

tg2sipAARCH64Ubuntu20.zip

@xhemp
Copy link

xhemp commented May 7, 2022

@IchthysMaranathaCopy Just wondering if you managed to compile with the new tdlib? I am having no luck with that. Thanks!

@IchthysMaranatha
Copy link

IchthysMaranatha commented May 9, 2022

I didn't have any problems compiling the latest tg2sip with tdlib 1.7.10
Just make sure you download the correct commit level code for tdlib, apply the patches (I looked at the patch files in buildenv and made the changes manually) and build tdlib followed by the new tg2sip
https://github.com/tdlib/td/tree/a53cb30e99f937cfd64e0266fa558785a184a553

@xhemp
Copy link

xhemp commented May 9, 2022

I've tried to compile it and it fails at 97% when compiling sip2tg:


#0 3105.6 In file included from /tg2sip/tg2sip/main.cpp:23:
#0 3105.6 /tg2sip/tg2sip/queue.h:36:18: error: 'std::optional' has not been declared
#0 3105.6    36 |     void emplace(std::optional<T> &&value) {

I have been trying to workaround it but not been able to.
If you are able to post your binaries that would be great.
Thanks!

@IchthysMaranatha
Copy link

No problem, have attached binaries
tg2siptdlib1.7.10Ubuntu20AARCH64.zip

@xhemp
Copy link

xhemp commented May 9, 2022

Working perfectly here, @IchthysMaranatha , appreciate the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants