Running a scala script: changing function name and recompiling does not have an effect - scala

After I change the function name from something else to addOptitrans and recompile, I get the following error:
make final_babylon DICTS=.* bash ../bin/babylon_add_optitrans.sh
DICTS=.* /tmp/scalacmd6937716255793087955.scala:1: error: value
addOptitrans is not a member of object
stardict_sanskrit.batchProcessor
stardict_sanskrit.batchProcessor.addOptitrans("DICTS=.*")
^ one error found make: *** [final_babylon] Error 1
I have confirmed that the updated class is produced in the expected place in the classpath. What could be going wrong?

Delete temporary files with rm -r /tmp/scala*. Then rerun the command.

Related

How to solve Taskhash mismatch and metadata is not deterministic in Yocto project build?

I am facing "Taskhash mismatch" & "The metadata is not deterministic and this needs to be fixed" error in Yocto project build. This issue arises without any obvious reasons. With a perfectly good source code repo, the build is success sometime, while it fails some time. There is no change in source code/recipe or any other build parameters.
Error log:
ERROR: When reparsing /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_populate_lic, the basehash value changed from e0bfa2ad64f24d189d23f9d84918c74a7253e0d7e9c7fea4e3346cbc473d43da to c108c533ec82c43aa15730e4ca9c9838f87133e63417f40af0de8ca8cb43f51a. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake sub_project-rootfs-base -cdo_populate_lic -Snone
ERROR: Then:
ERROR: $ bitbake sub_project-rootfs-base -cdo_populate_lic -Sprintdiff
ERROR: sub_project-rootfs-base-1.0+gitAUTOINC+db239d9f5b-r2 do_package_qa: Taskhash mismatch 87d8616452c2be01481a9034e9147f0270a57a3f64f85cde65076863b8123c7c versus 9a7fd3b27e62140001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_qa
ERROR: Taskhash mismatch 87d8616452c2be01481a9034e9147f0270a57a3f64f85cde65076863b8123c7c versus 9a7fd3b27e62140001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_qa
ERROR: sub_project-rootfs-base-1.0+gitAUTOINC+db239d9f5b-r2 do_package_write_rpm: Taskhash mismatch 9a7fd3b27e62140001d77ab75dbc2026dac88qc8ca93a487b1857a76f2b6b2yy versus 9a7fd3b27e6217l0001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_write_rpm
ERROR: Taskhash mismatch 9a7fd3b27e62140001d77ab75dbc2026dac88qc8ca93a487b1857a76f2b6b2yy versus 9a7fd3b27e6217l0001d77ab75dbc2026dac8e6c8ca93a487b1857a76f2b6b2yy for /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb:do_package_write_rpm
I resolved this issue by doing two of the following action.
Clean the recipe which throws error during build using following command
bitbake -c cleansstate sub_project-rootfs-base
Update the bb file timestamp by doing empty write or by touching file.
Open the bb file using your editor - vim /home/user/my_project/yocto/sub_project-yocto/meta-subproject/meta-base/recipes-core/sub_project-rootfs-base/sub_project-rootfs-base.bb
Write the file by clicking save button or in vim writing ":w" command
Close the file using "x" button or ":q" command.
Rebuild the project as usual.
Edit : In case there are multiple bitbake recipes showing this error, you can touch all bb files and build again. Go into your yocto folder and run following command. This will take some to touch all file and significantly higher time to rebuild the project.
find . -type f -name "*.bb" -exec touch {} +

Error with using ORB-SLAM2

I was trying to get my hands dirty with SLAM and I started with ORB-SLAM2 library.
I have downloaded a TUM sequence and wanted to use ROS for it. So I am following the steps according this page.
In Step 7, part 2, when i run ./build_ros.sh, I get the following error:
In file included from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41:0,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../include/LoopClosing.h:34,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../include/LocalMapping.h:26,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../include/Tracking.h:31,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../include/System.h:29,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/src/AR/ViewerAR.h:29,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/src/AR/ViewerAR.cc:21:
/home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:36:24: fatal error: g2o/config.h: No such file or directory
compilation terminated.
CMakeFiles/MonoAR.dir/build.make:198: recipe for target 'CMakeFiles/MonoAR.dir/src/AR/ViewerAR.cc.o' failed
make[2]: *** [CMakeFiles/MonoAR.dir/src/AR/ViewerAR.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
I went and checked the g2o folder and there is a file by name config.h.
So why am I still getting the error?
In the CMakeLists.txt in /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/
Try adding
${PROJECT_SOURCE_DIR}/../../../Thirdparty
to the list of include_directories() at line 44 (it should be at that line if you did not change the file)
Adding this line tells the cmake where to find the g2o/config.h.
From the information, that missing g2o/config.h in jacobian_workspace.h, but when I look into the file, and do not find the include in line 36. Do I miss something, or you change something?

Sailsjs grunt .svn error during lifting

I have imported my project in svn when I did a checkout and ran the app I got this error I am using sailsjs-0.10.5. I think it is to do with the grunt I am not able to find any solution it works fine in mac not in linux I set the permissin to 0777 even though it is not working here is the error.
verbose: Grunt :: Loading "Gruntfile.js" tasks...
verbose: Grunt :: ERROR
verbose: Grunt :: >> TypeError: Property '.svn' of object # is not a function
verbose: Grunt :: Warning: Task "default" not found.
error: ** Grunt :: An error occurred. **
error:
Aborted due to warnings.
Loading "Gruntfile.js" tasks...ERROR
TypeError: Property '.svn' of object # is not a function
Warning: Task "default" not found.
error: Looks like a Grunt error occurred--
error: Please fix it, then restart Sails to continue running tasks (e.g. watching for changes in assets)
error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the .tmp directory?
error: e.g., /var/hosts/chating_room/.tmp ?
error:
error: If you think this might be the case, try running:
error: sudo chown -R YOUR_COMPUTER_USER_NAME /var/hosts/chating_room/.tmp
Make changes to Gruntfile.js, find loadTasks function, add excludeDirs : /^\.(git|svn)$/:
Original:
function loadTasks(relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/
}) || {};
}
After:
function loadTasks(relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/,
excludeDirs : /^\.(git|svn)$/
}) || {};
}
I have a same problem.
FIXED by
Simply deleting .svn folder from
1) task/.svn,
2) config/.svn &
3) register/.svn

Why can't MATLAB deploytool output exe file?

deploytool works well until creating exe file using mbuild then get this error:
Executing command: mbuild -O -v -output "U1" -I"e:\Mat2009\work\ntst1\U1\src" "e:\Mat2009\work\ntst1\U1\src\U1_main.c" "e:\Mat2009\work\ntst1\U1\src\U1_delay_load.c" "e:\Mat2009\work\ntst1\U1\src\U1_mcc_component_data.c" -link exe -env MCR_DELAYLOAD=/delayload:mclmcrrt710.dll -env
MCR_DELAYLIB=delayimp.lib -outdir "e:\Mat2009\work\ntst1\U1\src"
Error: An error occurred while shelling out to mbuild (error code = -1).
Unable to build executable.
??? Error using ==> mcc
Error executing mcc, return status = 1 (0x1).
How can I resolve this error?
This error looks similar to an error I encountered once (after upgrading to 2012b), I cannot recall the source but I found two potential solutions:
Make sure there are no spaces in the path to the compiler
Try building a few times and cross your fingers
Given the time frame I had I chose to go for option two and after 5-10 attempts it suprisingly worked.
have found that COMSPEC env. var had a wrong value, so I deleted the wrong path, restarted MATLAB then it worked well.

Perl Cross Compilation: MAKE

I've been trying to Cross Compile Perl-5.14.2 for NetBSD target from Linux machine.
Configure script successfully invoked with following options,
./Configure -des -Dusecrosscompile
-Dtargetarch=netbsd
-Dosvers=3.0.0
-Dtargethost=10.184.22.48
-Dtargetuser=username
-Dusrinc=.../sb1-mips/usr/include
-Dlibpth=.../xc-sb1-mips/netbsd/Lib/lib
-Dcc=.../mips64-netbsdelf-gcc
Once after Configured, make wasn't successful.
It breaks at different places right from creating miniperlmain.o file.
For example following error occurred while generating gv.o file:
gv.c: In function `Perl_try_amagic_un':
gv.c:2018: error: void value not ignored as it ought to be
gv.c:2029: error: void value not ignored as it ought to be
gv.c:2029: warning: cast from pointer to integer of different size
gv.c: In function `Perl_try_amagic_bin':
gv.c:2061: error: void value not ignored as it ought to be
gv.c:2063: error: void value not ignored as it ought to be
make: *** [gv.o] Error 1
Now to get rid of these errors I've passed two flags namely -DPERL_IMPLICIT_CONTEXT and -DPERL_GCC_BRACE_GROUPS_FORBIDDEN to C Compiler CCFLAGS which solved the problem.
Since it is a custom build, want to know about all of the CCFLAGS that have to be passed in order to achieve a successful build?
What does each flag mean?
Is their any documentation available?
Use vagrant. It has some OpenBSD and FreeBSD images. Hopefuly those will be compatible with NetBSD.
You can get a build environment very fast with that. Then you can transfer and build your code happily :)