Trying to compile the code with ARM into the arm.
- Downloaded the code and installed below,
$sudo apt-get install libssl-dev
$sudo apt-get install libcurl4-openssl-dev
$sudo apt-get install lib32z1-dev
- installed "arm-linux-gnueabi" via apt-get in ubuntu
- changed the Makefile with cross compile as,
CROSS_COMPILER ?= arm-linux-gnueabi-gcc
- make
Observed as below,
s.o src/test/test_module_1.o src/test/test_module_2.o src/test/test_module_3.o -L/usr/local/lib -lcurl -lpthread -lcrypto -lssl -lz
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/lib/libcurl.so when searching for -lcurl
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/lib/libcurl.a when searching for -lcurl
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/lib/libcurl.so when searching for -lcurl
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /usr/local/lib/libcurl.a when searching for -lcurl
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: cannot find -lcurl
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: cannot find -lcrypto
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: cannot find -lssl
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: cannot find -lz
PLease let me know how to cross compile
FYI,
root@ubuntu-virtual-machine:/home/ubuntu/Desktop/curl/arm_curl/curl-7.68.0# dpkg --print-foreign-architectures
i386
aarch64
arm64
root@ubuntu-virtual-machine:/home/ubuntu/Desktop/curl/arm_curl/curl-7.68.0# dpkg --print-architecture
amd64
root@ubuntu-virtual-machine:/home/ubuntu/Desktop/curl/arm_curl/curl-7.68.0# dpkg --add-architecture arm64
pkg-config-dpkghook: warning: Architecture aarch64 not defined in architecture tables, ignored
Below is the output,
Fetched 593 kB in 18s (32.4 kB/s)
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-aarch64/Packages' as repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'restricted/binary-aarch64/Packages' as repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'universe/binary-aarch64/Packages' as repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'multiverse/binary-aarch64/Packages' as repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'main/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal-updates InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'restricted/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal-updates InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'universe/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal-updates InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'multiverse/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal-updates InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'main/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal-backports InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'restricted/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal-backports InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'universe/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal-backports InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'multiverse/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal-backports InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'main/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'restricted/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'universe/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal InRelease' doesn't support architecture 'aarch64'
N: Skipping acquire of configured file 'multiverse/binary-aarch64/Packages' as repository 'http://us.archive.ubuntu.com/ubuntu focal InRelease' doesn't support architecture 'aarch64'
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/main/binary-arm64/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-backports/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.39 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
please let me know how to resolve