Open renjiangithub opened 5 months ago
local cross compile: example openssl version: 1.1.1b
...
aarch64-linux-gnu-gcc: error: unrecognized command line option '-m64'
make[1]: *** [Makefile:706: apps/app_rand.o] Error 1
...
before make, modify Makefile:
success!
the question is: how could I modify "-m64" config in my conanfile.py
from conan import ConanFile
from conan.tools.cmake import cmake_layout
class ExampleRecipe(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps", "CMakeToolchain"
def requirements(self):
self.requires("openssl/3.2.1")
def layout(self):
cmake_layout(self)
-m64 is only valid for x86_64 processors, not arm64 processors.
For a workaround, see what @jakubablenski did here: https://github.com/conan-io/conan-center-index/issues/24122
Essentially: sudo apt install g++-[DESIRED_VERSION]-aarch64-linux-gnu
, then edit CC/CXX/LD in your [buildenv]
. Not sure if it works using only tools.build:compiler_executables
.
Hi @renjiangithub thanks for reporting this.
Could you paste the full build log rather than just the last bit?
Thanks!
Description
something wrong when cross compile openssl/3.2.1
Package and Environment Details
Conan profile
Profile host:
[settings] arch=armv8 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 os=Linux [buildenv] CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ LD=aarch64-linux-gnu-g++
Profile build:
[settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 os=Linux
Steps to reproduce
conan install . -pr:h ./conan_profile_armv8 --output-folder=build/ --build=missing
[buildenv] CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ LD=aarch64-linux-gnu-g++
collect2: error: ld returned 1 exit status make[1]: [Makefile:16783: util/quicserver] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: Leaving directory '/home/rj/.conan2/p/b/opensb47f52b2ef06b/b/src' make: *** [Makefile:2528: build_sw] Error 2
openssl/3.2.1: ERROR: Package '0ce40603a51fa36ffbb7ef57313eb02f09e72249' build failed openssl/3.2.1: WARN: Build folder /home/rj/.conan2/p/b/opensb47f52b2ef06b/b/build-release ERROR: openssl/3.2.1: Error in build() method, line 533 self._make() while calling '_make', line 525 self._run_make() while calling '_run_make', line 502 self.run(" ".join(command), env="conanbuild") ConanException: Error 2 while executing