helium / packet-forwarder-test

Apache License 2.0
6 stars 6 forks source link

Where can I find the dependency libs for packet-forwarder-test? #9

Open andrewintw opened 3 years ago

andrewintw commented 3 years ago

I use the following command to do cross-compile.

$ cross build -v --target armv5te-unknown-linux-gnueabi --release

After finish the build process, I got two binaries rf-tester and sx13xx-conf at target/armv5te-unknown-linux-gnueabi/release/.

$ file target/armv5te-unknown-linux-gnueabi/release/rf-tester
target/armv5te-unknown-linux-gnueabi/release/rf-tester: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=ebffd8069e76a2c5ec872fbe453971e4d5647228, with debug_info, not stripped

The problem is it cannot run on my target platform. I guess I need to copy the dependency libs from cross-build environment.

Where can I find the dependency libs for packet-forwarder-test?

lthiery commented 3 years ago

Could you run the program on amd64 and connect to it with the packet forwarder instead?

andrewintw commented 3 years ago

Could you run the program on amd64 and connect to it with the packet forwarder instead?

My target device is armv5te (ARM 32 bit). Do you means the test tool is not for the target device?

browanofficial commented 3 years ago

@madninja @lthiery Hi Sir, As Andrew mentioned, our device is armv5te. Do you have any ideas?

We already ported gateway-rs and gateway-mfr-rs with NO issues. Please help us to fix the dependency issue for packet-forwarder-test. Thanks a lot.

lthiery commented 3 years ago

@browanofficial I already mentioned to @andrewintw that I think it's easier to just run this on an amd64 system and connect the packet forwarder to the amd64 system.

My target device is armv5te (ARM 32 bit). Do you means the test tool is not for the target device?

You can test your target device by simply configuring packet forwarder to connect the amd64 system running the rf-tester. For example, on a local amd64 machine with IP 192.168.1.8, start the tester. Then on your armv5te system, edit global_conf.json:

"gateway_conf": {
        "server_address": "192.168.1.8",
        "serv_port_up": 1680,
        "serv_port_down": 1680,
        ...
}

Now the packet forwarder can connect to your amd64 system to run the rf-tester.

If you absolutely want to debug the cross-compilation, I need more detail:

The problem is it cannot run on my target platform.

Why can it not run? What's happening? What's the output?

andrewintw commented 3 years ago

@browanofficial I already mentioned to @andrewintw that I think it's easier to just run this on an amd64 system and connect the packet forwarder to the amd64 system.

My target device is armv5te (ARM 32 bit). Do you means the test tool is not for the target device?

You can test your target device by simply configuring packet forwarder to connect the amd64 system running the rf-tester. For example, on a local amd64 machine with IP 192.168.1.8, start the tester. Then on your armv5te system, edit global_conf.json:

"gateway_conf": {
        "server_address": "192.168.1.8",
        "serv_port_up": 1680,
        "serv_port_down": 1680,
        ...
}

Now the packet forwarder can connect to your amd64 system to run the rf-tester.

If you absolutely want to debug the cross-compilation, I need more detail:

The problem is it cannot run on my target platform.

Why can it not run? What's happening? What's the output?

The cross-compilation is ok. I got rf-tester in the target/armv5te-unknown-linux-gnueabi/release/.

The problem is rf-tester is a dynamic linking binary. I cannot run the rf-tester in my target device without copy all of the dependency libs. so I would like to know how can I get the dependency libs?

andrewintw commented 3 years ago

Another way is try to use static-linking in build procedure.

I had try the way on other helium tools, such as gateway-rs, gateway-mfr-rs and it works.

But when I try to use static-linking in packet-forwarder-test, it failed.

Here is what I did and the full build log.

env setup:

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ cargo install cargo-make
$ cargo install cross
$ sudo apt update && sudo apt install -y docker.io && sudo usermod -aG docker $USER

change the rustflags:

$ git clone https://github.com/helium/packet-forwarder-test.git
$ cd packet-forwarder-test/
$ vi .cargo/config.toml 

[target.armv5te-unknown-linux-gnueabi]
rustflags  = [
    "-C", "target-feature=+crt-static",
    "-C", "link-args=-static",
]

[term]
verbose = true

then use cross command:

vagrant@ubuntu-18:~/packet-forwarder-test$ cross build -v --target armv5te-unknown-linux-gnueabi --release
+ "rustc" "--print" "sysroot"
+ "rustup" "toolchain" "list"
+ "rustup" "target" "list" "--toolchain" "stable-x86_64-unknown-linux-gnu"
+ "rustup" "component" "list" "--toolchain" "stable-x86_64-unknown-linux-gnu"
+ "/usr/bin/docker" "run" "--userns" "host" "-e" "PKG_CONFIG_ALLOW_CROSS=1" "--rm" "--user" "1000:1000" "-e" "XARGO_HOME=/xargo" "-e" "CARGO_HOME=/cargo" "-e" "CARGO_TARGET_DIR=/target" "-e" "USER=vagrant" "-e" "CROSS_RUNNER=" "-v" "/home/vagrant/.xargo:/xargo:Z" "-v" "/home/vagrant/.cargo:/cargo:Z" "-v" "/cargo/bin" "-v" "/home/vagrant/packet-forwarder-test:/project:Z" "-v" "/home/vagrant/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/rust:Z,ro" "-v" "/home/vagrant/packet-forwarder-test/target:/target:Z" "-w" "/project" "-i" "-t" "rustembedded/cross:armv5te-unknown-linux-gnueabi-0.2.1" "sh" "-c" "PATH=$PATH:/rust/bin cargo build -v --target armv5te-unknown-linux-gnueabi --release"
       Fresh unicode-xid v0.2.1
       Fresh version_check v0.9.2
       Fresh unicode-segmentation v1.7.1
       Fresh slab v0.4.2
       Fresh cfg-if v0.1.10
       Fresh cfg-if v1.0.0
       Fresh once_cell v1.5.2
       Fresh futures-sink v0.3.12
       Fresh unicode-width v0.1.8
       Fresh futures-core v0.3.12
       Fresh lazy_static v1.4.0
       Fresh pin-utils v0.1.0
       Fresh vec_map v0.8.2
       Fresh pin-project-lite v0.2.4
       Fresh strsim v0.8.0
       Fresh futures-io v0.3.12
       Fresh ppv-lite86 v0.2.10
       Fresh itoa v0.4.6
       Fresh ansi_term v0.11.0
       Fresh strum v0.20.0
       Fresh bytes v0.5.6
       Fresh fnv v1.0.7
       Fresh pin-project-lite v0.1.11
       Fresh arrayref v0.3.6
       Fresh base64 v0.12.3
       Fresh heck v0.3.2
       Fresh futures-task v0.3.12
       Fresh textwrap v0.11.0
       Fresh futures-channel v0.3.12
       Fresh proc-macro2 v1.0.24
       Fresh libc v0.2.81
       Fresh proc-macro-hack v0.5.19
       Fresh bitflags v1.2.1
       Fresh ryu v1.0.5
       Fresh log v0.4.13
       Fresh memchr v2.3.4
       Fresh proc-macro-nested v0.1.7
       Fresh quote v1.0.7
       Fresh getrandom v0.1.16
       Fresh net2 v0.2.37
       Fresh iovec v0.1.4
       Fresh atty v0.2.14
       Fresh num_cpus v1.13.0
       Fresh syn v1.0.51
       Fresh proc-macro-error-attr v1.0.4
       Fresh rand_core v0.5.1
       Fresh mio v0.6.23
       Fresh clap v2.33.3
       Fresh serde_derive v1.0.117
       Fresh futures-macro v0.3.12
       Fresh derivative v2.1.3
       Fresh tokio-macros v0.2.6
       Fresh strum_macros v0.20.1
       Fresh proc-macro-error v1.0.4
       Fresh rand_chacha v0.2.2
       Fresh serde v1.0.117
       Fresh futures-util v0.3.12
       Fresh tokio v0.2.24
       Fresh regions v0.1.2-alpha.0 (/project/regions)
       Fresh structopt-derive v0.4.14
       Fresh rand v0.7.3
       Fresh toml v0.5.8
       Fresh serde_json v1.0.59
       Fresh futures-executor v0.3.12
       Fresh structopt v0.3.21
       Fresh proc-macro-crate v0.1.5
       Fresh futures v0.3.12
       Fresh sx13xx-conf v0.1.2-alpha.0 (/project/sx13xx-conf)
       Fresh num_enum_derive v0.4.3
       Fresh num_enum v0.4.3
       Fresh semtech-udp v0.4.1
   Compiling rf-tester v0.1.2-alpha.0 (/project/rf-tester)
     Running `rustc --crate-name rf_tester --edition=2018 rf-tester/src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=4ea254c6e69140ad -C extra-filename=-4ea254c6e69140ad --out-dir /target/armv5te-unknown-linux-gnueabi/release/deps --target armv5te-unknown-linux-gnueabi -C linker=arm-linux-gnueabi-gcc -L dependency=/target/armv5te-unknown-linux-gnueabi/release/deps -L dependency=/target/release/deps --extern base64=/target/armv5te-unknown-linux-gnueabi/release/deps/libbase64-0a1de53dc600d9a3.rlib --extern futures=/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures-7ce800c66024fac1.rlib --extern regions=/target/armv5te-unknown-linux-gnueabi/release/deps/libregions-d76127f4d8e6acd0.rlib --extern semtech_udp=/target/armv5te-unknown-linux-gnueabi/release/deps/libsemtech_udp-c0fd03d20079c8ef.rlib --extern structopt=/target/armv5te-unknown-linux-gnueabi/release/deps/libstructopt-01571a001e854017.rlib --extern tokio=/target/armv5te-unknown-linux-gnueabi/release/deps/libtokio-ae7d7c0da13fdbea.rlib -C target-feature=+crt-static -C link-args=-static`
error: linking with `arm-linux-gnueabi-gcc` failed: exit status: 1
  |
  = note: "arm-linux-gnueabi-gcc" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.0.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.1.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.10.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.11.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.12.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.13.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.14.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.15.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.2.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.3.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.4.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.5.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.6.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.7.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.8.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.rf_tester.7yno7vdf-cgu.9.rcgu.o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad.4ds6sz2ygxmn34x1.rcgu.o" "-Wl,--as-needed" "-L" "/target/armv5te-unknown-linux-gnueabi/release/deps" "-L" "/target/release/deps" "-L" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib" "-Wl,-Bstatic" "/target/armv5te-unknown-linux-gnueabi/release/deps/libbase64-0a1de53dc600d9a3.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libstructopt-01571a001e854017.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/liblazy_static-b499e12aa5c60328.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libclap-daac1f728c3e4233.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libvec_map-7ce8bbd82864d62b.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libtextwrap-459f1701c5c5bef0.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libunicode_width-784b2fc518da9e8f.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libstrsim-01f5a3d83a3a3218.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libbitflags-ba8b284676b4dbda.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libatty-7ef852a723b48c78.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libansi_term-3f5c056710f6ff05.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libsemtech_udp-c0fd03d20079c8ef.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libserde_json-4904e8ac0b68a3ff.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libryu-6ee50ea16d699009.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libitoa-a6688eb38eb2e6fd.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/librand-e5751b1d3b26a326.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/librand_chacha-39e30073b643ab1f.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libppv_lite86-e03b95d8fc16dd83.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/librand_core-1a716ded4f05c177.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libgetrandom-ea694c29346ff86c.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libcfg_if-6ebf686b2896d5c7.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libtokio-ae7d7c0da13fdbea.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libnum_cpus-d54c6b0bd5776c69.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfnv-f6090463932a3214.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libmio-b5ad027561557729.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/liblog-b8e9a57c3fb2b7ce.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libiovec-c524ace1a7249fc6.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libnet2-ae0c338745ad4e28.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libcfg_if-89080538f2768a35.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/liblibc-6b090af110529bff.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libbytes-7e29fa902a420ba7.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libpin_project_lite-50daefc326c1c414.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libserde-348a899bb2d0d03e.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libnum_enum-a48e222f466a08c3.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libarrayref-c160c20ee001bd3f.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libregions-d76127f4d8e6acd0.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libstrum-cff579746b04bb79.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures-7ce800c66024fac1.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures_executor-71392aea50ac251f.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures_util-b5b19e19ed3dba42.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libmemchr-63ba77a12235cb47.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures_io-60c6f544f204d53d.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libslab-9996516360ede92c.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures_channel-8273b7ca675a6856.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libpin_project_lite-f1f41ade2a8cfcc9.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures_sink-9717ef2307e2de21.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures_task-7e0aafcfed4e8b9b.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libonce_cell-3782d44c5cfc5c7a.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libpin_utils-0675b712543e4bed.rlib" "/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures_core-7ac63ad9d5f428f4.rlib" "-Wl,--start-group" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libstd-a00df94173a9625e.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libpanic_unwind-0ade5cf73e04602f.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libminiz_oxide-199e087d711abaf2.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libadler-92636adde9dfdab3.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libobject-786d03c35c525729.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libaddr2line-075bac1bef77631e.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libgimli-fe5d867622a59ff4.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libstd_detect-16b9a4640a8d8e49.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/librustc_demangle-74ed1b93f35a8b5c.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libhashbrown-65bca6efb0d1ae76.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/librustc_std_workspace_alloc-7617bb53cb785301.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libunwind-3e3c63e1d57d7984.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcfg_if-5a454b94b924fe0f.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/liblibc-286e1b6f1aa9882b.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/liballoc-f788dc2a8f24a089.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/librustc_std_workspace_core-68e8b26f6c683b0a.rlib" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcore-4df0a28e3f643805.rlib" "-Wl,--end-group" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib" "-Wl,-Bdynamic" "-lutil" "-Wl,-Bstatic" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-lgcc_eh" "-lgcc" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib" "-o" "/target/armv5te-unknown-linux-gnueabi/release/deps/rf_tester-4ea254c6e69140ad" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-static"
  = note: /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libstd-a00df94173a9625e.rlib(std-a00df94173a9625e.std.dfcbb5ow-cgu.0.rcgu.o): In function `std::sys::unix::os::home_dir::fallback':
          /rustc/a178d0322ce20e33eac124758e837cbd80a6f633//library/std/src/sys/unix/os.rs:609: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libstd-a00df94173a9625e.rlib(std-a00df94173a9625e.std.dfcbb5ow-cgu.0.rcgu.o): In function `<std::sys_common::net::LookupHost as core::convert::TryFrom<(&str,u16)>>::try_from':
          /rustc/a178d0322ce20e33eac124758e837cbd80a6f633//library/std/src/sys_common/net.rs:197: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_dsub':
          (.text+0x8): multiple definition of `__aeabi_dsub'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.107.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.45/src/float/sub.rs:13: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_dadd':
          (.text+0xc): multiple definition of `__aeabi_dadd'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.4.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.45/src/macros.rs:242: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_ui2d':
          (.text+0x2b8): multiple definition of `__aeabi_ui2d'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.70.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.45/src/float/conv.rs:11: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_f2d':
          (.text+0x304): multiple definition of `__aeabi_f2d'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.27.rcgu.o):/rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/bit.rs:160: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_ul2d':
          (.text+0x34c): multiple definition of `__aeabi_ul2d'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.118.rcgu.o):/rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/cmp.rs:1185: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_l2d':
          (.text+0x360): multiple definition of `__aeabi_l2d'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.78.rcgu.o):/rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/cmp.rs:1185: first defined here
          collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: could not compile `rf-tester`

Caused by:
  process didn't exit successfully: `rustc --crate-name rf_tester --edition=2018 rf-tester/src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=4ea254c6e69140ad -C extra-filename=-4ea254c6e69140ad --out-dir /target/armv5te-unknown-linux-gnueabi/release/deps --target armv5te-unknown-linux-gnueabi -C linker=arm-linux-gnueabi-gcc -L dependency=/target/armv5te-unknown-linux-gnueabi/release/deps -L dependency=/target/release/deps --extern base64=/target/armv5te-unknown-linux-gnueabi/release/deps/libbase64-0a1de53dc600d9a3.rlib --extern futures=/target/armv5te-unknown-linux-gnueabi/release/deps/libfutures-7ce800c66024fac1.rlib --extern regions=/target/armv5te-unknown-linux-gnueabi/release/deps/libregions-d76127f4d8e6acd0.rlib --extern semtech_udp=/target/armv5te-unknown-linux-gnueabi/release/deps/libsemtech_udp-c0fd03d20079c8ef.rlib --extern structopt=/target/armv5te-unknown-linux-gnueabi/release/deps/libstructopt-01571a001e854017.rlib --extern tokio=/target/armv5te-unknown-linux-gnueabi/release/deps/libtokio-ae7d7c0da13fdbea.rlib -C target-feature=+crt-static -C link-args=-static` (exit status: 1)
vagrant@ubuntu-18:~/packet-forwarder-test$
lthiery commented 3 years ago

@andrewintw Sorry for my extreme delay. I went on vacation and lost track of this thread.

It seems the important part of the error is

          (.text+0x8): multiple definition of `__aeabi_dsub'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.107.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.45/src/float/sub.rs:13: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_dadd':
          (.text+0xc): multiple definition of `__aeabi_dadd'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.4.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.45/src/macros.rs:242: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_ui2d':
          (.text+0x2b8): multiple definition of `__aeabi_ui2d'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.70.rcgu.o):/cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.45/src/float/conv.rs:11: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_f2d':
          (.text+0x304): multiple definition of `__aeabi_f2d'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.27.rcgu.o):/rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/bit.rs:160: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_ul2d':
          (.text+0x34c): multiple definition of `__aeabi_ul2d'
          /rust/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-0a81935e77106078.rlib(compiler_builtins-0a81935e77106078.compiler_builtins.cpr1e4rt-cgu.118.rcgu.o):/rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/cmp.rs:1185: first defined here
          /usr/lib/gcc-cross/arm-linux-gnueabi/7/libgcc.a(_arm_addsubdf3.o): In function `__aeabi_l2d':
          (.text+0x360): multiple definition of `__aeabi_l2d'

Does this topic here provide any good pointers? https://github.com/rust-lang/compiler-builtins/issues/353

oosui commented 3 years ago

Awesome! I' trying to use it. I've change the global_conf.json file to point the IP to my LoRa gateway but getting messages below.

./rf-tester --region US915
    cli (Opt { test_port: 1680, control_port: 1681, region: US915, debug: false, power: 12 })
Starting server: 0.0.0.0:1680
Starting server: 0.0.0.0:1681
Blocking until both clients connect
New packet forwarder client: MacAddress(AA:43:78:45:53:CF:BB), 192.168.0.129:56922
Mac existed, but IP updated: MacAddress(AA:43:78:45:53:CF:BB), 192.168.0.129:44602
New packet forwarder client: MacAddress(AA:43:78:45:53:CF:BB), 192.168.0.129:56922
Mac existed, but IP updated: MacAddress(AA:43:78:45:53:CF:BB), 192.168.0.129:44602

Are these messages errors? Why Mac existed, but IP updated? What should be the gateway_ID in the config file? Maybe something wrong with it beause it looks like an IP address in it. By the way, the Mac address isn't mac address of my gateway, the mac length except AA and BB is shorter than real Mac address.

How can I know if the test is OK or not? If I connect a Spectrum Analysizer to the hotspot antenna port, should I see output on the screen? What's a good result? Is there any sample log? Thanks!