sergev / bash-commander

Version of the GNU Bourne Again shell extended with two-panel file manager.
43 stars 8 forks source link

Build fails in termux on 32-bit android arm device #7

Open PhilT001 opened 6 months ago

PhilT001 commented 6 months ago

build fails in termux (android terminal emulator) on a 32-bit device with the following:

[ 81%] Built target glob [ 81%] Generating syntax.c [ 81%] [BISON][parse] Building parser with bison 3.8.2 [ 82%] Generating signames.h [ 82%] Building C object CMakeFiles/bashc.dir/bash/jobs.c.o [ 83%] Building C object CMakeFiles/bashc.dir/bash/error.c.o [ 83%] Building C object CMakeFiles/bashc.dir/bash/trap.c.o [ 83%] Building C object CMakeFiles/bashc.dir/bash/copy_cmd.c.o [ 84%] Building C object CMakeFiles/bashc.dir/bash/input.c.o [ 84%] Building C object CMakeFiles/bashc.dir/bash/mailcheck.c.o [ 85%] Building C object CMakeFiles/bashc.dir/bash/shell.c.o [ 85%] Building C object CMakeFiles/bashc.dir/version.c.o /data/data/com.termux/files/home/builds/source/bash-commander-master/version.c:27:39: error: expected expression 27 | const int build_version = BUILDVERSION; | ^ 1 error generated. make[3]: [CMakeFiles/bashc.dir/build.make:190: CMakeFiles/bashc.dir/version.c.o] Error 1 make[2]: [CMakeFiles/Makefile2:238: CMakeFiles/bashc.dir/all] Error 2 make[1]: [Makefile:136: all] Error 2 make[1]: Leaving directory '/data/data/com.termux/files/home/builds/source/bash-commander-master/build' make: [Makefile:11: all] Error 2

Bash-commander builds fine in termux on 64-bit android devices.

sergev commented 6 months ago

C compiler detects error in line:

const int build_version = BUILDVERSION;

BUILDVERSION is defined in script config.cmake as:

add_definitions(-DBUILDVERSION=${GIT_REVCOUNT})

Value of GIT_REVCOUNT is obtained from git:

execute_process( COMMAND git rev-list HEAD --count WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE GIT_REVCOUNT )

Please make sure git is installed in termux. Try git rev-list HEAD --count: it should show a number like 223.

PhilT001 commented 6 months ago

git is installed however I had some difficulties in cloning the repo with the following error in git:

error: RPC failed; curl 16 Error in the HTTP2 framing layer/s

So I downloaded the bash-commander-master.zip file and used that.

A quick search suggested adding the following before cloning:

git config --global http.version HTTP/1.1

This worked and I now have bash-commander compiled.