clarkwang / sexpect

Expect for Shells
GNU General Public License v3.0
120 stars 16 forks source link

syntax error: unexpected "(" #26

Closed dony71 closed 2 years ago

dony71 commented 2 years ago

I manage to cross compile for openwrt successfully To compile, execute cmake below cmake .. -D CMAKE_CXX_COMPILER=mipsel-openwrt-linux-musl-g++ -D CMAKE_INSTALL_PREFIX=/usr/bin

However got error below while execute binary root@PRIUS:~# sexpect --help /usr/bin/sexpect: line 1: syntax error: unexpected "("

Anything missing?

dony71 commented 2 years ago

cmake .. -D CMAKE_CXX_COMPILER=mipsel-openwrt-linux-musl-g++ -D CMAKE_INSTALL_PREFIX=/usr/bin

giving result -- The C compiler identification is GNU 9.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: ` CMAKE_CXX_COMPILER`

toolchain already in echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/osboxes/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin/

how to fix this?

dony71 commented 2 years ago

case closed manage to compile correctly now by following link below https://lxr.openwrt.org/source/urngd/cmake/openwrt-toolchain-imx6.cmake

clarkwang commented 2 years ago

sexpect has already been added to openwrt/packages: https://github.com/openwrt/packages/pull/18260