You are here

Error of Rosetta 3.13 compilation on aarch64 processor

5 posts / 0 new
Last post
Error of Rosetta 3.13 compilation on aarch64 processor
#1

Hi, 

I'm trying to compile rosetta w/ scons by hacking the tools/build/setup_platforms.py, tools/build/basic.settings and tools/build/options.settings.

#tools/build/setup_platforms.py:162
def select_arch(supported, os, requested, expected = None):
    """Figure out which processor is being run on.

    Caveats:
    - There is currently no way to distinguish Intel x86 from AMD x86.
    - It's not clear if uname() can tell if a platform is 64-bit.
"""

    processor_translation = {
        # Results from platform.processor()
        "i386": "x86",
        "i486": "x86",
        "i586": "x86",
        "i686" : "x86",
        "x86_64" : "x86",
        "ppc64" : "ppc64",
        "powerpc" : "ppc",
        # Added by Yinying for aarch64 testing
        "aarch64": "aarch64",
        # Results from os.uname()['machine']
        # This isn't strictly true.  But we are not currently distinguishing
        # between AMD and Intel processors.
        "athlon" : "x86",
        "Power Macintosh" : "ppc",


#tools/build/setup_platforms.py:220

def select_arch_size(supported, os, arch, requested):
    """Figure out the bit-width of the current processor architecture.
There's no obvious portable way to do this.  By default
just assume the requested size is correct.
"""
    actual = _get_arch_size()
    print(f"fetch actual_size={actual}")
    actual = {
        "32bit" : "32",
        "64bit" : "64",
        # Added by Yinying for aarch64 testing
        "aarch64": "64",
        "arm64": "64",
        "arm": "32",
        # XXX: We are guessing here.  This may prove incorrect
        "i386" : "32",
        "i486" : "32",
        "i586" : "32",
        "i686" : "32",
        # XXX: What do 64 bit Macs show?
        "Power Macintosh" : "32",
    }.get(actual, "<unknown>")

and 

# tools/build/basic.settings:978
# added by Yinying for aarch64 cross-compilation
    "gcc, x86, debug_aarch" : {
        "appends" : {
            "flags" : {
                # Hisilicon march: https://www.hisilicon.com/cn/products/Kunpeng/Huawei-Kunpeng/Huawei-Kunpeng-920
                # mturn: https://support.huaweicloud.com/prtg-kunpenghpcs/kunpengmafft_02_0007.html
                # aarch64 default setting: https://blog.csdn.net/xclshwd/article/details/90713747
                "compile" : [
                    "march=armv8.2-a",
                    "mtune=tsv110",

                ],

            },
        },
        "overrides" : {
                    "cc"            : '/path/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc',
                    "cxx"           : '/path/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++',
                    "link"            : '/path/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ld',
                },

        "removes" : {
            "flags" : {
                "compile" : [
                   "march=core2",
                   "mtune=generic",
                   "malign-double",
                   "march=pentium4",
                   "march=athlon",
                   "mtune=itanium2"
                ],
            },
        },
    },

for options.settings I simply added aarch64-none-linux-gnu-gcc and aarch64 into cxx and arch, together w/ debug_aarch as a mode for cross-compilation.

after that the compilation started by the following command as a test.

./scons.py -j 30 mode=debug_aarch 

the error occurs:

/path/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc -o build/external/debug_aarch/linux/3.10/64/x86/gcc/8.5/default/libxml2/trio.os -c -std=c99 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -pipe -Wno-long-long -Wno-strict-aliasing -march=armv8.2-a -mtune=tsv110 -DTRIO_HAVE_CONFIG_H -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -Iexternal/include external/libxml2/trio.c

.......

external/libxml2/triostr.c: In function 'trio_equal':
external/libxml2/trio.c: In function 'trio_printfv':
external/libxml2/triostr.c:411:20: warning: implicit declaration of function 'strcasecmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
  411 |       return (0 == strcasecmp(first, second));
      |                    ^~~~~~~~~~
      |                    strncmp
external/libxml2/triostr.c: In function 'trio_equal_max':
external/libxml2/triostr.c:534:20: warning: implicit declaration of function 'strncasecmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
  534 |       return (0 == strncasecmp(first, second, max));
      |                    ^~~~~~~~~~~
      |                    strncmp
external/libxml2/trio.c:3699:59: error: incompatible type for argument 5 of 'TrioFormat'
 3699 |   return TrioFormat(stdout, 0, TrioOutStreamFile, format, NULL, args);
      |                                                           ^~~~
      |                                                           |
      |                                                           void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:3435:22: note: expected 'va_list' but argument is of type 'void *'
 3435 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_fprintfv':
external/libxml2/trio.c:3772:57: error: incompatible type for argument 5 of 'TrioFormat'
 3772 |   return TrioFormat(file, 0, TrioOutStreamFile, format, NULL, args);
      |                                                         ^~~~
      |                                                         |
      |                                                         void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:3435:22: note: expected 'va_list' but argument is of type 'void *'
 3435 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_dprintfv':
external/libxml2/trio.c:3842:66: error: incompatible type for argument 5 of 'TrioFormat'
 3842 |   return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, NULL, args);
      |                                                                  ^~~~
      |                                                                  |
      |                                                                  void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:3435:22: note: expected 'va_list' but argument is of type 'void *'
 3435 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_cprintfv':
external/libxml2/trio.c:3904:60: error: incompatible type for argument 5 of 'TrioFormat'
 3904 |   return TrioFormat(&data, 0, TrioOutStreamCustom, format, NULL, args);
      |                                                            ^~~~
      |                                                            |
      |                                                            void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:3435:22: note: expected 'va_list' but argument is of type 'void *'
 3435 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_sprintfv':
external/libxml2/trio.c:3984:64: error: incompatible type for argument 5 of 'TrioFormat'
 3984 |   status = TrioFormat(&buffer, 0, TrioOutStreamString, format, NULL, args);
      |                                                                ^~~~
      |                                                                |
      |                                                                void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:3435:22: note: expected 'va_list' but argument is of type 'void *'
 3435 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_snprintfv':
external/libxml2/trio.c:4077:41: error: incompatible type for argument 5 of 'TrioFormat'
 4077 |         TrioOutStreamStringMax, format, NULL, args);
      |                                         ^~~~
      |                                         |
      |                                         void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:3435:22: note: expected 'va_list' but argument is of type 'void *'
 3435 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_printv_ref':
external/libxml2/trio.c:4985:57: error: incompatible type for argument 3 of 'TrioFormatRef'
 4985 |   return TrioFormatRef((trio_reference_t *)ref, format, NULL, argarray);
      |                                                         ^~~~
      |                                                         |
      |                                                         void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:3407:22: note: expected 'va_list' but argument is of type 'void *'
 3407 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:170:46: note: in definition of macro 'TRIO_ARGS4'
  170 | # define TRIO_ARGS4(list,a1,a2,a3,a4) (a1,a2,a3,a4)
      |                                              ^~
external/libxml2/trio.c: In function 'trio_scanfv':
external/libxml2/trio.c:6643:13: error: incompatible type for argument 5 of 'TrioScan'
 6643 |     format, NULL, args);
      |             ^~~~
      |             |
      |             void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:6397:22: note: expected 'va_list' but argument is of type 'void *'
 6397 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_fscanfv':
external/libxml2/trio.c:6697:13: error: incompatible type for argument 5 of 'TrioScan'
 6697 |     format, NULL, args);
      |             ^~~~
      |             |
      |             void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:6397:22: note: expected 'va_list' but argument is of type 'void *'
 6397 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_dscanfv':
external/libxml2/trio.c:6748:13: error: incompatible type for argument 5 of 'TrioScan'
 6748 |     format, NULL, args);
      |             ^~~~
      |             |
      |             void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:6397:22: note: expected 'va_list' but argument is of type 'void *'
 6397 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_cscanfv':
external/libxml2/trio.c:6810:57: error: incompatible type for argument 5 of 'TrioScan'
 6810 |   return TrioScan(&data, 0, TrioInStreamCustom, format, NULL, args);
      |                                                         ^~~~
      |                                                         |
      |                                                         void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:6397:22: note: expected 'va_list' but argument is of type 'void *'
 6397 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
external/libxml2/trio.c: In function 'trio_sscanfv':
external/libxml2/trio.c:6864:13: error: incompatible type for argument 5 of 'TrioScan'
 6864 |     format, NULL, args);
      |             ^~~~
      |             |
      |             void *
In file included from external/libxml2/trio.c:47:
external/libxml2/trio.c:6397:22: note: expected 'va_list' but argument is of type 'void *'
 6397 |     TRIO_VA_LIST_PTR arglist,
      |                      ^
external/libxml2/triodef.h:172:58: note: in definition of macro 'TRIO_ARGS6'
  172 | # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
      |                                                          ^~
......
scons: *** [build/external/debug_aarch/linux/3.10/64/x86/gcc/8.5/default/libxml2/trio.os] Error 1
scons: building terminated because of errors.

I am new one on ARM arch and cross-compilation but we need to migrate the rosetta to new cluster w/ aarch chips.

Can anyone help me with this issue? Thanks!

Category: 
Post Situation: 
Mon, 2022-02-28 00:59
Yinying

Recent versions of Rosetta (the weekly releases, at least - perhaps not 3.13) should be set up to compile properly on the Apply M1 ARM-based Macs. I don't know how much change there is for that versus your particular aarch64 cluster. (Which specific machines is the cluster running?)

The specific errors that you're getting look to be related to the C/C++ standard library you're using. In particular, the `strcasecmp()` is a POSIX function. Throwing an error on that function indicates that you may not have full POSIX support on the platform you're compiling for. Do you know if that's the case? There might be compiler settings you may need to change.

The other errors are in the external libxml2 library. I don't have enough experience with that to say for certain, but you might be able to change source/external/libxml2/config.h to delete the line `#define VA_LIST_IS_ARRAY 1`. That may make those other issues go away. (It also may break things even further.)

Mon, 2022-02-28 09:00
rmoretti

Thank you very much! 

According to the Rosetta release note, 3.13 has native support to Apple M1, but only 32 bit (following the official instruction) version 99% passed the unit tests. After hacking build/setup_platforms.py as following, the building step of 64bit version works perfectly and running rosetta_scripts.default.macosclangrelease will get an echo of blank  RosettaScripts, but nearly 2/3 unit tests failed.  That is quite a long story. 

source/tools/build/setup_platforms.py:238

            # Yinying edited here for arm64 testing of Apple Silicon M1 series
            # if "hw.optional.x86_64: 1\n" in sysctlhwlines:
            if "hw.optional.x86_64: 1\n" in sysctlhwlines or "hw.optional.arm64: 1\n" in sysctlhwlines:
                # only x86_64 Macs default to building 64-bit binaries
                actual = "64"

The aarch64 cluster is based on Hisilicon Kunpeng-920 w/ architecture ARM v8.2 and running CentOS 7.6. You may find more from links in the code box of the first post.

$ uname -a
Linux armadmin 4.14.0-115.el7a.0.1.aarch64 #1 SMP Sun Nov 25 20:54:21 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

$ lsb_release -a
LSB Version:	:core-4.1-aarch64:core-4.1-noarch:cxx-4.1-aarch64:cxx-4.1-noarch:desktop-4.1-aarch64:desktop-4.1-noarch:languages-4.1-aarch64:languages-4.1-noarch:printing-4.1-aarch64:printing-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.6.1810 (AltArch)
Release:	7.6.1810
Codename:	AltArch

$ cat  /proc/cpuinfo
processor	: 0
BogoMIPS	: 200.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop
CPU implementer	: 0x48
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd01
CPU revision	: 0
....

 

Yes I checked our public gcc  w/ gcc -v command, it looks like POSIX is supported.

$ /home/software/env01-arm64/bin/aarch64-conda-linux-gnu-gcc -v
Reading specs from /home/software/env01-arm64/bin/../lib/gcc/aarch64-conda-linux-gnu/9.3.0/specs
COLLECT_GCC=/home/software/env01-arm64/bin/aarch64-conda-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/software/env01-arm64/bin/../libexec/gcc/aarch64-conda-linux-gnu/9.3.0/lto-wrapper
Target: aarch64-conda-linux-gnu
Configured with: /drone/src/build_artifacts/ctng-compilers_1601684153866/work/.build/aarch64-conda-linux-gnu/src/gcc/configure --build=aarch64-build_unknown-linux-gnu --host=aarch64-build_unknown-linux-gnu --target=aarch64-conda-linux-gnu --prefix=/drone/src/build_artifacts/ctng-compilers_1601684153866/work/gcc_built --with-sysroot=/drone/src/build_artifacts/ctng-compilers_1601684153866/work/gcc_built/aarch64-conda-linux-gnu/sysroot --enable-languages=c,c++,fortran,objc,obj-c++ --with-pkgversion='crosstool-NG 1.24.0.133_b0863d8_dirty' --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libsanitizer --disable-libmpx --with-gmp=/drone/src/build_artifacts/ctng-compilers_1601684153866/work/.build/aarch64-conda-linux-gnu/buildtools --with-mpfr=/drone/src/build_artifacts/ctng-compilers_1601684153866/work/.build/aarch64-conda-linux-gnu/buildtools --with-mpc=/drone/src/build_artifacts/ctng-compilers_1601684153866/work/.build/aarch64-conda-linux-gnu/buildtools --with-isl=/drone/src/build_artifacts/ctng-compilers_1601684153866/work/.build/aarch64-conda-linux-gnu/buildtools --enable-lto --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/drone/src/build_artifacts/ctng-compilers_1601684153866/work/gcc_built/aarch64-conda-linux-gnu/sysroot --enable-long-long --enable-default-pie
Thread model: posix
gcc version 9.3.0 (crosstool-NG 1.24.0.133_b0863d8_dirty)

 

Because it is a warn instead of error, i just ignore the warning.

For the libxml2 error I modified the code following your kind instruction, the compilation was slowly running and died bcs libstdc++.so is incompatible for somehow.

In the other hand, I found a specific clang LLVM suite named "Bisheng" provided by the chip vendor for native compilation in aarch64.

tools/build/basic.settings:2311

    # bisheng clang
    # doc https://support.huaweicloud.com/ug-bisheng-kunpengdevps/kunpengbisheng_06_0001.html
    # doc pdf https://support.huaweicloud.com/ug-bisheng-kunpengdevps/ug-bisheng-kunpengdevps.pdf
    # libatomic.so.1 is required
    # https://support.huaweicloud.com/ug-bisheng-kunpengdevps/kunpengbisheng_06_0070.html
    "clang, linux, aarch64": {
        "appends": {
            "flags": {
                "compile" : [
                    "march=armv8.2-a",
                    "mtune=tsv110",
                    "I/public/software/env01-arm64/include/",
                    "L/public/software/env01-arm64/lib/",
                    "latomic",
                    "L/path/bisheng/bisheng-compiler-2.1.0-aarch64-linux/lib/",
                ],
            },
        },
        "removes" : {
            "flags" : {
                "compile" : [
                   "march=core2",
                   "mtune=generic",
                   "malign-double",
                   "march=pentium4",
                   "march=athlon",
                   "mtune=itanium2"
                ],
            },
        },

    },

 

I have to say this weird because the atomic lib is missing during every scons building. but when i run the command output by scons i works. acturally libatomic.so.1 is located in  our public lib path /public/software/env01-arm64/lib/ and i have tried put that path into LD_LIBRARY_PATH or basic.settings but it doesnt work at all.

$ ~/rosetta_src/main/source  ./scons.py -j 10  mode=release cxx=clang
scons: Reading SConscript files ...
compiler: clang
compiler_command: clang++
BiSheng is detected.
os: linux
actual: aarch64
actual: aarch64
fetch actual_size=64bit
translate actual_size=64
Running versioning script ... Release package detected, using rosetta/main/.release.json to acquire version information...
Done. (0.0 seconds)
Number of option files updated: 0
Total 4609 options.
Finished updating ResidueProperty code
-- no changes needed
Finished updating VariantType code
-- no changes needed
scons: done reading SConscript files.
scons: Building targets ...
clang++ -o build/external/release/linux/4.14/64/aarch64/clang/12.0/default/dummy_zlib.os -c -std=c++11 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -Wno-long-long -Wno-strict-aliasing -O3 -Wno-unused-variable -Wno-unused-parameter -march=armv8.2-a -mtune=tsv110 -I/public/software/env01-arm64/include/ -L/public/software/env01-arm64/lib/ -latomic -L/home/yaoyinying/software_arm/bin/bisheng/bisheng-compiler-2.1.0-aarch64-linux/lib/ -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -Iexternal/include external/dummy.cc
clang++: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
......
scons: building terminated because of errors.

###### There's not output file.
$ ~/rosetta_src/main/source  2  ls build/external/release/linux/4.14/64/aarch64/clang/12.0/default
cifparse  dbio  libxml2

###### Run the command printed by scons in comsole.
$ ~/rosetta_src/main/source  130  clang++ -o build/external/release/linux/4.14/64/aarch64/clang/12.0/default/dummy_zlib.os -c -std=c++11 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -Wno-long-long -Wno-strict-aliasing -O3 -Wno-unused-variable -Wno-unused-parameter -march=armv8.2-a -mtune=tsv110 -I/public/software/env01-arm64/include/ -L/public/software/env01-arm64/lib/ -latomic -L/home/yaoyinying/software_arm/bin/bisheng/bisheng-compiler-2.1.0-aarch64-linux/lib/ -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -Iexternal/include external/dummy.cc

###### The output just appears!
$ ~/rosetta_src/main/source  ls build/external/release/linux/4.14/64/aarch64/clang/12.0/default
cifparse  dbio  dummy_zlib.os  libxml2

I'm not familiar w/ Scons but its so funny. 

 

UPDATE:

this path issue is temporally solved by:

"overrides" : {
                    "cc": 'LD_LIBRARY_PATH=/home/software/env01-arm64/lib:$LD_LIBRARY_PATH /path/bisheng/bisheng-compiler-2.1.0-aarch64-linux/bin/clang',
                    "cxx": 'LD_LIBRARY_PATH=/home/software/env01-arm64/lib:$LD_LIBRARY_PATH /path/bisheng/bisheng-compiler-2.1.0-aarch64-linux/bin/clang++',
                    "link": 'LD_LIBRARY_PATH=/home/software/env01-arm64/lib:$LD_LIBRARY_PATH /path/bisheng/bisheng-compiler-2.1.0-aarch64-linux/bin/lld',
             },

 

Wed, 2022-03-02 08:39
Yinying

By default Scons ignores externally set environment variables. (This is an attempt to make the build process more reproducible.)

To adjust this, you'll need to edit the site.settings or user.settings files. I'd recommend taking a look at source/tools/build/site.settings By default the release version should copy over many of the important environment paths, but it may help to uncomment the `"ENV" : os.environ,` line. That might be my suggested first step to debug such "it works on the command line, but not when I run scons" issues.

Wed, 2022-03-02 13:57
rmoretti

Thanks a lot! it finally works! 

It looks like rosetta is ready for aarch64!

-------- Unit test summary --------
Total number of tests: 4441
  number tests passed: 4422
  number tests failed: 19
  failed tests:
    protocols.test: StructureDataTests:test_non_peptidic_bonds
    protocols.test: AlignResiduesMoverTests:test_tomponent_cstfile
    protocols.test: StructureDataTests:test_slice
    protocols.test: GenericSimulatedAnnealerTests:test_checkpointing
    protocols.test: StructureDataTests:test_enzdes_remarks
    protocols.test: QueryDatabaseTests:test_pair_query
    protocols.test: AlignResiduesMoverTests:test_align_theozyme
    protocols.test: GenericSimulatedAnnealerTests:test_acceptance
    protocols.test: GenericSimulatedAnnealerTests:test_boltzmann
    protocols.test: StructureDataTests:test_move_segments
    protocols.test: StructureDataTests:test_delete_segment
    core.test: conformation_stored_restypes_tests:test_min_restype_noset
    core.test: conformation_stored_restypes_tests:test_load_restype_conf
    core.test: conformation_stored_restypes_tests:test_load_pdb
    core.test: conformation_stored_restypes_tests:test_score_restype_noset
    core.test: conformation_stored_restypes_tests:test_cartmin_restype_noset
    core.test: conformation_stored_restypes_tests:test_serialization
    core.test: conformation_stored_restypes_tests:test_load_pdb_with_pose_copy
    core.test: conformation_stored_restypes_tests:test_pack_restype_noset
Success rate: 99.57216843053367%
---------- End of Unit test summary
Done!

 

Thu, 2022-03-03 01:10
Yinying