adhuliya / ajit-toolchain

Toolchains for AJIT Processor IIT Bombay
8 stars 4 forks source link

Regarding uClibc headers and other paths to be set for ajit_build_dev #12

Closed saurabhb17 closed 3 years ago

saurabhb17 commented 3 years ago

I was trying to compile the rpn program in the ajit_build_dev and facing few issues:

  1. Missing makeLinkerscript.py fixed by adding export PYTHONPATH="$TOOLS_DIR/tools/linker:$PYTHONPATH"; and export PATH=$TOOLS_DIR/l:$PATH; to the ajit_env at the top level directory.

sparc-linux-readelf, sparc-linux-gcc etc are sourced properly, however while providing the include paths by -I option in the compile script, I am bit conflicted as to which path to be specified? a. /home/ajit/ajit-toolchain/build/buildroot-2014.08/output/build/uclibc-0.9.33.2/include b. /home/ajit/ajit-toolchain/build/buildroot-2014.08/output/build/host-binutils-2.22/binutils

long story short, I am looking for replacement of following two env path variables:

for comapirson with the ajit_release, $AJIT_UCLIBC_HEADERS points to ajit_release/bin-utils/include $AJIT_LIBGCC_INSTALL_DIR/include points to ajit_release/bin-utils/gcc/include

saurabhb17 commented 3 years ago

found the paths, programs compiles and runs: $AJIT_UCLIBC_HEADERS = /home/ajit/ajit-toolchain/build/buildroot-2014.08/output/build/host-binutils-2.22/include $AJIT_LIBGCC_INSTALL_DIR = /home/ajit/ajit-toolchain/build/buildroot-2014.08/output/build/host-gcc-final-4.7.4/gcc

changes done in commit ea095bc3d82dbdc7cab08a7f501028470aedf8d6

Please close the issue if the solution is the right one.

adhuliya commented 3 years ago

These changes have broken the system. The default example that is shipped with the build doesn't run with the changes done. Basically what is the need to change $AJIT_LIBGCC_INSTALL_DIR ? What problem was it causing earlier? It is causing one now with the new value.

saurabhb17 commented 3 years ago

docker_error.log

before adding the changes $AJIT_LIBGCC_INSTALL_DIR and $AJIT_UCLIBC_HEADERS, i got errors as you can see in the log attached. So I went to ajit_release and checked where the include paths are sourced from and added them here.

After that the rpn program was compiling and running in docker setup.

If this has broken the system somehow, kindly revert these changes, partly or entirely, whichever is suitable and suggest how can this be resolved!!

adhuliya commented 3 years ago

Addition of new environment variables should not be a problem (in most cases). Just make sure in such cases the name of the variable is unique. The AJIT_LIBGCC_INSTALL_DIR variable was overwritten which caused the problem.

Please send me the rpn program folder with instructions to build and run it.

I have reverted some of the changes. I fear these things will keep happening till we don't have a test suite that can be run on any changes made to the system. I am trying to put together a simple script for that, which will do some basic sanity check.

adhuliya commented 3 years ago

I forgot to mention that in the log file you shared, the error "Error: linker script file not specified" seems to be unrelated to the paths problem above. Hence I need to look at the entire folder with that program and build scripts to resolve this properly.

saurabhb17 commented 3 years ago

rpn_with_intr.tar.gz

Please find the example folder with all the scripts

saurabhb17 commented 3 years ago

I have reverted some of the changes.

could you please push these changes?