ris8_allo_zen0 Posted August 16, 2008 Report Share Posted August 16, 2008 Hi all,I tried to compile button_duoled_matrix_v1_2b (which is a C application using the new programming platform, I think) in my Ubuntu 8.04 system and had some troubles:makerm -rf _output/*rm -rf _outputrm -rf *.cod *.map *.lstrm -rf *.hexmkdir -p _outputsh ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/app_lcd/dummy -I ./modules/blm -DDEBUG_MODE=0 -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I ./modules/mios_wrapper modules/mios_wrapper/mios_wrapper.asm -o _output/mios_wrapper.o./bin/mios-gpasm: 25: declare: not found./bin/mios-gpasm: 28: declare: not found./bin/mios-gpasm: 38: Syntax error: "(" unexpected (expecting "fi")make: *** [_output/mios_wrapper.o] Error 2I thought it was something related to sh/bash, so I changed the following lines in include/makefile/common.mk around line 30:# GPASM execution via wrapperGPASM = sh $(MIOS_BIN_PATH)/mios-gpasm -c# SDCC execution via wrapperSDCC = sh $(MIOS_BIN_PATH)/mios-sdcc -cto# GPASM execution via wrapperGPASM = bash $(MIOS_BIN_PATH)/mios-gpasm -c# SDCC execution via wrapperSDCC = bash $(MIOS_BIN_PATH)/mios-sdcc -cA similar issue is in the last line bin/mios-sdcc:sdcc --asm="sh ${MIOS_BIN_PATH}/mios-gpasm -fixasm" $@which I changed tosdcc --asm="bash ${MIOS_BIN_PATH}/mios-gpasm -fixasm" $@These fixes worked for me.Moreover, gpasm and sdcc packages (and their related packages, sdcc-libraries) provided from the Ubuntu repository (i.e. from Synaptic) are too old for the MIOS programming platform. I also solved this issue by manually downloading the newer versions from the "unstable" Debian repository:http://packages.debian.org/sid/i386/gputils/downloadhttp://packages.debian.org/sid/all/gputils-common/downloadhttp://packages.debian.org/sid/i386/sdcc/downloadhttp://packages.debian.org/sid/all/sdcc-libraries/downloadBest regards,RAZ Quote Link to comment Share on other sites More sharing options...
TK. Posted August 16, 2008 Report Share Posted August 16, 2008 The workaround for "dash" (which is used as default shell instead of bash) are already in the repositoryThere is a new environment variable which has to be set by Ubuntu users:export MIOS_SHELL=/bin/bashFor the case that you haven't downloaded the repository yet, just type:svn co svn://svnmios.midibox.org/miosBest Regards, Thorsten.P.S.: the applications will be re-released once the modifications has been tested well enough on different operating systems. Quote Link to comment Share on other sites More sharing options...
cimo Posted August 16, 2008 Report Share Posted August 16, 2008 hi yep basically there is a little issue with Ubuntu and probably other distros related to sh/bash/dash.There is a workaround as you ve found out, but probably something should be changed in the source code of the application, i know Stryd _one is working on it, if you want to join the bandwagon and some some ideas feel free to drop by the chat sometime.Simoneeheh ok TK was faster not only on answering but getting the source fixed, thanks Ubuntu users are very happy for that! ;) Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 16, 2008 Report Share Posted August 16, 2008 Just for future reference and to help people find a hit in a search:This also happens on Solaris, and HPUX, and any other debian-based distro. It will happen on any distro which does not use bash as the default shell. If you're not sure, you can type:sh --versionand if it doesn't say that it's 'bash', then you need to set this MIOS_SHELL variable to specify the path to bash.You can use export as shown above, or set it in your .rc file permanently.Just for the geeks:Yes, we could have changed the scripts to just use bash, like ris8 did above.... but that would break it for users of MSYS, which does not have a bash.exe. This (like the old version of make) will be fixed in a future release of MSYS (1.0.11) but that release is not expected soon. So, we decided that unix geeks are more likely to be comfortable with setting an environment variable, than your average windows user.Just for the future:When we have our repository up and running, I will be maintaining more recent builds of our tools, so you can always install the package to know that you are using a version which has been tested and is used by myself and the other maintainers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.